Skip to content
Permalink
Browse files
remove obsolete checks for -fno-implicit-templates
we stopped using -fno-implicit-templates many years ago
  • Loading branch information
vuvova committed Aug 12, 2018
1 parent 889d8a8 commit 675e7e7
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 22 deletions.
@@ -20,9 +20,6 @@ INCLUDE_DIRECTORIES(
${CMAKE_SOURCE_DIR}/extra/yassl/taocrypt/mySTL)

ADD_DEFINITIONS(${SSL_DEFINES})
#Remove -fno-implicit-templates
#(yassl sources cannot be compiled with it)
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(YASSL_SOURCES src/buffer.cpp src/cert_wrapper.cpp src/crypto_wrapper.cpp src/handshake.cpp src/lock.cpp
src/log.cpp src/socket_wrapper.cpp src/ssl.cpp src/timer.cpp src/yassl_error.cpp
src/yassl_imp.cpp src/yassl_int.cpp)
@@ -5,14 +5,7 @@ IF(WIN32)
RETURN()
ENDIF()

#Remove -fno-implicit-templates from compiler flags(handlersocket would not work with it)
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(" -Wdeprecated-declarations" HAVE_CXX_WDEPRECATED_DECLARATIONS)
IF (HAVE_CXX_WDEPRECATED_DECLARATIONS)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
ENDIF()
MY_CHECK_AND_SET_COMPILER_FLAG("-Wdeprecated-declarations")

INCLUDE_DIRECTORIES(libhsclient)

@@ -21,7 +21,6 @@ IF(EXISTS ${Thrift_LIBS})
SET(CMAKE_REQUIRED_INCLUDES ${Thrift_INCLUDE_DIRS})

STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")

SET(CMAKE_REQUIRED_INCLUDES "${Thrift_INCLUDE_DIRS}/..")
CHECK_CXX_SOURCE_COMPILES(
@@ -361,7 +361,6 @@ else()
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-unused-parameter")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-strict-aliasing")
MY_CHECK_AND_SET_COMPILER_FLAG("-Wno-deprecated")
MY_CHECK_AND_SET_COMPILER_FLAG("-fno-implicit-templates")
if(("${MYSQL_VARIANT}" STREQUAL "MariaDB") OR
("${MYSQL_VARIANT}" STREQUAL "MySQL" AND
${MYSQL_VERSION} VERSION_LESS "5.7.0"))
@@ -58,7 +58,6 @@ IF(MSVC)
ELSE(MSVC)
# Fix lp bug 1221555 with -fpermissive, so that errors in gcc 4.7 become warnings for the time being
STRING(REPLACE "-fno-exceptions" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
STRING(REPLACE "-fno-implicit-templates" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated -fno-strict-aliasing -fpermissive")
ENDIF(MSVC)

@@ -79,14 +79,6 @@ set_cflags_if_supported(
)
## set_cflags_if_supported_named("-Weffc++" -Weffcpp)

if (CMAKE_CXX_FLAGS MATCHES -fno-implicit-templates)
# must append this because mysql sets -fno-implicit-templates and we need to override it
check_cxx_compiler_flag(-fimplicit-templates HAVE_CXX_IMPLICIT_TEMPLATES)
if (HAVE_CXX_IMPLICIT_TEMPLATES)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fimplicit-templates")
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(

0 comments on commit 675e7e7

Please sign in to comment.