Skip to content

Commit

Permalink
Prettify error message if googletest is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-bc committed Dec 5, 2023
1 parent 0ed8e0b commit 7474c07
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 @@ -160,6 +160,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`.")
endif()
add_subdirectory("${FPRIME_FRAMEWORK_PATH}/googletest/" "${CMAKE_BINARY_DIR}/F-Prime/googletest")
endif()
if (BUILD_TESTING)
Expand Down

0 comments on commit 7474c07

Please sign in to comment.