On 20.01.08 19:45:03, Hendrik Sattler wrote: > Am Sonntag 20 Januar 2008 schrieb Andreas Pakulat: > > On 20.01.08 15:38:44, Rodolfo Lima wrote: > > > Andreas Pakulat escreveu: > > > > The reason I did that was to simplify the module code. > > > > > > I see, but this variable is only used in a if clause, so instead of > > > writing > > > > > > IF( Boost_USE_NONMULTITHREADED ) > > > SET (_boost_MULTITHREADED "") > > > ENDIF( Boost_USE_NONMULTITHREADED ) > > > > > > you could write > > > > > > IF(NOT Boost_USE_MULTITHREADED ) > > > SET (_boost_MULTITHREADED "") > > > ENDIF(NOT Boost_USE_MULTITHREADED ) > > > > > > with the same semantics of the former clause, isn't it? > > > > No, because the default should be to use the multithreaded version. > > Actually I currently don't see a way to do this in CMake, without > > requiring the user to set Boost_USE_MULTITHREAD always. > > if ( NOT DEFINED Boost_USE_MULTITHREADED ) > set ( Boost_USE_MULTITHREADED ON CACHE BOOL "" FORCE ) > endif ( NOT DEFINED Boost_USE_MULTITHREADED ) > > The user can then switch it off in ccmake easily. Note: ccmake only > understands ON/OFF for BOOL.
Miguel just reminded me of OPTION() which I think is a much better way of doing these options. Andreas -- Don't look now, but the man in the moon is laughing at you. _______________________________________________ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake