From: Martin Quinson Date: Thu, 27 Aug 2015 21:03:25 +0000 (+0200) Subject: another try to fix the compilation on travis X-Git-Tag: v3_12~299 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/21e5b00f0755b918ab47e7f87fa515495ad2f31b?ds=sidebyside 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. --- 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)