[poppler] cmake CXXFLAGS
Adrian Johnson
ajohnson at redneon.com
Mon Sep 11 21:50:21 UTC 2017
On 12/09/17 02:40, Albert Astals Cid wrote:
> El diumenge, 10 de setembre de 2017, a les 20:39:18 CEST, Adrian Johnson va
> escriure:
>> I found another problem with cmake. It is not appending CXXFLAGS to the
>> end of the compiler options. The problem is the build type options are
>> appended after CMAKE_CXX_FLAGS. In PopplerMacros.cmake line 111
>> CMAKE_CXX_FLAGS is set to the common flags and user CXX flags are
>> appended. But then cmake appends the build type flags to CMAKE_CXX_FLAGS
>> preventing the user from having the final say in what options are used.
>>
>> The attached patch works for me. I don't know if there is a better way
>> of doing this.
>
> IMHO the save_ variables just make the code harder to read, just append the
> variables to the SET calls, it's much clearer what the purpose is.
Do you mean like:
set(CMAKE_CXX_FLAGS_RELEASE "-O2 -DNDEBUG ${CMAKE_CXX_FLAGS}")
That makes the CMAKE_CXX_FLAGS flags appear twice on the gcc command
line. Once before the CMAKE_CXX_FLAGS_RELEASE flags and once after.
>
> Cheers,
> Albert
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler
>
More information about the poppler
mailing list