I have a problem with exported flags from a project.
If I use `target_compile_options(hpx PUBLIC ${flags})` hpx is compiled with the
flags, and all 500+ tests within the project that depend on hpx inherit the
flags too, so they get built correctly. However, the `HPXTargets.cmake` file
that is g
Have a look at '$' and '$'
generator expressions.
Le mar. 9 oct. 2018 à 09:48, Biddiscombe, John A. a
écrit :
> I have a problem with exported flags from a project.
>
> If I use `target_compile_options(hpx PUBLIC ${flags})` hpx is compiled
> with the flags, and all 500+ tests within the project
Hi John,
you could put those flags as PUBLIC into a separate INTERFACE target (let's
call it hpxFlags) and then do
target_libraries(hpx PRIVATE hpxFlags)
Then create another interface target hpxForTests to combine those two
targets:
target_link_libraries(hpxForTests PUBLIC hpx hpxFlags)
A
Marc
Thank you. That fixes it.
JB
From: Marc CHEVRIER [marc.chevr...@gmail.com]
Sent: 09 October 2018 09:52
To: Biddiscombe, John A.
Cc: cmake@cmake.org
Subject: Re: [CMake] target_compile_flags and PUBLIC
Have a look at '$' and '$'
genera