diff --git a/CMakeLists.txt b/CMakeLists.txt index 0176a56635fbd890d3e71f8161ba2cc736aa27e9..1fb6d40f541016a4098eb2893e128c6c83354fb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -147,17 +147,19 @@ add_custom_command( ############################################################################### if("${CMAKE_BUILD_TYPE}" MATCHES "Debug") - add_library(caosdb_grpc SHARED ${GRPC_GENERATED}) - add_library(caosdb SHARED ${libcaosdb_INCL} ${libcaosdb_SRC}) + add_library(caosdb_grpc SHARED ${GRPC_GENERATED}) + add_library(caosdb SHARED ${libcaosdb_INCL} ${libcaosdb_SRC}) target_link_libraries(caosdb caosdb_grpc) set(LIBCAOSDB caosdb caosdb_grpc) + target_include_directories(caosdb_grpc SYSTEM PUBLIC + ${CONAN_INCLUDE_DIRS} + ) target_include_directories(caosdb_grpc PUBLIC $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> - ${CONAN_INCLUDE_DIRS} ) else() add_library(caosdb @@ -167,11 +169,13 @@ endif() target_link_libraries(caosdb ${CONAN_LIBS} ) +target_include_directories(caosdb SYSTEM PUBLIC + ${CONAN_INCLUDE_DIRS} +) target_include_directories(caosdb PUBLIC $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> - ${CONAN_INCLUDE_DIRS} ) add_library(ccaosdb SHARED src/ccaosdb.cpp) @@ -181,11 +185,13 @@ target_link_libraries(ccaosdb ) add_executable(ccaosdbcli EXCLUDE_FROM_ALL src/ccaosdbcli.c) +target_include_directories(ccaosdbcli SYSTEM PUBLIC + ${CONAN_INCLUDE_DIRS} +) target_include_directories(ccaosdbcli PUBLIC $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> - ${CONAN_INCLUDE_DIRS} ) target_link_libraries(ccaosdbcli ccaosdb @@ -193,11 +199,13 @@ target_link_libraries(ccaosdbcli ) add_executable(cxxcaosdbcli EXCLUDE_FROM_ALL src/cxxcaosdbcli.cpp) +target_include_directories(cxxcaosdbcli SYSTEM PUBLIC + ${CONAN_INCLUDE_DIRS} +) target_include_directories(cxxcaosdbcli PUBLIC $<BUILD_INTERFACE:${libcaosdb_SOURCE_DIR}/include> $<BUILD_INTERFACE:${libcaosdb_BINARY_DIR}/include> $<INSTALL_INTERFACE:include> - ${CONAN_INCLUDE_DIRS} ) target_link_libraries(cxxcaosdbcli ${LIBCAOSDB} @@ -205,7 +213,6 @@ target_link_libraries(cxxcaosdbcli ) - ####################################################### ### LINTING with CLANG-TIDY and INCLUDE-WHAT-YOU-USE ####################################################### diff --git a/Makefile b/Makefile index 819b9ca2910ce5571f1a80412f655f41afa023e5..aedb5080279c76c385f8a945aff2e3a5bb2c36f7 100644 --- a/Makefile +++ b/Makefile @@ -62,5 +62,12 @@ conan-create: conan create . -s $(CONAN_SETTINGS) .PHONY: conan-create +conan-create-debug: + conan create . -s $(CONAN_SETTINGS) -s build_type=Debug +.PHONY: conan-create + conan: conan-install conan-create .PHONY: conan + +conan-debug: conan-install conan-create-debug +.PHONY: conan-debug diff --git a/test/test_connection.cpp b/test/test_connection.cpp index 99391536edf031fbe4a326f56e24f68e5a50b5d3..97a86df3938fd047161523e36470f90fa5f7248f 100644 --- a/test/test_connection.cpp +++ b/test/test_connection.cpp @@ -26,7 +26,7 @@ #include "caosdb_test_utility.h" // for EXPECT_THROW_MESSAGE, TEST_... #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for SuiteApiResolver, TestPartR... -#include "gtest/gtest_pred_impl.h" // for AssertionResult, TestInfo +#include <gtest/gtest_pred_impl.h> // for AssertionResult, TestInfo #include <memory> // for allocator, operator!=, shar... #include <string> // for operator+, string diff --git a/test/test_info.cpp b/test/test_info.cpp index a95870200ac51343f86b7bb5ff4c0c433d692f0c..f73398b21c018bfa1803073926f6c982e6bb02fc 100644 --- a/test/test_info.cpp +++ b/test/test_info.cpp @@ -24,7 +24,7 @@ #include "caosdb/info/v1alpha1/main.pb.h" // for VersionInfo #include <gtest/gtest-message.h> // for Message #include <gtest/gtest-test-part.h> // for TestPartResult, SuiteApiRe... -#include "gtest/gtest_pred_impl.h" // for Test, EXPECT_EQ, TEST +#include <gtest/gtest_pred_impl.h> // for Test, EXPECT_EQ, TEST #include <memory> // for allocator namespace caosdb::info { diff --git a/test_package/CMakeLists.txt b/test_package/CMakeLists.txt index d11580a845a3660e22be3ade1a3cc04cb95f1dd3..d9ed76ec3cbb672e838dff60b06c408a0308fbb7 100644 --- a/test_package/CMakeLists.txt +++ b/test_package/CMakeLists.txt @@ -33,6 +33,9 @@ foreach (i RANGE "${len_test_cases}") ${CONAN_LIBS_GTEST} ${CONAN_LIBS_GRPC} ${CONAN_LIBS_ABSEIL} ${CONAN_LIBS_OPENSSL} ${CONAN_LIBS_C-ARES} ${CONAN_LIBS_BZIP2} ${CONAN_LIBS_PROTOBUF} ${CONAN_LIBS_ZLIB}) + if("${CMAKE_BUILD_TYPE}" MATCHES "Debug") + target_link_libraries(${test_case_name} PRIVATE caosdb_grpc) + endif() target_include_directories(${test_case_name} PUBLIC ${CONAN_INCLUDE_DIRS}) set_target_properties(${test_case_name} PROPERTIES