summaryrefslogtreecommitdiffstats
path: root/cmake/module/runfile.cmake
diff options
context:
space:
mode:
authorAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-03 11:52:41 +0700
committerAlexey Gavrilov <alexey.gavrilov@mail.com>2026-07-03 11:52:41 +0700
commit4b51da0ae181ded262ff7609bd0baac67a4e92ba (patch)
treeb2ed80261d7fa438ac1ca206e9e79db2fea42183 /cmake/module/runfile.cmake
parent0d1d78eb82075c9543aa06af576825902e8ec52f (diff)
File write functions changes
In `outFeaturesToFile` function toolset is appends to a resulting file (cmake toolchain file or arch, compiler if previous is not specify). Toolset mention needs to filter available features for a specific platform. FEATURE_<feature>_IS_ENABLING var also provides when <feature> already enabled. Build type is not in toolset now. That means to parse `CMAKE_BUILD_TYPE` anyway when toolset is processing even if `CMAKE_TOOLSCHAIN_FILE` is specified. Signed-off-by: Alexey Gavrilov <alexey.gavrilov@mail.com>
Diffstat (limited to 'cmake/module/runfile.cmake')
-rw-r--r--cmake/module/runfile.cmake8
1 files changed, 4 insertions, 4 deletions
diff --git a/cmake/module/runfile.cmake b/cmake/module/runfile.cmake
index af196aa..f9d1640 100644
--- a/cmake/module/runfile.cmake
+++ b/cmake/module/runfile.cmake
@@ -24,25 +24,25 @@ macro(parseFeatures vars outfile)
endmacro()
macro(parseToolset vars outfile)
+ convertCacheVarIntoArg(CMAKE_BUILD_TYPE ${vars} ${outfile})
if("CMAKE_TOOLCHAIN_FILE" IN_LIST ${vars} AND NOT ${CMAKE_TOOLCHAIN_FILE})
cmake_path(GET CMAKE_TOOLCHAIN_FILE FILENAME TOOLCHAIN_FILE_NAME)
file(APPEND ${${outfile}}
" -DCMAKE_TOOLCHAIN_FILE="
"${ObjectiveProject_SOURCE_DIR}/cmake/toolchain/${TOOLCHAIN_FILE_NAME}")
else()
- # If toolchain file isn't specifies, there are three things to pass
- # in cmake: architecture, c++ compiler and build type
+ # If toolchain file isn't specifies, there are two things to pass
+ # in cmake: architecture and c++ compiler
convertCacheVarIntoArg(ObjectiveProject_ARCHITECTURE ${vars} ${outfile})
cmake_path(GET CMAKE_CXX_COMPILER FILENAME COMPILER_EXECUTABLE)
if(NOT "${COMPILER_EXECUTABLE}" STREQUAL "")
file(APPEND ${${outfile}}
" -DCMAKE_CXX_COMPILER=${COMPILER_EXECUTABLE}")
endif()
- convertCacheVarIntoArg(CMAKE_BUILD_TYPE ${vars} ${outfile})
endif()
endmacro()
-function(confwrite)
+function(writerunfile)
set(OUT_FILE "${CMAKE_BINARY_DIR}/${CONFFILE_NAME}")
get_directory_property(cacheVars CACHE_VARIABLES)