Fix building with LTO.

This commit is contained in:
Felix Geyer 2012-07-02 19:22:26 +02:00
parent 909e01bde5
commit a9724ad894

View File

@ -92,7 +92,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
endif()
if(WITH_LTO)
if(CMAKE_COMPILER_IS_GNUCC and CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCC AND CMAKE_COMPILER_IS_GNUCXX)
check_cxx_compiler_flag("-flto -fuse-linker-plugin" LTO_AVAILABLE)
if(LTO_AVAILABLE)
@ -102,7 +102,7 @@ if(WITH_LTO)
endif(LTO_AVAILABLE)
else()
message(FATAL_ERROR "LTO is only supported with gcc")
endif(CMAKE_COMPILER_IS_GNUCC and CMAKE_COMPILER_IS_GNUCXX)
endif()
endif()
if(WITH_PIE)