Re: [CMake] Conditional compilation of entire files

2009-07-05 Thread Mike Jackson
I think this should work: set (SRC_LIST Foo.cpp Bar.cpp) OPTION(SOME_COOL_OPTION "Build Library with super cool option" ON) if(SOME_COOL_OPTION) set (SRC_LIST ${SRC_LIST} Bazz.cpp) endif() add_library (MyLibrary ${SRC_LIST}) Mike Jackson On Sun, Jul 5, 2009 at 8:55 AM, Lucas Thode wrote: >

[CMake] Conditional compilation of entire files

2009-07-05 Thread Lucas Thode
Hello CMake folks, I have a source file in my project that needs to be compiled into my project if and only if a certain configuration cache variable is set. How do I go about doing that, as it doesn't seem that you can append files to an add_library() statement once you've closed it already? T