diff options
| author | Sergey <sergey@solidstatenetworks.com> | 2026-02-16 20:42:02 -0700 |
|---|---|---|
| committer | Hans Kristian Rosbach <hk-github@circlestorm.org> | 2026-02-17 21:12:48 +0100 |
| commit | 4844fe1a0bac37cacb54e4ec678e6a25544244ee (patch) | |
| tree | 9cdf4650c59518c913462836df407a1949234337 | |
| parent | fcd961817f87e0c52ed173e6c0866437becd6fca (diff) | |
| download | Project-Tick-4844fe1a0bac37cacb54e4ec678e6a25544244ee.tar.gz Project-Tick-4844fe1a0bac37cacb54e4ec678e6a25544244ee.zip | |
cmake: Fix ARCH is empty in detect-arch
The both `CMAKE_C_COMPILER_TARGET` and `CMAKE_SYSTEM_PROCESSOR` are undefined
while configuring UWP/WinRT build with Clang:
`-G Ninja -D CMAKE_SYSTEM_NAME=WindowsStore`.
These variables are undefined because `-m` is not set to Clang.
`CMAKE_C_COMPILER_ARCHITECTURE_ID` could be used, but it would cause a more
significant change of the cmake script.
| -rw-r--r-- | cmake/detect-arch.cmake | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/detect-arch.cmake b/cmake/detect-arch.cmake index ac798c67fb..991fe18296 100644 --- a/cmake/detect-arch.cmake +++ b/cmake/detect-arch.cmake @@ -8,7 +8,9 @@ elseif(MSVC) set(ARCH ${MSVC_C_ARCHITECTURE_ID}) elseif(EMSCRIPTEN) set(ARCH "wasm32") -else() +endif() + +if(NOT ARCH OR ARCH STREQUAL "") # Compile detect-arch.c and read the architecture name from the binary try_compile( COMPILE_RESULT |
