summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-23 14:37:44 +0700
committerAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-23 17:55:20 +0700
commitccb9dbd3f78d9f06826560bd54519bab3477947a (patch)
tree70a5a4ddb9ff59ba334000c0c87d1e0299b408a7 /CMakeLists.txt
parentbfab70232fb99d08131c0da3a95b98174e107999 (diff)
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 <alexey.gavrilov@mail.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 12 insertions, 2 deletions
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()