Skip to content

Commit

Permalink
fix: cmake buid issue in codeql
Browse files Browse the repository at this point in the history
  • Loading branch information
yunwei37 committed Aug 29, 2024
1 parent 1acd8e5 commit 924f7dd
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ else()
add_subdirectory(cli)
endif()

if(${BPFTIME_ENABLE_UNIT_TESTING} AND NOT TARGET Catch2)
message(STATUS "Adding Catch2 by FetchContent at llvmbpf")
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0 # Specify the version you want to use
)

# Make the Catch2 target available
FetchContent_MakeAvailable(Catch2)
if(${BPFTIME_ENABLE_UNIT_TESTING})
if (NOT TARGET Catch2)
message(STATUS "Adding Catch2 by FetchContent at llvmbpf")
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG v3.4.0 # Specify the version you want to use
)

# Make the Catch2 target available
FetchContent_MakeAvailable(Catch2)
endif()
endif()
endif()

Expand Down

0 comments on commit 924f7dd

Please sign in to comment.