Hi.

As cmake should abstract us from the platforms, the compilo, etc. I wonder why 
so much project returns XXX_DEFINITIONS including "-D".

So when we make ADD_DEFINITIONS(XXX_DEFINITIONS) everything work.
But when we do SET_PROPERTY( [...] COMPILE_DEFINITIONS [...] ) it doesn't work 
anymore.

So i think it is a bug to provide the "-D", and that we shouldn't use 
ADD_DEFINITION for adding definitions.

So in my project i will do a STRING(REPLACE "-D" "" XXX_DEFINITIONS 
${XXX_DEFINITIONS}) before doing SET_PROPERTY( [...] COMPILE_DEFINITIONS [...] 
${XXX_DEFINITIONS})


Am I on the wright way ?

Thank you for your reading/comments.

Paul.

PS : there was a thread about this topic (msg21797), but no answer on the good 
practice.



_______________________________________________
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

Reply via email to