[cmake-developers] Is this warning really needed: You have called ADD_LIBRARY for library foobar without any source files.?

2015-07-22 Thread Erik Sjölund
Hi,

I think this warning could be removed: You have called ADD_LIBRARY
for library foobar without any source files. This typically indicates
a problem with your CMakeLists.txt file 

If you have a function that populates sources to a target, let us say
something like this:

function(activate_feature target_name)
target_sources(${target_name} PRIVATE feature.cc)
endfunction()

you would like to be able to do

add_library(foobar SHARED)
activate_feature(foobar)

without any CMake warning.
I've started using that design scheme more and more. That is, to have
a function setting up a target where the target name is given as an
input parameter. The nice thing about it is that I can pass both an
executable target and a shared library target as input to such a
function.
cheers,
Erik Sjölund
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] suggestion: rename FindXerces to FindXercesC

2014-12-05 Thread Erik Sjölund
The patch worked for me.
cheers,
Erik Sjölund

On Thu, Dec 4, 2014 at 4:52 PM, Brad King brad.k...@kitware.com wrote:
 On 12/04/2014 10:32 AM, Brad King wrote:
 Roger, as the contributor of this module do you have any reason
 not to change the name?

 I've constructed a commit to perform the rename and merged to 'next'
 for testing:

  Modules: Rename FindXerces to FindXercesC
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27141eed

 Please let me know if it works.  I'd like to get feedback before
 merging to 'master' or 'release'.

 Thanks,
 -Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] why does the order of the options in file(GENERATE) matter?

2014-12-05 Thread Erik Sjölund
I see, thanks.
cheers,
Erik Sjölund

On Fri, Dec 5, 2014 at 7:32 PM, Brad King brad.k...@kitware.com wrote:
 On 12/05/2014 04:28 AM, Erik Sjölund wrote:
 The CMake documentation doesn't mention that the order matters:
 http://www.cmake.org/cmake/help/v3.1/command/file.html#command:file

 Why does the order of the options in file(GENERATE) matter?

 It was always implemented that way:

  
 http://www.cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmFileCommand.cxx;hb=v3.1.0-rc2#l3421

 but the order was dropped from the documentation by accident during
 reformatting.  I've fixed the documentation:

  Help: Document file(GENERATE) signature option order
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe21580b

 -Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers