From 5e0b3974addc45b7b00b99bcdac7aebfa7254e7b Mon Sep 17 00:00:00 2001 From: Daniel <d.hornung@indiscale.com> Date: Wed, 13 Oct 2021 12:29:22 +0200 Subject: [PATCH] WIP: Debug builds with dependencies. --- Makefile | 10 ++++++++-- doc/README_SETUP.md | 2 +- test/CMakeLists.txt | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index aedb508..7eebeff 100644 --- a/Makefile +++ b/Makefile @@ -58,16 +58,22 @@ conan-install: conan install . -s $(CONAN_SETTINGS) --build=missing) .PHONY: conan-install +conan-install-debug: + conan install . -s $(CONAN_SETTINGS) -s build_type=Debug || \ + (echo "'conan install' failed, trying to build from sources..."; \ + conan install . -s $(CONAN_SETTINGS) -s build_type=Debug --build=missing) +.PHONY: conan-install-debug + 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 +.PHONY: conan-create-debug conan: conan-install conan-create .PHONY: conan -conan-debug: conan-install conan-create-debug +conan-debug: conan-install-debug conan-create-debug .PHONY: conan-debug diff --git a/doc/README_SETUP.md b/doc/README_SETUP.md index c0b56bf..bed634a 100644 --- a/doc/README_SETUP.md +++ b/doc/README_SETUP.md @@ -81,7 +81,7 @@ Depending on the clang version it might be necessary to use additionally the fol For the tests there is a slightly different setup required (with option `-D CMAKE_BUILD_TYPE=Debug`) 1. `mkdir build && cd build/` -2. `conan install .. -s "compiler.libcxx=libstdc++11"` +2. `conan install .. -s "compiler.libcxx=libstdc++11"` (on MacOS: ` -s compiler.cppstd=17`) 3. `cmake -B . -D CMAKE_BUILD_TYPE=Debug ..` * If your clang-format version is too old, formatting, linting etc. can be skipped: `cmake -B . -D CMAKE_BUILD_TYPE=Debug -D SKIP_LINTING=ON ..` diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index aefe684..07a2092 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -88,6 +88,7 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/caosdb_test_utility.h.in include(CodeCoverage) +# TODO: Also test for gcov linking path, or add SKIP_COV option. if (LCOV_PATH) message(STATUS "Found LCOV: ${LCOV_PATH}") target_link_libraries(caosdb gcov) -- GitLab