[poppler] cmake CXXFLAGS

Adrian Johnson ajohnson at redneon.com
Sun Sep 10 11:09:18 UTC 2017


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.

Also in PopplerMacros.cmake there are three levels of warning options:
"no", "yes", and "kde". Is there any reason we can't have one standard
set of warning options? I can't think of any reason for wanting to turn
off warnings. If anyone needs some extra warnings they can be added with
CXXFLAGS.

One more problem I found with cmake. It does not set up the rpath for
the install directory like autotools does. I sometimes have more than
one version of poppler installed to different prefixes for testing
purposes. With autotools I could just run any version without needing to
change LD_LIBRARY_PATH for the version I want to run.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: compiler-flags.diff
Type: text/x-patch
Size: 4237 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20170910/5673552c/attachment.bin>


More information about the poppler mailing list