From: Martin Quinson Date: Mon, 24 Aug 2015 08:51:47 +0000 (+0200) Subject: Try to move the change of linker after the fortran madness X-Git-Tag: v3_12~302 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/afb3f25be9fd652ab66cf7740691b3e8e6ba17d3?hp=dab54cf6b0e937ad09a2c33381f9df04cd136474 Try to move the change of linker after the fortran madness Let's see if it solves the regression on Travis introduced by 3fa08f69b66a84472bc1805a9e1ac86741b00780 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 907ffaa556..51940649e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,11 +28,6 @@ if (CMAKE_COMPILER_IS_GNUCC) "SimGrid needs at least g++ version 4.7 to compile " "(c++11 support of previous versions is too limited).") endif() - - if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") - set (CMAKE_AR gcc-ar) - set (CMAKE_RANLIB gcc-ranlib) - endif() endif() ## We need a decent support of the c++11 standard @@ -89,6 +84,13 @@ 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(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") + set (CMAKE_AR gcc-ar) + set (CMAKE_RANLIB gcc-ranlib) + endif() +endif() + #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-# # Build the version number # #-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#