Skip to content

Commit

Permalink
Prettify error message if googletest is missing (#2408)
Browse files Browse the repository at this point in the history
* Prettify error message if googletest is missing

* Add --recursive
  • Loading branch information
thomas-bc authored Dec 7, 2023
1 parent f6bcb35 commit 651fb4e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/FPrime.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ function(fprime_setup_included_code)
setup_global_targets()
# For BUILD_TESTING builds then set up libraries that support testing
if (BUILD_TESTING AND NOT DEFINED FPRIME_SUB_BUILD_TARGETS)
if (NOT EXISTS "${FPRIME_FRAMEWORK_PATH}/googletest/CMakeLists.txt")
message(FATAL_ERROR "googletest submodule not initialized or corrupted. Please run `git submodule update --init --recursive`.")
endif()
add_subdirectory("${FPRIME_FRAMEWORK_PATH}/googletest/" "${CMAKE_BINARY_DIR}/F-Prime/googletest")
endif()
if (BUILD_TESTING)
Expand Down

0 comments on commit 651fb4e

Please sign in to comment.