[CMake] Problem with set_source_files_properties

vivek goel goelvivek2011 at gmail.com
Fri Jan 6 00:05:22 EST 2012


Using  COMPILE_DEFINITIONS is also not working.


set(MY_PATH "__RELATIVE_PATH__=ab")
set_source_files_properties(${f} PROPERTIES
  COMPILE_DEFINITIONS ${MY_PATH})

On 1/5/12, Mateusz Loskot <mateusz at loskot.net> wrote:
> On 5 January 2012 12:31, vivek goel <goelvivek2011 at gmail.com> wrote:
>> I am using code
>> where f contains the file name
>>
>>
>> set(MY_PATH "-D__RELATIVE_PATH__=\\\"ab\\\"")
>> set_source_files_properties(${f} PROPERTIES
>>   COMPILE_FLAGS ${MY_PATH})
>>
>> I am not able to see -D__RELATIVE_PATH__ inside compilation flags.
>
> You have read the 2nd paragraph of COMPILE_FLAGS section in manual, haven't
> you.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net
>


-- 
regards
Vivek Goel


More information about the CMake mailing list