Skip to content
Snippets Groups Projects
Commit e76243e0 authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

trying guilhem proposal

parent 78a6f4ba
No related branches found
No related tags found
2 merge requests!451After cmake and const refactor,!445Resolve "Refactoring WOLF installation system"
Pipeline #10259 failed
...@@ -2,10 +2,10 @@ ...@@ -2,10 +2,10 @@
add_subdirectory(gtest) add_subdirectory(gtest)
# Include gtest directory. # Include gtest directory.
if(${CMAKE_VERSION} VERSION_LESS "3.11.0") # if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
message("CMake version less than 3.11.0") # message("CMake version less than 3.11.0")
include_directories(${GTEST_INCLUDE_DIRS}) # include_directories(${GTEST_INCLUDE_DIRS})
endif() # endif()
############# USE THIS TEST AS AN EXAMPLE ################# ############# USE THIS TEST AS AN EXAMPLE #################
# # # #
......
...@@ -69,6 +69,12 @@ endif() ...@@ -69,6 +69,12 @@ endif()
function(wolf_add_gtest target) function(wolf_add_gtest target)
add_executable(${target} ${ARGN}) add_executable(${target} ${ARGN})
target_link_libraries(${target} PUBLIC gtest_main) if(${CMAKE_VERSION} VERSION_LESS "3.11.0")
add_dependencies(${target} libgtest)
target_link_libraries(${target} libgtest)
target_include_directories(${target} ${GTEST_INCLUDE_DIRS})
else()
target_link_libraries(${target} PUBLIC gtest_main)
endif()
add_test(NAME ${target} COMMAND ${target}) add_test(NAME ${target} COMMAND ${target})
endfunction() endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment