# Build the version number
set(SIMGRID_VERSION_MAJOR "3")
-set(SIMGRID_VERSION_MINOR "31")
+set(SIMGRID_VERSION_MINOR "32")
set(SIMGRID_VERSION_PATCH "1") # odd => git branch; even => stable release or released snapshot
if(${SIMGRID_VERSION_PATCH} EQUAL "0")
endif()
endif()
-## We need a decent support of the C++14 and C11 standards
+## We need a decent support of the C++17 and C11 standards
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
message(WARNING "FreeBSD + Model-Checking + Java = too much for now. Disabling the Java bindings.")
set(enable_java FALSE)
endif()
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -gdwarf-4")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf-4")
else()
SET(SIMGRID_HAVE_MC 0)
set(HAVE_MMALLOC 0)
OUTPUT_VARIABLE compile_makecontext_output)
#If can have both context
- if(compile_makecontext)
- set(HAVE_UCONTEXT_CONTEXTS 1)
- message(STATUS "Support for ucontext factory ok.")
- else()
+ if(NOT compile_makecontext)
message(STATUS "Error: <ucontext.h> exists, but makecontext is not compilable. Compilation output:\n ${compile_makecontext_output}")
message(STATUS "No ucontext factory: makecontext() is not compilable.")
- endif()
-
- # Stack setup (size and address)
- try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
- ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_stacksetup.c
- RUN_OUTPUT_VARIABLE stack_setup)
-
- LIST(LENGTH stack_setup stack_setup_len)
- if("${stack_setup_len}" STREQUAL "2")
- LIST(GET stack_setup 0 makecontext_addr)
- LIST(GET stack_setup 1 makecontext_size)
- set(sg_makecontext_stack_addr "#define sg_makecontext_stack_addr(skaddr) (${makecontext_addr})")
- set(sg_makecontext_stack_size "#define sg_makecontext_stack_size(sksize) (${makecontext_size})")
else()
- message(FATAL_ERROR "Could not figure out the stack setup. Compil: ${RUN_makecontext_VAR}. Exec: ${COMPILE_makecontext_VAR}. Output: ${stack_setup}")
+ message(STATUS "Support for ucontext factory ok.")
+ set(HAVE_UCONTEXT_CONTEXTS 1)
+
+ # Stack setup (size and address)
+ try_run(RUN_makecontext_VAR COMPILE_makecontext_VAR
+ ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_stacksetup.c
+ RUN_OUTPUT_VARIABLE stack_setup)
+
+ LIST(LENGTH stack_setup stack_setup_len)
+ if("${stack_setup_len}" STREQUAL "2")
+ LIST(GET stack_setup 0 makecontext_addr)
+ LIST(GET stack_setup 1 makecontext_size)
+ set(sg_makecontext_stack_addr "#define sg_makecontext_stack_addr(skaddr) (${makecontext_addr})")
+ set(sg_makecontext_stack_size "#define sg_makecontext_stack_size(sksize) (${makecontext_size})")
+ else()
+ message(FATAL_ERROR "Could not figure out the stack setup. Compil: ${RUN_makecontext_VAR}. Exec: ${COMPILE_makecontext_VAR}. Output: ${stack_setup}")
+ endif()
endif()
endif()
set(MODULE_MPIF_OUT "end module mpi")
configure_file(${CMAKE_HOME_DIRECTORY}/include/smpi/mpif.h.in ${CMAKE_BINARY_DIR}/src/smpi/mpif.f90.generated @ONLY)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/smpi/mpif.f90.generated ${CMAKE_BINARY_DIR}/src/smpi/mpif.f90)
+ file(REMOVE ${CMAKE_BINARY_DIR}/src/smpi/mpif.f90.generated)
set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/include/smpi)
add_library(mpi SHARED ${CMAKE_BINARY_DIR}/src/smpi/mpif.f90)
endif()