-
Notifications
You must be signed in to change notification settings - Fork 288
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update catch2 from version 2.13.7 to version 3.7.1
- tests using catch2 are renamed and prefixed with "catch" - tests names prefixed with "perf" or "catch" are no more executed with -c ot -d command line options - the only tests that are executed with -c ot -d command line options are those prefixed with "test" - catch2 is no mode header only. That's why we create a builtin library that is only linked to the tests vp_add_test() cmake macro was modified accordingly
- Loading branch information
Showing
69 changed files
with
26,396 additions
and
18,754 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,6 +1,43 @@ | ||
project(${CATCH2_LIBRARY}) | ||
|
||
set(CATCH2_MAJOR_VERSION 2 PARENT_SCOPE) | ||
set(CATCH2_MINOR_VERSION 13 PARENT_SCOPE) | ||
set(CATCH2_PATCH_VERSION 7 PARENT_SCOPE) | ||
set(CATCH2_MAJOR_VERSION 3 PARENT_SCOPE) | ||
set(CATCH2_MINOR_VERSION 7 PARENT_SCOPE) | ||
set(CATCH2_PATCH_VERSION 1 PARENT_SCOPE) | ||
|
||
vp_include_directories(${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
file(GLOB lib_srcs *.cpp) | ||
file(GLOB lib_hdrs *.hpp) | ||
|
||
add_library(${CATCH2_LIBRARY} STATIC ${lib_srcs} ${lib_hdrs}) | ||
target_compile_definitions(${CATCH2_LIBRARY} PRIVATE "CATCH_AMALGAMATED_CUSTOM_MAIN") | ||
|
||
if(UNIX) | ||
if(CMAKE_COMPILER_IS_GNUCXX OR CV_ICC) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") | ||
endif() | ||
endif() | ||
|
||
if((VISP_CXX_STANDARD EQUAL VISP_CXX_STANDARD_11) AND CXX11_CXX_FLAGS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX11_CXX_FLAGS}") | ||
elseif((VISP_CXX_STANDARD EQUAL VISP_CXX_STANDARD_14) AND CXX14_CXX_FLAGS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX14_CXX_FLAGS}") | ||
elseif((VISP_CXX_STANDARD EQUAL VISP_CXX_STANDARD_17) AND CXX17_CXX_FLAGS) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX17_CXX_FLAGS}") | ||
endif() | ||
|
||
if(ENABLE_SOLUTION_FOLDERS) | ||
set_target_properties(${CATCH2_LIBRARY} PROPERTIES FOLDER "3rdparty") | ||
endif() | ||
|
||
set_target_properties(${CATCH2_LIBRARY} | ||
PROPERTIES OUTPUT_NAME ${CATCH2_LIBRARY} | ||
DEBUG_POSTFIX "${VISP_DEBUG_POSTFIX}" | ||
COMPILE_PDB_NAME ${CATCH2_LIBRARY} | ||
COMPILE_PDB_NAME_DEBUG "${CATCH2_LIBRARY}${VISP_DEBUG_POSTFIX}" | ||
ARCHIVE_OUTPUT_DIRECTORY ${VISP_3P_LIBRARY_OUTPUT_PATH} | ||
) | ||
|
||
if(NOT BUILD_SHARED_LIBS) | ||
vp_install_target(${CATCH2_LIBRARY} EXPORT VISPModules ARCHIVE DESTINATION ${VISP_3P_LIB_INSTALL_PATH} COMPONENT dev) | ||
endif() |
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
Oops, something went wrong.