summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2021-06-07 05:38:38 +0200
committerSven Gothel <[email protected]>2021-06-07 05:38:38 +0200
commitcd19b0e0661fc1ff6014317cc5ba97f8878ac73a (patch)
tree2e22dc83d467293864b9ef2fd446c4d44fcce538
parent7e0bfc56c1bd4cc70b16d3aaef786c5e6517c75c (diff)
Use local catch2 build (w/ rtti as required by botan); No need to subdir into jaulibv0.1.0
-rw-r--r--CMakeLists.txt2
-rw-r--r--scripts/build.sh8
-rw-r--r--test/elevator/CMakeLists.txt16
3 files changed, 19 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 64c29a6..f69a53a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -35,7 +35,7 @@ set (elevator_DOCS_DIR documentation)
find_path (SYSTEM_USR_DIR "stdlib.h")
include_directories (${SYSTEM_USR_DIR})
-add_subdirectory (jaulib EXCLUDE_FROM_ALL)
+# add_subdirectory (jaulib EXCLUDE_FROM_ALL)
# add_subdirectory (jaulib)
add_subdirectory (src/elevator)
diff --git a/scripts/build.sh b/scripts/build.sh
index 1861cf6..6009fdc 100644
--- a/scripts/build.sh
+++ b/scripts/build.sh
@@ -34,8 +34,10 @@ buildit() {
mkdir -p build-$archabi
cd build-$archabi
# CLANG_ARGS="-DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++"
- # cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON ..
- cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON ..
+
+ cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON ..
+ #cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON ..
+
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DUSE_STRIP=OFF ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DUSE_STRIP=ON -DJAVAC_DEBUG_ARGS="none" ..
@@ -45,7 +47,7 @@ buildit() {
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON -DINSTRUMENTATION=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON -DINSTRUMENTATION_UNDEFINED=ON ..
# cmake $CLANG_ARGS -DCMAKE_INSTALL_PREFIX=$rootdir/dist-$archabi -DBUILDJAVA=ON -DBUILDEXAMPLES=ON -DBUILD_TESTING=ON -DDEBUG=ON -DINSTRUMENTATION_THREAD=ON ..
- make -j $CPU_COUNT install all
+ make -j $CPU_COUNT install test
if [ $? -eq 0 ] ; then
echo "BUILD SUCCESS $bname $archabi"
# cp -a examples/* $rootdir/dist-$archabi/bin
diff --git a/test/elevator/CMakeLists.txt b/test/elevator/CMakeLists.txt
index 4baf057..5454970 100644
--- a/test/elevator/CMakeLists.txt
+++ b/test/elevator/CMakeLists.txt
@@ -1,9 +1,19 @@
include_directories(
${PROJECT_SOURCE_DIR}/jaulib/include
- ${PROJECT_SOURCE_DIR}/include/amalgamation-amd64
+ ${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
@@ -15,8 +25,8 @@ set( TARGETS_IDIOMATIC_EXAMPLES ${BASENAMES_IDIOMATIC_EXAMPLES} )
foreach( name ${TARGETS_IDIOMATIC_EXAMPLES} )
add_executable(${name} ${name}.cpp)
- target_link_libraries(${name} elevator catch2)
- add_dependencies(${name} elevator catch2)
+ target_link_libraries(${name} elevator catch2l)
+ add_dependencies(${name} elevator catch2l)
add_test (NAME ${name} COMMAND ${name})
endforeach()