mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-26 18:51:02 +08:00
Fix Catch2 version
This commit is contained in:
parent
354b0d08b4
commit
e27041d095
@ -47,8 +47,8 @@ matrix:
|
||||
|
||||
before_install:
|
||||
# Install catch 2 dependency
|
||||
- wget https://github.com/catchorg/Catch2/archive/master.zip
|
||||
- unzip master.zip && cd Catch2-master && mkdir -p build/ && cd build/
|
||||
- wget https://github.com/catchorg/Catch2/archive/v2.2.3.zip
|
||||
- unzip master.zip && cd Catch2-2.2.3 && mkdir -p build/ && cd build/
|
||||
- cmake -DCMAKE_BUILD_TYPE=Release .. -DCMAKE_INSTALL_PREFIX=~/.local/ && cmake --build . --target install
|
||||
- cd ../..
|
||||
|
||||
|
@ -11,7 +11,8 @@ if (NOT TARGET Dexode::EventBus)
|
||||
find_package(EventBus CONFIG REQUIRED)
|
||||
endif ()
|
||||
|
||||
find_package(Catch2 REQUIRED)
|
||||
# From 2.3.X they broke back compatibility
|
||||
find_package(Catch2 2.2 REQUIRED)
|
||||
|
||||
# Target definition
|
||||
add_executable(EventBusTest
|
||||
@ -46,11 +47,7 @@ set(EVENTBUS_DEBUG_FLAGS
|
||||
|
||||
target_compile_options(EventBusTest PUBLIC "$<$<CONFIG:DEBUG>:${EVENTBUS_DEBUG_FLAGS}>")
|
||||
|
||||
if (TARGET Catch2::Catch2) # Fix for naming library
|
||||
target_link_libraries(EventBusTest PUBLIC Dexode::EventBus Catch2::Catch2)
|
||||
elseif (TARGET Catch2::Catch)
|
||||
target_link_libraries(EventBusTest PUBLIC Dexode::EventBus Catch2::Catch)
|
||||
endif ()
|
||||
target_link_libraries(EventBusTest PUBLIC Dexode::EventBus Catch2::Catch)
|
||||
|
||||
|
||||
add_test(NAME EventBus.UnitTests COMMAND EventBusTest)
|
||||
|
Loading…
x
Reference in New Issue
Block a user