[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [fluid-dev] Override CMAKE_C_FLAGS_RELEASE
From: |
Tom M. |
Subject: |
Re: [fluid-dev] Override CMAKE_C_FLAGS_RELEASE |
Date: |
Fri, 24 Nov 2017 17:37:14 +0100 |
Why do you need to override only CMAKE_C_FLAGS_RELEASE?
Overriding CMAKE_C_FLAGS_<CONFIG> directly is not possible AFAIK (where
<CONFIG> is determined by CMAKE_BUILD_TYPE).
Custom build flags are usually supplied using the CMAKE_C_FLAGS var. By
documentation this var specifies "flags used regardless of the value of
CMAKE_BUILD_TYPE".
The flags used for compilation are then e.g.:
"${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}"
So as it seems CMAKE_C_FLAGS is prepended rather than appended. This however is
cmake magic. Not sure if that's what you need.
Tom
Am Donnerstag, 23. November 2017, 18:24:43 CET schrieb Marcus Weseloh:
> Hi,
>
> I'm trying to optimise my own gcc build of FluidSynth and am struggling to
> overwrite the flags set in CMAKE_C_FLAGS_RELEASE (without patching the
> CMakeLists.txt file). Is there any option I can set that gets added to the
> gcc command line *after* the build-type flags? Or can I override the
> release flags somehow?
>
> Thanks,
>
> Marcus
>