Skip to content
Snippets Groups Projects
Commit b740e836 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

WIP: Fix CMakeLists.txt of tests for Conan 2.0

Still crashes with weird linker errors regarding boost::test (??)

usr/bin/ld: /home/joscha/.conan2/p/b/boostec508655df7a4/p/lib/libboost_test_exec_monitor.a(test_main.o): in function `test_main_caller::operator()()':
/home/joscha/.conan2/p/boostada19f4305785/s/src/./boost/test/impl/test_main.ipp:34: undefined reference to `test_main(int, char**)'
/usr/bin/ld: /home/joscha/.conan2/p/b/boostec508655df7a4/p/lib/libboost_test_exec_monitor.a(test_main.o): in function `test_main_caller::operator()()':
/home/joscha/.conan2/p/boostada19f4305785/s/src/./boost/test/impl/test_main.ipp:34: undefined reference to `test_main(int, char**)'
collect2: error: ld returned 1 exit status
gmake[3]: *** [test/CMakeFiles/test_data_type.dir/build.make:223: test/test_data_type] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:347: test/CMakeFiles/test_data_type.dir/all] Error 2
gmake[2]: *** Waiting for unfinished jobs....
collect2: error: ld returned 1 exit status
gmake[3]: *** [test/CMakeFiles/test_configuration.dir/build.make:223: test/test_configuration] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:375: test/CMakeFiles/test_configuration.dir/all] Error 2
/usr/bin/ld: /home/joscha/.conan2/p/b/boostec508655df7a4/p/lib/libboost_test_exec_monitor.a(test_main.o): in function `test_main_caller::operator()()':
/home/joscha/.conan2/p/boostada19f4305785/s/src/./boost/test/impl/test_main.ipp:34: undefined reference to `test_main(int, char**)'
/usr/bin/ld: /home/joscha/.conan2/p/b/boostec508655df7a4/p/lib/libboost_test_exec_monitor.a(test_main.o): in function `test_main_caller::operator()()':
/home/joscha/.conan2/p/boostada19f4305785/s/src/./boost/test/impl/test_main.ipp:34: undefined reference to `test_main(int, char**)'
collect2: error: ld returned 1 exit status
gmake[3]: *** [test/CMakeFiles/test_entity.dir/build.make:223: test/test_entity] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:431: test/CMakeFiles/test_entity.dir/all] Error 2
collect2: error: ld returned 1 exit status
gmake[3]: *** [test/CMakeFiles/test_connection.dir/build.make:223: test/test_connection] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:403: test/CMakeFiles/test_connection.dir/all] Error 2
gmake[1]: *** [Makefile:146: all] Error 2
gmake[1]: Leaving directory '/home/joscha/caosdb/src/caosdb-cpplib/build/Debug'
parent 59fa4cef
Branches
Tags
2 merge requests!61Release 0.3.0,!49Resolve "EXTERN: Adapt to Conan 2"
Pipeline #52033 failed
...@@ -51,6 +51,7 @@ set(_CMAKE_CXX_CLANG_TIDY_TEST_CHECKS ...@@ -51,6 +51,7 @@ set(_CMAKE_CXX_CLANG_TIDY_TEST_CHECKS
) )
# add special cmake functions for gtest # add special cmake functions for gtest
find_package(GTest REQUIRED)
include(GoogleTest) include(GoogleTest)
...@@ -63,7 +64,7 @@ foreach (i RANGE "${len_test_cases}") ...@@ -63,7 +64,7 @@ foreach (i RANGE "${len_test_cases}")
set(libcaosdb_TEST_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${test_case_name}.cpp set(libcaosdb_TEST_SRC "${CMAKE_CURRENT_SOURCE_DIR}/${test_case_name}.cpp
${libcaosdb_TEST_SRC}") ${libcaosdb_TEST_SRC}")
target_link_libraries(${test_case_name} target_link_libraries(${test_case_name}
PRIVATE ${LIBCAOSDB} ccaosdb ${CONAN_LIBS_GTEST} ${CONAN_LIBS_BOOST}) PRIVATE ${LIBCAOSDB} ccaosdb gtest::gtest boost::boost)
target_include_directories(${test_case_name} target_include_directories(${test_case_name}
PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
if(_LINTING) if(_LINTING)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment