From a9724ad894c03ea5bbded6ad3e71c2874c96a255 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Mon, 2 Jul 2012 19:22:26 +0200 Subject: [PATCH] Fix building with LTO. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3d3b810..1dde39c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)