summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-16 10:44:45 +0700
committerAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-16 10:55:15 +0700
commitc84f8720b62288e8e0a537802e12131ca4713805 (patch)
treee123334a3adfee295acf422371df151315139732 /cmake
parentd956972bff16b495dbeb4d8fe9218c37423dc378 (diff)
Cmake feature module duplicates check
Signed-off-by: Alexey Gavrilov <alexey.gavrilov@mail.com>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/module/feature.cmake16
1 files changed, 15 insertions, 1 deletions
diff --git a/cmake/module/feature.cmake b/cmake/module/feature.cmake
index c8dd56a..380a88d 100644
--- a/cmake/module/feature.cmake
+++ b/cmake/module/feature.cmake
@@ -52,6 +52,7 @@ createFeatureModuleFunction("featureModuleInitialization" ""
CACHE STRING "Available feature fields")]]
)
+# Run variable initialization if module is work.
featureModuleInitialization()
createFeatureModuleFunction("startFeatureRecording" "target"
@@ -60,11 +61,24 @@ createFeatureModuleFunction("startFeatureRecording" "target"
GLOBAL PROPERTY
POPULATING_FEATURES
)
+ get_property(
+ FEATURES_LIST_PROPERTY
+ GLOBAL PROPERTY
+ FEATURES_LIST
+ )
+
+ # Process duplicating features. Error, if it is exists.
+ if(
+ target IN_LIST FEATURES_LIST_PROPERTY
+ OR target IN_LIST POPULATING_FEATURES_PROPERTY
+ )
+ message(SEND_ERROR "\\"\${target}\\" feature is duplicate")
+ endif()
if(TARGET \${target})
list(APPEND POPULATING_FEATURES_PROPERTY \${target})
else()
- message(WARNING "\${target} isn't a target")
+ message(SEND_ERROR "\${target} isn't a target. Feature doesn't created.")
endif()
set_property(