set(SMPI_FLANG 1)
endif()
- set(SMPI_FORTRAN 1)
+ set(SMPI_FORTRAN 1 CACHE BOOL "Whether SMPI Fortran code can be compiled")
+ mark_as_advanced(SMPI_FORTRAN)
endif(CMAKE_Fortran_COMPILER)
endif()
# Checks for header libraries functions.
CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME)
-
-set(HAVE_PTHREAD_SETAFFINITY 0)
CHECK_LIBRARY_EXISTS(pthread pthread_setaffinity_np "" HAVE_PTHREAD_SETAFFINITY)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
# Avoid triggering a (full) rebuild by touching the files if they did not really change
configure_file("${CMAKE_HOME_DIRECTORY}/src/internal_config.h.in" "${CMAKE_BINARY_DIR}/src/internal_config.h.generated" @ONLY IMMEDIATE)
+configure_file("${CMAKE_HOME_DIRECTORY}/src/simgrid/version.h.in" "${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated" @ONLY IMMEDIATE)
configure_file("${CMAKE_HOME_DIRECTORY}/include/simgrid/config.h.in" "${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated" @ONLY IMMEDIATE)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/internal_config.h.generated ${CMAKE_BINARY_DIR}/src/internal_config.h)
+execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/src/simgrid/version.h.generated ${CMAKE_BINARY_DIR}/src/simgrid/version.h)
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated ${CMAKE_BINARY_DIR}/include/simgrid/config.h)
file(REMOVE ${CMAKE_BINARY_DIR}/src/internal_config.h.generated)
file(REMOVE ${CMAKE_BINARY_DIR}/include/simgrid/config.h.generated)
endif()
# Python binding, generated with pybind11
-set(PYBIND11_CPP_STANDARD -std=c++11)
find_package(pybind11 2.2.0)
if(NOT PYTHONLIBS_FOUND)
set(pybind11_FOUND OFF)
if(enable_python)
if(pybind11_FOUND)
pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp)
- set_source_files_properties(src/bindings/python/simgrid_python.cpp PROPERTIES COMPILE_FLAGS -std=c++14)
+ target_compile_features(python-bindings PRIVATE cxx_std_14)
target_link_libraries(python-bindings PUBLIC simgrid)
set_target_properties(python-bindings PROPERTIES LIBRARY_OUTPUT_NAME simgrid)
set_property(TARGET python-bindings