Skip to content

Commit 2bef4ba

Browse files
committed
updates
1 parent be57986 commit 2bef4ba

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

CMakeLists.txt

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
66
project(dtlmod VERSION 0.1 DESCRIPTION "Data Transport Layer Module")
77

88
include(GNUInstallDirs)
9-
find_package(SimGrid 4.0 REQUIRED)
9+
find_package(SimGrid 4.0.1 REQUIRED)
1010
find_package(FSMod 0.3 REQUIRED)
1111
find_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()
8282
endif()
8383

8484
find_package(Python3 COMPONENTS Development)
8585
if(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)
8888
else()
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)
211212
else()
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)
213214
endif()
214215

215216
# Documentation
@@ -218,7 +219,7 @@ include(${CMAKE_HOME_DIRECTORY}/conf/cmake/Documentation.cmake)
218219
if(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)")
222223
else()
223224
message(" Compile Python bindings .....: OFF (disabled, or pybind11 not found)")
224225
endif()

0 commit comments

Comments
 (0)