From 21e5b00f0755b918ab47e7f87fa515495ad2f31b Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Thu, 27 Aug 2015 23:03:25 +0200 Subject: [PATCH] another try to fix the compilation on travis -if (CMAKE_COMPILER_IS_GNUCC) +if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU") The worse is that this is not a stupid attempt. According to http://www.cmake.org/pipermail/cmake/2013-October/056081.html , CMake 2.8.2 learned about "Clang", so only versions older than that would think the compiler is "GNU"... Cmake is really depressive. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 51940649e5..c3a77853d3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -84,7 +84,7 @@ if ((NOT DEFINED enable_smpi OR enable_smpi) AND NOT APPLE) # smpi is enabled by enable_language(Fortran OPTIONAL) endif() -if (CMAKE_COMPILER_IS_GNUCC) +if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU") if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") set (CMAKE_AR gcc-ar) set (CMAKE_RANLIB gcc-ranlib) -- 2.20.1