diff options
Diffstat (limited to 'configure.cmake')
-rw-r--r-- | configure.cmake | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/configure.cmake b/configure.cmake index 9476b876b4c..5af8ec3a021 100644 --- a/configure.cmake +++ b/configure.cmake @@ -54,26 +54,18 @@ ENDIF() # Always enable -Wall for gnu C/C++ -IF(CMAKE_COMPILER_IS_GNUCXX) - SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wno-unused-parameter") +IF(CMAKE_COMPILER_IS_GNUCXX AND NOT CMAKE_CXX_FLAGS MATCHES ".*-Wall.*") + SET(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS} -Wall -Wno-unused-parameter") ENDIF() -IF(CMAKE_COMPILER_IS_GNUCC) - SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") +IF(CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_C_FLAGS MATCHES ".*-Wall.*") + SET(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS} -Wall") ENDIF() IF(CMAKE_COMPILER_IS_GNUCXX) # MySQL "canonical" GCC flags. At least -fno-rtti flag affects # ABI and cannot be simply removed. - SET(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -fno-implicit-templates -fno-exceptions -fno-rtti") - IF(CMAKE_CXX_FLAGS) - STRING(REGEX MATCH "fno-implicit-templates" NO_IMPLICIT_TEMPLATES - ${CMAKE_CXX_FLAGS}) - IF (NO_IMPLICIT_TEMPLATES) - SET(HAVE_EXPLICIT_TEMPLATE_INSTANTIATION TRUE) - ENDIF() - ENDIF() + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static " OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$") |