[CMake] Portable preprocessor defines?

Robert Dailey rcdailey at gmail.com
Fri Nov 21 21:00:14 EST 2008


Hi,

I want to define a preprocessor directive through CMakeLists.txt, however
the only documented method of doing this that I see is *add_definitions()*.
Is there a better way of doing this? According to the documentation this
isn't 100% portable, which in my opinion defeats the entire purpose of using
CMake to begin with (Or at the very least that function itself). I don't
think it is right to have to specify -D. I should be able to do:

add_definitions( BOOST_ALL_NO_LIB )

However, I have to do:

add_definitions( -DBOOST_ALL_NO_LIB )

Any help would be greatly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20081121/9687a6c3/attachment.htm>


More information about the CMake mailing list