[CMake] How to specify compiler only flags

2015-04-28 Thread Orion Poplawski
I'm trying to patch the CMakeLists.txt for openjpeg. Currently it does: # Do not use ffast-math for all build, it would produce incorrect results, only set for release: SET(CMAKE_C_FLAGS_RELEASE -ffast-math ${CMAKE_C_FLAGS_RELEASE}) Unfortunately, CMAKE_C_FLAGS are also used in link

Re: [CMake] How to specify compiler only flags

2015-04-28 Thread Orion Poplawski
On 04/28/2015 02:22 PM, Daniel Schepler wrote: As I understand it, configuration-specific properties are deprecated in favor of generator expressions. For example: target_compile_options(openjpeg PRIVATE $$CONFIG:Release:-ffast-math) Thanks, that helps. Perhaps not as simple as a

Re: [CMake] How to specify compiler only flags

2015-04-28 Thread Daniel Schepler
] on behalf of Orion Poplawski [or...@cora.nwra.com] Sent: Tuesday, April 28, 2015 1:15 PM To: CMake Mailing List Subject: [CMake] How to specify compiler only flags I'm trying to patch the CMakeLists.txt for openjpeg. Currently it does: # Do not use ffast-math for all build, it would produce