-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move preprocessor macros directly in a standard header file
- Loading branch information
1 parent
c0c23c8
commit 6aa3585
Showing
3 changed files
with
9 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,12 +6,7 @@ | |
# Contact KDAB at <[email protected]> for commercial licensing options. | ||
# | ||
|
||
option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" OFF) | ||
|
||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/cmake/KDBindingsConfig.h.in" | ||
"${CMAKE_BINARY_DIR}/include/KDBindingsConfig.h" | ||
) | ||
option(KDBINDINGS_ENABLE_WARN_UNUSED "Enable warnings for unused ConnectionHandles" ON) | ||
|
||
set(HEADERS | ||
binding.h | ||
|
@@ -27,6 +22,7 @@ set(HEADERS | |
connection_evaluator.h | ||
connection_handle.h | ||
utils.h | ||
KDBindingsConfig.h | ||
) | ||
|
||
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.19.0") | ||
|
@@ -40,10 +36,14 @@ add_library(KDAB::KDBindings ALIAS KDBindings) | |
set_target_properties(KDBindings PROPERTIES | ||
INTERFACE_COMPILE_FEATURES cxx_std_17 | ||
) | ||
|
||
if(KDBINDINGS_ENABLE_WARN_UNUSED) | ||
target_compile_definitions(KDBindings INTERFACE KDBINDINGS_ENABLE_WARN_UNUSED=1) | ||
endif() | ||
|
||
target_include_directories(KDBindings INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..> | ||
$<INSTALL_INTERFACE:include> | ||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/include> # Include the build directory for the configured header | ||
) | ||
if(KDBindings_ERROR_ON_WARNING) | ||
if(MSVC) | ||
|
3 changes: 0 additions & 3 deletions
3
cmake/KDBindingsConfig.h.in → src/kdbindings/KDBindingsConfig.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters