On Wednesday 11 March 2009, Steven Van Ingelgem wrote:
> Hi all,
>
>
> How can I add multiple "COMPILE_DEFINITIONS" for 1 source file?
> I tried with a foreach loop, I tried with an array to
> "COMPILE_DEFINITIONS". In the first case, the latest is retained, in the
> last case only the first one is set.
I can think of the following ways:
use SET_PROPERTY(SOURCE ... ) with the APPEND argument, or
first use GET_SOURCE_FILE_PROPERTY() to get the current value, then append the
new value to the variable, and then set the new value using
SET_SOURCE_FILES_PROPERTIES().
Make sure to use quuotes around the dereferenced variable:
SET_SOURCE_FILES_PROPERTIES(.... "${my_list_of_stuff}" ).
Please post the code if it doesn't work.
Alex
_______________________________________________
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