Skip to content

Commit

Permalink
Look for Catch2 in more folders
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Aug 9, 2023
1 parent 3508a3a commit 4391ab8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ SET(CMAKE_CXX_STANDARD_REQUIRED True)
GET_FILENAME_COMPONENT(_fullpath "${_dir}" REALPATH)
IF(EXISTS "${_fullpath}" AND EXISTS "${_fullpath}/../../Catch2")
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../Catch2 ${CMAKE_CURRENT_BINARY_DIR}/Catch2)
ELSEIF(EXISTS "${_fullpath}" AND EXISTS "${_fullpath}/../../../Catch2")
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../../Catch2 ${CMAKE_CURRENT_BINARY_DIR}/Catch2)
ELSEIF(EXISTS "${_fullpath}" AND EXISTS "${_fullpath}/../../../../Catch2")
ADD_SUBDIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/../../../../Catch2 ${CMAKE_CURRENT_BINARY_DIR}/Catch2)
ELSE()
# ...otherwise, see if it is installed
FIND_PACKAGE(Catch2 3 REQUIRED)
Expand Down

0 comments on commit 4391ab8

Please sign in to comment.