X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f15e92e5de94e0d84b2084de6e1648ce64dadbed..094f8c02076206ad96ec3bbad1af2d387534a002:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index f3e237c72e..a628c91b78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,9 @@ # Build the version number set(SIMGRID_VERSION_MAJOR "3") -set(SIMGRID_VERSION_MINOR "24") +set(SIMGRID_VERSION_MINOR "25") set(SIMGRID_VERSION_PATCH "1") # odd => git branch; even => stable release or released snapshot -set(SIMGRID_VERSION_DATE "2019") # Year for copyright information - if(${SIMGRID_VERSION_PATCH} EQUAL "0") set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}") else() @@ -21,10 +19,17 @@ set(libsimgrid-java_version "${release_version}") # Basic checks on cmake cmake_minimum_required(VERSION 3.5) +#for lto, to avoid warning (should be removed when switching to requiring cmake >= 3.9) +if(NOT CMAKE_VERSION VERSION_LESS "3.9") + cmake_policy(SET CMP0069 NEW) +endif() message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}") set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/tools/cmake/Modules) -project(SimGrid C CXX) +project(simgrid C CXX) + +# customizable installation directories +include(GNUInstallDirs) ## Save compiler flags preset with environment variables CFLAGS or CXXFLAGS; ## they will used within smpicc, smpicxx. @@ -232,7 +237,7 @@ if(enable_ns3) endif() set(SIMGRID_HAVE_MSG 0) -if(enable_MSG) +if(enable_msg) set(SIMGRID_HAVE_MSG 1) endif() @@ -412,8 +417,8 @@ endif() mark_as_advanced(PATH_LIBDW_H) mark_as_advanced(PATH_LIBDW_LIB) -if(enable_java AND NOT enable_MSG) - message(FATAL_ERROR "Cannot activate the Java bindings without the MSG module. Either add -Denable_MSG=ON or -Denable_java=OFF") +if(enable_java AND NOT enable_msg) + message(FATAL_ERROR "Cannot activate the Java bindings without the MSG module. Either add -Denable_msg=ON or -Denable_java=OFF") endif() if (enable_model-checking AND enable_ns3) @@ -548,10 +553,10 @@ file(READ ${CMAKE_HOME_DIRECTORY}/src/smpi/smpitools.sh SMPITOOLS_SH) # Definiti ### SMPI script used when simgrid is installed set(exec_prefix ${CMAKE_INSTALL_PREFIX}) -set(includeflag "-I${CMAKE_INSTALL_PREFIX}/include -I${CMAKE_INSTALL_PREFIX}/include/smpi") -set(includedir "${CMAKE_INSTALL_PREFIX}/include") -set(libdir ${exec_prefix}/lib) -set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=\"${CMAKE_INSTALL_PREFIX}/lib") +set(includeflag "-I${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR} -I${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}/smpi") +set(includedir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}") +set(libdir "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}") +set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=\"${CMAKE_INSTALL_LIBDIR}") if(NS3_LIBRARY_PATH) set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${NS3_LIBRARY_PATH}") endif()