Skip to content
Snippets Groups Projects
Unverified Commit a895703c authored by Jean-Christophe Fillion-Robin's avatar Jean-Christophe Fillion-Robin
Browse files

COMP: Fix BuildSystem tests ensuring GTest with a config file is looked up

Removes the use of NO_DEFAULT_PATH introduced in a709a89b (Cmake updates
for proper generation of iMSTKConfig.cmake) in favor of CONFIG and consistently
use CONFIG in both CMakeLists.txt and iMSTKConfig.

Requiring the GTest config file ensures the configuration succeeds by
preventing the FindGTest module provided by CMake from being used.

Removing the use of NO_DEFAULT_PATH allows to build iMSTK against a system
version of GTest (starting with Ubuntu 21.04 released in April 2021, the
libgtest-dev package includes GTestConfig.cmake)
parent b7ee439e
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ find_dependency( g3log )
# GTest
if(iMSTK_BUILD_TESTING)
find_dependency( GTest )
find_dependency( GTest CONFIG )
endif()
# LibNiFalcon
......
......@@ -380,7 +380,7 @@ endif()
# Testing
#----------------------------------------------------------------------
if(${PROJECT_NAME}_BUILD_TESTING)
find_package( GTest REQUIRED NO_DEFAULT_PATH)
find_package( GTest CONFIG REQUIRED )
endif()
#-----------------------------------------------------------------------------
......
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