blob: 54549705a94883151f6a973e363bedd9655b86d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
include_directories(
${PROJECT_SOURCE_DIR}/jaulib/include
${AMALGAMATION_ARCH_INC}
${PROJECT_SOURCE_DIR}/include
)
set (catch2l_LIB_SRCS
${PROJECT_SOURCE_DIR}/jaulib/include/catch2/catch_amalgamated.cpp
)
add_library (catch2l STATIC ${catch2l_LIB_SRCS})
if(CMAKE_COMPILER_IS_GNUCC)
target_compile_options(catch2l PUBLIC "-Wno-error=format-overflow")
endif(CMAKE_COMPILER_IS_GNUCC)
# These examples use the standard separate compilation
set( SOURCES_IDIOMATIC_EXAMPLES
test_01.cpp
test_01_cipherpack.cpp
)
string( REPLACE ".cpp" "" BASENAMES_IDIOMATIC_EXAMPLES "${SOURCES_IDIOMATIC_EXAMPLES}" )
set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} )
add_executable(${name} ${name}.cpp)
target_link_libraries(${name} elevator catch2l)
add_dependencies(${name} elevator catch2l)
add_test (NAME ${name} COMMAND ${name})
endforeach()
|