mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-09 08:40:11 -06:00
Add test cases verifying that `CMAKE_APPLE_SILICON_PROCESSOR` set as either a cache or environment variable causes that to be selected as the host architecture. Also verify that sources compile using whatever is selected as the host architecture, even when the explicit setting is not used. Issue: #21554
15 lines
309 B
C
15 lines
309 B
C
#if defined(HOST_ARM64)
|
|
# if !defined(__aarch64__)
|
|
# error "Not compiling as host arm64"
|
|
# endif
|
|
#elif defined(HOST_X86_64)
|
|
# if !defined(__x86_64__)
|
|
# error "Not compiling as host x86_64"
|
|
# endif
|
|
#else
|
|
# error "One of HOST_ARM64 or HOST_X86_64 must be defined."
|
|
#endif
|
|
void default_arch(void)
|
|
{
|
|
}
|