From 0859add4a3d2d826b417d7ddbd2193afd9712ce6 Mon Sep 17 00:00:00 2001 From: Leon Matthes Date: Fri, 14 Jun 2024 14:40:32 +0200 Subject: [PATCH] fix: Rename CMake KDBINDINGS_ENABLE_WARN_UNUSED This options had a different capitalization from our other options. So bring it in line, at least in CMake. For the preprocessor definition I think we should stick with the all caps naming. --- CMakeLists.txt | 1 + src/kdbindings/CMakeLists.txt | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f57d74..d30b634 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ include(FeatureSummary) option(${PROJECT_NAME}_TESTS "Build the tests" ON) option(${PROJECT_NAME}_EXAMPLES "Build the examples" ON) option(${PROJECT_NAME}_DOCS "Build the API documentation" OFF) +option(${PROJECT_NAME}_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" ON) option(${PROJECT_NAME}_ERROR_ON_WARNING "Enable all compiler warnings and treat them as errors" OFF) list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) diff --git a/src/kdbindings/CMakeLists.txt b/src/kdbindings/CMakeLists.txt index 42d4acf..dba8f5c 100644 --- a/src/kdbindings/CMakeLists.txt +++ b/src/kdbindings/CMakeLists.txt @@ -6,8 +6,6 @@ # Contact KDAB at for commercial licensing options. # -option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" ON) - set(HEADERS binding.h binding_evaluator.h @@ -37,7 +35,7 @@ set_target_properties(KDBindings PROPERTIES INTERFACE_COMPILE_FEATURES cxx_std_17 ) -if(KDBINDINGS_ENABLE_WARN_UNUSED) +if(KDBindings_ENABLE_WARN_UNUSED) target_compile_definitions(KDBindings INTERFACE KDBINDINGS_ENABLE_WARN_UNUSED=1) endif()