From 498c6f8e2b833cdebd5ac09a73b654b26fcad49a Mon Sep 17 00:00:00 2001 From: emeric Date: Sun, 17 Mar 2024 23:37:21 +0100 Subject: [PATCH 1/3] Added option to silent useless warnings --- .clang-tidy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 9018ceaa..43c1aa0e 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -5,7 +5,9 @@ HeaderFilterRegex: '' AnalyzeTemporaryDtors: false FormatStyle: none User: '' -CheckOptions: +CheckOptions: + - key: misc-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic + value: '1' - key: readability-identifier-naming.IgnoreClassesWithAllMemberVariablesBeingPublic value: '1' - key: cppcoreguidelines-avoid-do-while.IgnoreMacros From 7315063a30d45621138b073e4d46835d5856cd37 Mon Sep 17 00:00:00 2001 From: emeric Date: Tue, 19 Mar 2024 22:48:50 +0100 Subject: [PATCH 2/3] Fixed bad merge --- src/libs/core/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libs/core/CMakeLists.txt b/src/libs/core/CMakeLists.txt index 9bfcb211..c8b5ff50 100644 --- a/src/libs/core/CMakeLists.txt +++ b/src/libs/core/CMakeLists.txt @@ -38,7 +38,7 @@ target_link_libraries(lmscore PUBLIC Wt::Wt ) -install(TARGETS lmscore DESTINATION lib ${CMAKE_INSTALL_LIBDIR}) +install(TARGETS lmscore DESTINATION ${CMAKE_INSTALL_LIBDIR}) if(BUILD_TESTING) add_subdirectory(test) From 717f71254eff4c9aa65565b2c54128833455c6d9 Mon Sep 17 00:00:00 2001 From: emeric Date: Tue, 19 Mar 2024 22:49:50 +0100 Subject: [PATCH 3/3] Fixed build when CMAKE_BUILD_TYPE is set to None --- CMakeLists.txt | 4 ++++ src/libs/database/CMakeLists.txt | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0da122b0..2f06fbc8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,10 @@ if (BUILD_BENCHMARKS) message(STATUS "Building benchmarks") endif() +if (NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DNDEBUG) +endif() + add_subdirectory(src) install(DIRECTORY approot DESTINATION share/lms) diff --git a/src/libs/database/CMakeLists.txt b/src/libs/database/CMakeLists.txt index 30fc9a7c..b5e5a194 100644 --- a/src/libs/database/CMakeLists.txt +++ b/src/libs/database/CMakeLists.txt @@ -23,8 +23,8 @@ add_library(lmsdatabase SHARED impl/Utils.cpp ) -if (CMAKE_BUILD_TYPE MATCHES "Debug") -target_sources(lmsdatabase PRIVATE impl/TransactionChecker.cpp) +if (CMAKE_BUILD_TYPE STREQUAL "Debug") + target_sources(lmsdatabase PRIVATE impl/TransactionChecker.cpp) endif() target_include_directories(lmsdatabase INTERFACE