Skip to content

Commit

Permalink
just wanna see the error msg
Browse files Browse the repository at this point in the history
  • Loading branch information
TysonRayJones committed Feb 27, 2025
1 parent 879bccd commit 960613e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ if (ENABLE_MULTITHREADING)
if (APPLE AND CMAKE_CXX_COMPILER_ID MATCHES "Clang")
string(APPEND ErrorMsg " Try first calling `brew install libomp` then `export OpenMP_ROOT=$(brew --prefix)/opt/libomp`")
endif()
message(FATAL_ERROR ErrorMsg)

# before fatally crashing
message(FATAL_ERROR ${ErrorMsg})
endif()

target_compile_definitions(QuEST PUBLIC COMPILE_OPENMP=1)
Expand Down Expand Up @@ -352,7 +354,10 @@ endif()
## Tests

if (ENABLE_TESTING)
find_package(Catch2 3.8.0 QUIET)

set(CatchVersion 3.8.0)

find_package(Catch2 ${CatchVersion} QUIET)

if (NOT TARGET Catch2::Catch2 AND DOWNLOAD_CATCH2)
message(STATUS "Catch2 not found, it will be downloaded and built in the build directory.")
Expand All @@ -361,7 +366,7 @@ if (ENABLE_TESTING)
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.8.0
GIT_TAG v${CatchVersion}
)

FetchContent_MakeAvailable(Catch2)
Expand All @@ -370,7 +375,7 @@ if (ENABLE_TESTING)
# We won't magically find it here, but this is the easiest way to
# a) Force the build to fail, and
# b) Print out all the useful information for helping CMake find Catch2
find_package(Catch2 3.8.0 REQUIRED)
find_package(Catch2 ${CatchVersion} REQUIRED)
endif()

include(Catch)
Expand Down

0 comments on commit 960613e

Please sign in to comment.