[CMake] 2.6.1 RC12 add_subdirectory(xxx EXCLUDE_FROM_ALL) problems

Bill Hoffman bill.hoffman at kitware.com
Fri Jul 25 14:19:55 EDT 2008


Ross, Thomas wrote:
> Hello List!
> 
> I was planning to switch a project from CMake 2.4.8 to CMake 2.6.1 when
> it hits final and was trying out the newest RC12 to see if it works for
> me so far.
> 
> So what am I doing...
> 
> I have an "add_subdirectory(3rdParty EXCLUDE_FROM_ALL)" in my main
> CMakeLists.txt that generates a standalone Solution (using VS2005
> Generator) in the 3rdParty subdirectory that needs to be compiled and
> installed bevor the actual "Main Solution" can be build.
> 
> With CMake 2.4.8 everything was fine. The projects from 3rdParty didn't
> show up in the main solution as expected.
> 
> Now with CMake 2.6.1 RC12 I get a few (_not_ all) projects from 3rdParty
> in the main solution.
> 
> As it turns out the offending projects that show up in the main solution
> are all libraries that are linked from projects inside the main
> solution.
> 
> Is there anything I have to do different in the new CMake version or is
> this a bug?
> 
> Thanks in advance
> Thomas
> 
That is a new feature of 2.6.X, any library that is linked into 
something is included, even if it is excluded from all.  The 
sub-projects are also now complete.  The reasoning is that you could get 
incomplete builds if we don't do this.

-Bill

-- 
Bill Hoffman
Kitware, Inc.
28 Corporate Drive
Clifton Park, NY 12065
bill.hoffman at kitware.com
http://www.kitware.com
518-371-3971 (phone and fax)


More information about the CMake mailing list