if (enable_gtnets OR enable_ns3)
enable_language(CXX)
endif()
-# Workaround for a bug in cmake where enable_language does not work
-# well with OPTIONAL.
-# See http://www.cmake.org/Bug/print_bug_page.php?bug_id=9220
-if(DEFINED CMAKE_Fortran_COMPILER AND CMAKE_Fortran_COMPILER MATCHES "^$")
- set(CMAKE_Fortran_COMPILER CMAKE_Fortran_COMPILER-NOTFOUND)
+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)
+ if(NOT COMMAND CMAKE_FORCE_Fortran_COMPILER)
+ MACRO(CMAKE_FORCE_Fortran_COMPILER compiler id)
+ SET(CMAKE_Fortran_COMPILER "${compiler}")
+ SET(CMAKE_Fortran_COMPILER_ID_RUN TRUE)
+ SET(CMAKE_Fortran_COMPILER_ID ${id})
+ SET(CMAKE_Fortran_COMPILER_WORKS TRUE)
+ SET(CMAKE_Fortran_COMPILER_FORCED TRUE)
+
+ # Set old compiler id variables.
+ IF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ SET(CMAKE_COMPILER_IS_GNUG77 1)
+ ENDIF("${CMAKE_Fortran_COMPILER_ID}" MATCHES "GNU")
+ ENDMACRO(CMAKE_FORCE_Fortran_COMPILER)
+ endif()
+ CMAKE_FORCE_Fortran_COMPILER(smpiff smpiff)
+ enable_language(Fortran OPTIONAL)
endif()
-enable_language(Fortran OPTIONAL)
set(CMAKE_C_FLAGS "" CACHE TYPE INTERNAL FORCE)
set(CMAKE_CXX_FLAGS "" CACHE TYPE INTERNAL FORCE)
# 3.8.{0,1} -> release 3.8, 3.8.1
# 3.9.0 -> release 3.9
+# 3.9.90 -> release 3.10pre1
+# 3.10.0 -> release 3.10
+
set(SIMGRID_VERSION_MAJOR "3")
set(SIMGRID_VERSION_MINOR "9")
-set(SIMGRID_VERSION_PATCH "0")
+set(SIMGRID_VERSION_PATCH "90")
if(${SIMGRID_VERSION_PATCH} EQUAL "0")
set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}")
set(release_version "${SIMGRID_VERSION_MAJOR}.${SIMGRID_VERSION_MINOR}.${SIMGRID_VERSION_PATCH}")
endif()
set(libsimgrid_version "${release_version}")
-set(libgras_version "${release_version}")
-set(libsmpi_version "${release_version}")
+set(libSG_java_version "${release_version}")
set(GCC_NEED_VERSION "4.0")
set(APPLE_NEED_GCC_VERSION "4.6")
endif()
endif()
-string(REGEX MATCH "gcc" GCC "${CMAKE_C_COMPILER}")
-if(GCC)
+if(${CMAKE_C_COMPILER_ID} STREQUAL "GNU")
exec_program("${CMAKE_C_COMPILER} --version" OUTPUT_VARIABLE "COMPILER_C_VERSION")
exec_program("${CMAKE_CXX_COMPILER} --version" OUTPUT_VARIABLE "COMPILER_CXX_VERSION")
string(REGEX MATCH "[0-9].[0-9].[0-9]" COMPILER_C_VERSION "${COMPILER_C_VERSION}")
include_directories(${INCLUDES})
-### Determine the assembly flavor that we need today
-include(CMakeDetermineSystem)
-set(PROCESSOR_${CMAKE_SYSTEM_PROCESSOR} 1)
-
### Setup Options
include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Option.cmake)
### Build some Maintainer files
include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/MaintainerMode.cmake)
-if(NOT WIN32)
- include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/UnitTesting.cmake)
-endif()
+include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/UnitTesting.cmake)
### Setup gcc flags
include(${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Flags.cmake)