From 8edeea4e838573b689d621425044d4efc6ed7f54 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Sat, 25 Nov 2023 15:37:06 +0800 Subject: [PATCH] DefineTargetVariables.cmake: fix for macOS --- cmake/DefineTargetVariables.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cmake/DefineTargetVariables.cmake b/cmake/DefineTargetVariables.cmake index ada0152..38916c5 100644 --- a/cmake/DefineTargetVariables.cmake +++ b/cmake/DefineTargetVariables.cmake @@ -4,10 +4,17 @@ endif() macro(define_target_variables) check_cxx_source_compiles("int main() { return __i386__; }" i386) - check_cxx_source_compiles("int main() { return __s390__; }" s390) - check_cxx_source_compiles("int main() { return __PPC64__; }" PPC64) check_cxx_source_compiles("int main() { return __x86_64__; }" x86_64) + check_cxx_source_compiles("int main() { return __s390__; }" s390) +if(APPLE) + check_cxx_source_compiles("int main() { return __arm64__; }" ARM) + check_cxx_source_compiles("int main() { return __ppc64__; }" PPC64) + check_cxx_source_compiles("int main() { return __ppc__; }" PPC) +else() check_cxx_source_compiles("int main() { return __arm__; }" ARM) + check_cxx_source_compiles("int main() { return __PPC64__; }" PPC64) + check_cxx_source_compiles("int main() { return __PPC__; }" PPC) +endif() check_cxx_source_compiles("int main() { return __FreeBSD__; }" FreeBSD) check_cxx_source_compiles("int main() { return __MINGW__; }" MINGW) check_cxx_source_compiles("int main() { return __linux; }" LINUX)