Skip to content

Commit

Permalink
add import script for catch2
Browse files Browse the repository at this point in the history
  • Loading branch information
toschmidt committed Mar 10, 2021
1 parent 6eb678f commit 7fe9caf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions import/catch2.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
include(FetchContent)

FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v2.13.1
)

FetchContent_MakeAvailable(Catch2)
add_library(catch2 ALIAS Catch2)

# set export variables
set(CATCH2_LIBRARY catch2)
set(CATCH2_SOURCE_DIR ${Catch2_SOURCE_DIR})

message(STATUS "[CATCH2] settings")
message(STATUS " CATCH2_LIBRARY = ${CATCH2_LIBRARY}")
message(STATUS " CATCH2_SOURCE_DIR = ${CATCH2_SOURCE_DIR}")

0 comments on commit 7fe9caf

Please sign in to comment.