Skip to content

Commit

Permalink
Fix cmake exists command
Browse files Browse the repository at this point in the history
  • Loading branch information
xtofalex committed Nov 8, 2023
1 parent 5a3c83a commit 5448e68
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ add_subdirectory(cmake)

#Build tests only if module is top level
#and if googletest submodule has been added.
if(PROJECT_IS_TOP_LEVEL AND EXISTS(thirdparty/googletest/CMakeLists.txt))
if(PROJECT_IS_TOP_LEVEL
AND EXISTS "${PROJECT_SOURCE_DIR}/thirdparty/googletest/CMakeLists.txt")
add_subdirectory(thirdparty)
include(CTest)
enable_testing()
add_subdirectory(test)
endif(PROJECT_IS_TOP_LEVEL AND EXISTS(thirdparty/googletest/CMakeLists.txt))
endif()

0 comments on commit 5448e68

Please sign in to comment.