[CMake] EXCLUDE_FROM_ALL not working?

David Cole dlrdave at aol.com
Fri Feb 8 17:01:57 EST 2013


Does another library that you add later depend on that one? Or an executable?

If so, then the library will be added because it's required by dependencies, despite your request to exclude it from all.

 

 

 

-----Original Message-----
From: Robert Dailey <rcdailey.lists at gmail.com>
To: CMake <cmake at cmake.org>
Sent: Fri, Feb 8, 2013 4:59 pm
Subject: [CMake] EXCLUDE_FROM_ALL not working?


I am calling add_library like so:

set( project_name mylib )
set( files main.cpp main.h )
set( exclude_flag EXCLUDE_FROM_ALL )
add_library( "${project_name}" SHARED ${exclude_flag} ${files} )

When I generate for Visual Studio 2008, I check the build
configuration and the mylib project is still setup to build when I
invoke Build Solution. Why isn't this flag working?
--

Powered by www.kitware.com

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

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

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130208/3083fd66/attachment.htm>


More information about the CMake mailing list