cmake_modules/compilerchecks.cmake
changeset 15476 3102d95a870e
parent 15474 6e09555b25b4
equal deleted inserted replaced
15475:47cf2cf736e7 15476:3102d95a870e
    60         if(HAVE_RELROPARTIAL)
    60         if(HAVE_RELROPARTIAL)
    61             add_linker_flag("-zrelro")
    61             add_linker_flag("-zrelro")
    62         endif()
    62         endif()
    63     endif()
    63     endif()
    64 
    64 
    65     if(CMAKE_BUILD_TYPE MATCHES "Release" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
    65     if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
    66         set(CMAKE_REQUIRED_FLAGS "-Wl,--as-needed")
    66         set(CMAKE_REQUIRED_FLAGS "-Wl,--as-needed")
    67         check_c_compiler_flag("" HAVE_ASNEEDED)
    67         check_c_compiler_flag("" HAVE_ASNEEDED)
    68         if(HAVE_ASNEEDED)
    68         if(HAVE_ASNEEDED)
    69             add_linker_flag("--as-needed")
    69             add_linker_flag("--as-needed")
    70         endif()
    70         endif()