Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-08-11 Thread Petr Kmoch
On 24 July 2017 at 04:32, Florian Lindner wrote: > > > [snip] > > Still, I don't undertand what is wrong with: > > set_property(GLOBAL APPEND PROPERTY COMPILE_DEFINITIONS > $<$:-FOO>) > > ? > What's wrong is that there is no such global property. See the list of global properties: https://cmake.

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-24 Thread Craig Scott
On Mon, Jul 24, 2017 at 12:32 PM, Florian Lindner wrote: > > > Am 22.07.2017 um 15:36 schrieb Craig Scott: > > > > On Tue, Jul 18, 2017 at 8:50 PM, Florian Lindner > wrote: > > > > #Works, but I would prefer to have it just once for all targets and > at the top of

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-23 Thread Florian Lindner
Am 22.07.2017 um 15:36 schrieb Craig Scott: > > On Tue, Jul 18, 2017 at 8:50 PM, Florian Lindner > wrote: > > #Works, but I would prefer to have it just once for all targets and at > the top of the file > set_property(TARGET testprecice APPEND > PROPE

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-22 Thread Craig Scott
On Tue, Jul 18, 2017 at 8:50 PM, Florian Lindner wrote: > #Works, but I would prefer to have it just once for all targets and at the > top of the file > set_property(TARGET testprecice APPEND > PROPERTY COMPILE_DEFINITIONS "FOO") > > > BTW, you don't include the -D when adding to COMPILE_DEFINI

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-18 Thread Florian Lindner
Am 18.07.2017 um 18:08 schrieb Craig Scott: > It might be easier if you showed the whole CMakeLists.txt file so we can see > the full picture. Is it available somewhere > you can link to, or even better if it's small enough, just post it inline > here. Sure! It's not too long, so I'll paste it h

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-18 Thread Craig Scott
On Tue, Jul 18, 2017 at 1:21 PM, Florian Lindner wrote: > Am 18.07.2017 um 10:59 schrieb Craig Scott: > > You appear to be setting a GLOBAL property where you probably meant > DIRECTORY. You could also consider setting the > > target property instead rather than applying it to all targets (unless

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-18 Thread Craig Scott
It might be easier if you showed the whole CMakeLists.txt file so we can see the full picture. Is it available somewhere you can link to, or even better if it's small enough, just post it inline here. On Tue, Jul 18, 2017 at 1:21 PM, Florian Lindner wrote: > Am 18.07.2017 um 10:59 schrieb Craig

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-17 Thread Florian Lindner
Am 18.07.2017 um 10:59 schrieb Craig Scott: > You appear to be setting a GLOBAL property where you probably meant > DIRECTORY. You could also consider setting the > target property instead rather than applying it to all targets (unless that's > what you want). I tried to set the property on all

Re: [CMake] Append to property COMPILE_DEFINITIONS

2017-07-17 Thread Craig Scott
You appear to be setting a GLOBAL property where you probably meant DIRECTORY. You could also consider setting the target property instead rather than applying it to all targets (unless that's what you want). On Tue, Jul 18, 2017 at 12:56 PM, Florian Lindner wrote: > Hello, > > I want to add co

[CMake] Append to property COMPILE_DEFINITIONS

2017-07-17 Thread Florian Lindner
Hello, I want to add compile definitions. Since I want to use generator expressions, I can't use add_definitions, but have to use the COMPILE_DEFINITIONS property, but neither: set_property(GLOBAL APPEND PROPERTY COMPILE_DEFINITIONS "-DFOO") for testing or set_property(GLOBAL APPEND PROPE