diff options
| author | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-07-23 14:37:44 +0700 |
|---|---|---|
| committer | Alexey Gavrilov <alexey.gavrilov@mail.com> | 2026-07-23 17:55:20 +0700 |
| commit | ccb9dbd3f78d9f06826560bd54519bab3477947a (patch) | |
| tree | 70a5a4ddb9ff59ba334000c0c87d1e0299b408a7 /kernel/details/CMakeLists.txt | |
| parent | bfab70232fb99d08131c0da3a95b98174e107999 (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 'kernel/details/CMakeLists.txt')
| -rw-r--r-- | kernel/details/CMakeLists.txt | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/kernel/details/CMakeLists.txt b/kernel/details/CMakeLists.txt index ceab7f6..1ecfc06 100644 --- a/kernel/details/CMakeLists.txt +++ b/kernel/details/CMakeLists.txt @@ -16,11 +16,16 @@ * ObjectiveOS. If not, see <https://www.gnu.org/licenses/>. ]] -target_sources(CPUID - PUBLIC - FILE_SET HEADERS - BASE_DIRS - ${CMAKE_CURRENT_LIST_DIR} - FILES - ${CMAKE_CURRENT_LIST_DIR}/Platform.h -) +set(IS_CPUID_DEFINES TRUE) +ifFeatureEnables(CPUID IS_CPUID_DEFINES) + +if(IS_CPUID_DEFINES) + target_sources(CPUID + PUBLIC + FILE_SET HEADERS + BASE_DIRS + ${CMAKE_CURRENT_LIST_DIR} + FILES + ${CMAKE_CURRENT_LIST_DIR}/Platform.h + ) +endif() |
