Hi
I want to add two definitions to compile one specific files
in addition to the global definitions.
I have the following problem. If I use
set_source_files_properties(source.cpp
PROPERTIES
COMPILE_DEFINITIONS VAR1=${MY_VAR1} VAR2=${MY_VAR2} )
then I get error message incorrect number of
HI Petr
Thanks for the suggestion.
But this will erase the existing compile definitions, won't it ?
So may be I should do a get_property first,
append my new definitions and reset the property ?
I'll try anyway...
Vania
On 01/21/2016 03:21 PM, Petr Kmoch wrote:
Hi Vania.
For your case, it's
On Thu, Jan 21, 2016 at 3:26 PM, Vania Joloboff
wrote:
> HI Petr
>
> Thanks for the suggestion.
> But this will erase the existing compile definitions, won't it ?
> So may be I should do a get_property first,
> append my new definitions and reset the property ?
> I'll
2016-01-21 15:14 GMT+01:00 Vania Joloboff :
> Hi
>
> I want to add two definitions to compile one specific files
> in addition to the global definitions.
> I have the following problem. If I use
>
> set_source_files_properties(source.cpp
> PROPERTIES
> COMPILE_DEFINITIONS
Use APPEND keyword:
set_property(
SOURCE source.cpp
APPEND PROPERTY COMPILE_DEFINITIONS
VAR1=${MY_VAR1} VAR2=${MY_VAR2}
)
On 21/01/16 15:26, "CMake on behalf of Vania Joloboff" wrote:
>HI Petr
>
>Thanks for the
Hi Vania.
For your case, it's best to forget about the
not-as-convenient-as-they-could-be convenience functions set_*_properties,
and just invoke set_property:
set_property(
SOURCE source.cpp
PROPERTY COMPILE_DEFINITIONS
VAR1=${MY_VAR1} VAR2=${MY_VAR2}
)
Petr
On Thu, Jan 21, 2016 at
Hi,
On 21/01/16 15:14, Vania Joloboff wrote:
Hi
I want to add two definitions to compile one specific files
in addition to the global definitions.
I have the following problem. If I use
set_source_files_properties(source.cpp
PROPERTIES
COMPILE_DEFINITIONS VAR1=${MY_VAR1} VAR2=${MY_VAR2} )