X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f3b401e1382d2a4311e913468d525f8a8767051d..724c0c69f1d646090e4ff10dea1fbb223705b057:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index a79cfa2e2b..a97eb9670b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,11 @@ endif() enable_language(CXX) +if (APPLE) #MAC + set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") + set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) +endif() + if (NOT DEFINED enable_smpi OR enable_smpi) # smpi is enabled by default # Call enable_language(Fortran) in order to load the build rules for # this language, needed by teshsuite/smpi/mpich-test/. Use @@ -98,6 +103,12 @@ if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU") if(${GCC_NEED_VERSION} GREATER COMPILER_C_VERSION_MAJOR_MINOR) message(FATAL_ERROR "Gcc must be to version ${GCC_NEED_VERSION} current version ${COMPILER_C_VERSION_MAJOR_MINOR}") endif() + + if(COMPILER_C_VERSION_MAJOR_MINOR STRGREATER "4.8") + set (CMAKE_AR gcc-ar) + set (CMAKE_RANLIB gcc-ranlib) + endif() + endif() exec_program("${CMAKE_LINKER} --version" OUTPUT_VARIABLE "LINKER_VERSION")