X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/a286e57018d2ef03257affb9fe1e73e0b8d08a3d..6c871f32984f8c197e340fe1cf600fb76dca7932:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 05a1a3abab..e5ffb315d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,8 +2,20 @@ cmake_minimum_required(VERSION 2.6) ### Need to set rc ccompiler before enable language if(WIN32) SET(CMAKE_RC_COMPILER "windres") -endif(WIN32) -project(SimGrid CXX C Fortran) +endif() +project(SimGrid C) +if (enable_gtnets OR enable_ns3) + enable_language(CXX) +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 + # CMAKE_FORCE_Fortran_COMPILER to bypass checks for a working + # compiler (smpiff don't exist at configure time). + include(CMakeForceCompiler) + CMAKE_FORCE_Fortran_COMPILER(smpiff smpiff) + enable_language(Fortran OPTIONAL) +endif() set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE) set(CMAKE_CXX_FLAGS "" CACHE TYPE INTERNAL FORCE) @@ -199,7 +211,7 @@ include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MakeExe.cmake) ### Make tests include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/AddTests.cmake) include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/CTestConfig.cmake) - +CONFIGURE_FILE(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/CTestCustom.cmake ${CMAKE_BINARY_DIR}/CTestCustom.cmake @ONLY) ### Setup the distrib include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Distrib.cmake)