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 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/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) 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