Commit 5b2010b7 authored by Leif Walsh's avatar Leif Walsh

only append -fimplicit-templates if -fno-implicit-templates is already there...

only append -fimplicit-templates if -fno-implicit-templates is already there because of mysql/mariadb
parent 9a2b3949
...@@ -92,15 +92,16 @@ set_cflags_if_supported( ...@@ -92,15 +92,16 @@ set_cflags_if_supported(
) )
## set_cflags_if_supported_named("-Weffc++" -Weffcpp) ## set_cflags_if_supported_named("-Weffc++" -Weffcpp)
## Clang has stricter POD checks. So, only enable this warning on our other builds (Linux + GCC) if (CMAKE_CXX_FLAGS MATCHES -fno-implicit-templates)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
# must append this because mysql sets -fno-implicit-templates and we need to override it # must append this because mysql sets -fno-implicit-templates and we need to override it
# also clang doesn't support it on osx but also doesn't seem to know that
check_cxx_compiler_flag(-fimplicit-templates HAVE_CXX_-fimplicit-templates) check_cxx_compiler_flag(-fimplicit-templates HAVE_CXX_-fimplicit-templates)
if (HAVE_CXX_-fimplicit-templates) if (HAVE_CXX_-fimplicit-templates)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimplicit-templates") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimplicit-templates")
endif () endif ()
endif()
## Clang has stricter POD checks. So, only enable this warning on our other builds (Linux + GCC)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES Clang)
set_cflags_if_supported( set_cflags_if_supported(
-Wpacked -Wpacked
) )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment