[Cmake] SET_SOURCE_FILES_PROPERTIES

William A. Hoffman billlist at nycap . rr . com
Thu, 09 Oct 2003 11:40:24 -0400


You can only list the COMPILE_FLAGS once in the command.
You also have too many \\, you only need one level of escape.

So, the following should work:

SET_SOURCE_FILES_PROPERTIES(${libgdcm_la_SOURCES}
  PROPERTIES
  COMPILE_FLAGS "-D__STDC_LIMIT_MACROS -DPUB_DICT_PATH=\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}\"")

-Bill


At 10:56 AM 10/9/2003, Mathieu Malaterre wrote:
>Hi all,
>
>        After reading 'Mastering CMake' I thought I could use this (instead of ADD_DEFINITIONS) :
>
>SET_SOURCE_FILES_PROPERTIES(${libgdcm_la_SOURCES}
>  PROPERTIES
>  COMPILE_FLAGS  -D__STDC_LIMIT_MACROS
>  COMPILE_FLAGS -DPUB_DICT_PATH=\\"${CMAKE_INSTALL_PREFIX}${GDCM_DATA_DIR}\\"
>)
>
>But for some reason I only get the last one.
>
>My compilation line should be:
>g++ -D__STDC_LIMIT_MACROS  -DPUB_DICT_PATH=\"/usr/local/share/gdcm\" ...
>
>Could someone told me how I can achieve this.
>
>Thanks,
>mathieu
>
>_______________________________________________
>Cmake mailing list
>Cmake at www . cmake . org
>http://www . cmake . org/mailman/listinfo/cmake