[arch-general] Removing compiler flag from CMake output

Marcel Korpel marcel.korpel at gmail.com
Fri Oct 10 16:28:50 UTC 2014


* Delcypher <delcypher at gmail.com> (Thu, 9 Oct 2014 15:26:57 +0100):
> Regardless of that there are several ways of specifying flags. It can
> be done at the target level (e.g. target_compile_definitions(mylib
> COMPILE_OPTIONS ...) ) or globally using CMAKE_CXX_FLAGS_*. There are
> several flags for different release types, e.g.
> 
> CMAKE_CXX_FLAGS_DEBUG
> CMAKE_CXX_FLAGS_MINSIZEREL
> CMAKE_CXX_RELEASE
> CMAKE_CXX_FLAGS
> 
> I believe there are other ways to set flags as well.

I already set CMAKE_CXX_RELEASE and CMAKE_CXX_FLAGS, but to no avail.

> You should look at how the developers have set their flags in their
> CMakeLists.txt files and do it the same way.

Searching for "-fnortti" in CMakeLists.txt and grepping for that value
in the complete source code didn't reveal anything. The only flags that
are explicitly set are "Environment compile flags", set using
SET(MYSQLCPPCONN_COMPILE_FLAGS_ENV "$ENV{CPPFLAGS} ${MYSQL_CXXFLAGS}
$ENV{CXXFLAGS}")
but somehow CMake outputs "MySQL CXXFLAGS" with "-fnortti" included.

Ah! They're in the PKGBUILD of mysql. Removing -fnortti there solved
this issue and mysql-connector-c++ builds again.

Regards,
Marcel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <https://lists.archlinux.org/pipermail/arch-general/attachments/20141010/7d987d66/attachment-0001.bin>


More information about the arch-general mailing list