File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ install(FILES include/dtlmod.hpp DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
242242
243243# Google test
244244find_library (GTEST_LIBRARY NAMES gtest)
245+ find_path (GTEST_INCLUDE_DIR NAMES gtest/gtest.h PATHS /opt/gtest/include )
245246if (GTEST_LIBRARY)
246247 set (TEST_FILES
247248 test /dtl_config.cpp
@@ -253,14 +254,15 @@ if(GTEST_LIBRARY)
253254 test /main.cpp
254255 test /test_util.hpp
255256 include /dtlmod.hpp)
256-
257+
257258 add_definitions (-DGTEST_USED)
258259 add_executable (unit_tests EXCLUDE_FROM_ALL ${SOURCE_FILES} ${HEADER_FILES} ${TEST_FILES} )
259260 target_include_directories (unit_tests PRIVATE
260261 ${CMAKE_SOURCE_DIR} /include
261262 ${CMAKE_BINARY_DIR} /include
262263 ${SimGrid_INCLUDE_DIR}
263264 ${FSMOD_INCLUDE_DIR}
265+ ${GTEST_INCLUDE_DIR}
264266 )
265267 target_link_libraries (unit_tests ${GTEST_LIBRARY} ${SimGrid_LIBRARY} ${FSMOD_LIBRARY} dtlmod -lpthread -lm)
266268 set_target_properties (unit_tests PROPERTIES COMPILE_FLAGS "-g -O0 --coverage" )
You can’t perform that action at this time.
0 commit comments