From ccb9dbd3f78d9f06826560bd54519bab3477947a Mon Sep 17 00:00:00 2001 From: Alexey Gavrilov Date: Thu, 23 Jul 2026 14:37:44 +0700 Subject: Include cmake feature module in the build routine Add predicate `ifFeatureEnables` that checks feature is define or not, and return accordingly boolean value. Consider some cmake objective targets as features. Populate information to these targets, and provides in particular file `CMakeFeatures.txt`. Cpuid, MSR, ACPI and driver VGA in text mode they are. Signed-off-by: Alexey Gavrilov --- CMakeLists.txt | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 383bc13..5e55185 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -59,8 +59,17 @@ list(APPEND CMAKE_MODULE_PATH ) include(feature) + +# Propagate project information to feature module +featureProjectDataAssign( + "${OBJECTIVE_SUPPORTED_PROCESSORS}" + "${ObjectiveProject_SOURCE_DIR}" + "${ObjectiveProject_ARCHITECTURE}" + "cmake/toolchain" +) + include(metadata) -include(runfile) +include(dexport) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -91,6 +100,7 @@ add_library(ASM_NASM_COMPILER_REQUIREMENTS INTERFACE) # Target with linker requirements add_library(CXX_LINKER_REQUIREMENTS INTERFACE) + target_link_options(CXX_LINKER_REQUIREMENTS INTERFACE ${ObjectiveProject_CXX_FLAGS} ) @@ -144,4 +154,4 @@ target_link_libraries(Objective PRIVATE target_link_libraries(Objective PRIVATE CXX_LINKER_REQUIREMENTS) outFeaturesToFile() -writerunfile() +definesFileExport() -- cgit v1.2.3