@@ -6,7 +6,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
66project (dtlmod VERSION 0.1 DESCRIPTION "Data Transport Layer Module" )
77
88include (GNUInstallDirs)
9- find_package (SimGrid 4.0 REQUIRED)
9+ find_package (SimGrid 4.0.1 REQUIRED)
1010find_package (FSMod 0.3 REQUIRED)
1111find_package (nlohmann_json REQUIRED)
1212
@@ -76,14 +76,14 @@ if((NOT DEFINED enable_python) OR enable_python)
7676 find_package (pybind11 CONFIG)
7777 message (STATUS "Pybind11 version: ${pybind11_VERSION} " )
7878 if (pybind11_VERSION VERSION_LESS 2.4)
79- message (STATUS "SimGrid needs at least v2.4 of pybind11. Disabling the Python bindings." )
79+ message (STATUS "DTLMod needs at least v2.4 of pybind11. Disabling the Python bindings." )
8080 set (pybind11_FOUND OFF )
8181 endif ()
8282endif ()
8383
8484find_package (Python3 COMPONENTS Development)
8585if (NOT Python3_Development_FOUND OR NOT pybind11_FOUND)
86- message (STATUS "SimGrid Python bindings cannot be built on this system." )
86+ message (STATUS "DTLMod Python bindings cannot be built on this system." )
8787 set (default_enable_python OFF )
8888else ()
8989 set (default_enable_python ON )
@@ -118,7 +118,7 @@ if(enable_python)
118118 if ("${CMAKE_INSTALL_PREFIX} " STREQUAL "/usr" )
119119 set (DTLMOD_PYTHON_LIBDIR ${Python3_SITEARCH} )
120120 else ("${CMAKE_INSTALL_PREFIX} " STREQUAL "/usr" )
121- string (REGEX REPLACE "^/usr/" "${CMAKE_INSTALL_PREFIX} /" DTLMOD_PYTHON_LIBDIR ${Python3_SITEARCH} )
121+ string (REGEX REPLACE "^/usr/local/ " "${CMAKE_INSTALL_PREFIX} /" DTLMOD_PYTHON_LIBDIR ${Python3_SITEARCH} )
122122 endif ("${CMAKE_INSTALL_PREFIX} " STREQUAL "/usr" )
123123 endif ()
124124 install (TARGETS python-bindings
@@ -199,17 +199,18 @@ if(GTEST_LIBRARY)
199199 test /dtl_stream.cpp
200200 test /dtl_variable.cpp
201201 test /main.cpp
202- test /test_util.hpp
203- include /dtlmod.hpp)
204- add_definitions (-DGTEST_USED)
205- add_executable (unit_tests EXCLUDE_FROM_ALL ${SOURCE_FILES} ${HEADER_FILES} ${TEST_FILES} )
206- target_include_directories (unit_tests PRIVATE include )
207- target_link_libraries (unit_tests ${GTEST_LIBRARY} ${SIMGRID_LIBRARY} ${FSMOD_LIBRARY} dtlmod -lpthread -lm)
208- set_target_properties (unit_tests PROPERTIES COMPILE_FLAGS "-g -O0 --coverage" )
209- set_target_properties (unit_tests PROPERTIES LINK_FLAGS "--coverage" )
210- #add_custom_command(TARGET unit_tests COMMAND find . -name *.gcda -delete)
202+ test /test_util.hpp
203+ include /dtlmod.hpp)
204+
205+ add_definitions (-DGTEST_USED)
206+ add_executable (unit_tests EXCLUDE_FROM_ALL ${SOURCE_FILES} ${HEADER_FILES} ${TEST_FILES} )
207+ target_include_directories (unit_tests PRIVATE include )
208+ target_link_libraries (unit_tests ${GTEST_LIBRARY} ${SIMGRID_LIBRARY} ${FSMOD_LIBRARY} dtlmod -lpthread -lm)
209+ set_target_properties (unit_tests PROPERTIES COMPILE_FLAGS "-g -O0 --coverage" )
210+ set_target_properties (unit_tests PROPERTIES LINK_FLAGS "--coverage" )
211+ #add_custom_command(TARGET unit_tests COMMAND find . -name *.gcda -delete)
211212else ()
212- add_custom_target (unit_tests echo "ERROR: Cannot build unit_tests because Google Test (libgtest) was not found by cmake." COMMAND echo " If you have installed Google Test, re-run cmake." VERBATIM )
213+ add_custom_target (unit_tests echo "ERROR: Cannot build unit_tests because Google Test (libgtest) was not found by cmake." COMMAND echo " If you have installed Google Test, re-run cmake." VERBATIM )
213214endif ()
214215
215216# Documentation
@@ -218,7 +219,7 @@ include(${CMAKE_HOME_DIRECTORY}/conf/cmake/Documentation.cmake)
218219if (pybind11_FOUND)
219220 message (" Compile Python bindings .....: ${enable_python} " )
220221 message (" module ....................: ${PYTHON_MODULE_PREFIX} dtlmod${PYTHON_MODULE_EXTENSION} " )
221- message (" install path ..............: ${SIMGRID_PYTHON_LIBDIR } (force another value with -DSIMGRID_PYTHON_LIBDIR )" )
222+ message (" install path ..............: ${DTLMOD_PYTHON_LIBDIR } (force another value with -DDTLMOD_PYTHON_LIBDIR )" )
222223else ()
223224 message (" Compile Python bindings .....: OFF (disabled, or pybind11 not found)" )
224225endif ()
0 commit comments