[CMake] bug SET_SOURCE_FILES_PROPERTIES with files in subdirectory

Jan Woetzel jw at mip.informatik.uni-kiel.de
Thu Jun 8 07:30:53 EDT 2006


Setting PROPERTIES of files in subdirectories does not work,
see bug report 3353.

E.g.

PROJECT(subprop)
SET( FN1 "foo.cpp" )
SET( FN2 "sub/foo2.cpp" )
ADD_LIBRARY( foo ${FN1} ${FN2} )
SET_SOURCE_FILES_PROPERTIES( ${FN1}  PROPERTIES COMPILE_FLAGS 
"-DSomeFlags_DBG_FOO1" ) # OK
SET_SOURCE_FILES_PROPERTIES( ${FN2}  PROPERTIES COMPILE_FLAGS 
"-DSomeFlags_DBG_FOO2" ) # FIXME
GET_SOURCE_FILE_PROPERTY( VAL1 ${FN1} COMPILE_FLAGS ) # OK
GET_SOURCE_FILE_PROPERTY( VAL2 ${FN2} COMPILE_FLAGS ) # FIXME
MESSAGE("VAL1 for ${FN1} is : ${VAL1}")
MESSAGE("VAL2 for ${FN2} is : ${VAL2}")

(1) Is there a workaround ?

Jan

-- 

  Dipl.-Ing. Jan Woetzel
--------------------------------------------------
  University of Kiel
  Institute of Computer Science and Applied Mathematics
  Hermann-Rodewald-Str. 3 [room 310]
  24098 Kiel/Germany
--------------------------------------------------
  Phone +49-431-880-4477
  Fax   +49-431-880-4054
  Mob.  +49-179-2937346
--------------------------------------------------
  Url   www.mip.informatik.uni-kiel.de/~jw
  Email jw at mip.informatik.uni-kiel.de



More information about the CMake mailing list