From d138104c85fc9587757359ff31c006000ab73b28 Mon Sep 17 00:00:00 2001 From: Jakob Petsovits Date: Tue, 14 Jul 2015 17:47:21 -0400 Subject: [PATCH] -Wno-c++11-extensions is a clang-specific option. GCC doesn't have it, so don't enable it unless we specifically know that clang is the compiler. --- CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e91ed5507..9da4ca9a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -312,18 +312,15 @@ if (MSVC) #$(SolutionDir)msvc,release:/OPT:ICF=5 #$(SolutionDir)msvc,release:/OPT:REF -else() +elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") add_definitions(-Wno-c++11-extensions) + add_definitions(-fcolor-diagnostics) endif() add_definitions(-D_FILE_OFFSET_BITS=64) add_definitions(-DBOOST_EXCEPTION_DISABLE) add_definitions(-DBOOST_ASIO_ENABLE_CANCELIO) -if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") - add_definitions(-fcolor-diagnostics) -endif() - if (tcmalloc) target_link_libraries(torrent-rasterbar tcmalloc) endif()