Skip to content

Commit

Permalink
fix: Rename CMake KDBINDINGS_ENABLE_WARN_UNUSED (#83)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
LeonMatthesKDAB authored Jun 14, 2024
1 parent f9d19dc commit b0cfb37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions src/kdbindings/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
# Contact KDAB at <[email protected]> for commercial licensing options.
#

option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" ON)

set(HEADERS
binding.h
binding_evaluator.h
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit b0cfb37

Please sign in to comment.