-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
129 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
find_package(Boost REQUIRED) | ||
find_package(Catch2 REQUIRED) | ||
|
||
add_executable(mcfp-unit-test ${CMAKE_CURRENT_SOURCE_DIR}/unit-test.cpp) | ||
|
||
target_link_libraries(mcfp-unit-test mcfp::mcfp Boost::boost) | ||
target_link_libraries(mcfp-unit-test mcfp::mcfp) | ||
|
||
if(${Catch2_VERSION} VERSION_GREATER_EQUAL 3.0.0) | ||
target_compile_definitions(mcfp-unit-test PUBLIC CATCH22=0) | ||
else() | ||
target_compile_definitions(mcfp-unit-test PUBLIC CATCH22=1) | ||
endif() | ||
|
||
if(MSVC) | ||
# Specify unwind semantics so that MSVC knowns how to handle exceptions | ||
target_compile_options(mcfp-unit-test PRIVATE /EHsc) | ||
endif() | ||
|
||
add_test(NAME mcfp-unit-test | ||
COMMAND $<TARGET_FILE:mcfp-unit-test> -- ${CMAKE_CURRENT_SOURCE_DIR}) | ||
COMMAND $<TARGET_FILE:mcfp-unit-test> --data-dir ${CMAKE_CURRENT_SOURCE_DIR}) |
Oops, something went wrong.