2017-11-03 13:10:27 +00:00
|
|
|
if(NOT COMMAND check_cxx_source_compiles)
|
2017-11-05 17:23:42 +00:00
|
|
|
include(CheckCXXSourceCompiles)
|
2017-11-03 13:10:27 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
macro(define_target_variables)
|
2017-11-05 17:23:42 +00:00
|
|
|
check_cxx_source_compiles("int main() { return __i386__; }" i386)
|
|
|
|
check_cxx_source_compiles("int main() { return __x86_64__; }" x86_64)
|
2023-11-25 07:37:06 +00:00
|
|
|
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()
|
2017-11-05 17:23:42 +00:00
|
|
|
check_cxx_source_compiles("int main() { return __arm__; }" ARM)
|
2023-11-25 07:37:06 +00:00
|
|
|
check_cxx_source_compiles("int main() { return __PPC64__; }" PPC64)
|
|
|
|
check_cxx_source_compiles("int main() { return __PPC__; }" PPC)
|
|
|
|
endif()
|
2017-11-05 17:23:42 +00:00
|
|
|
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)
|
2021-03-01 01:52:17 +00:00
|
|
|
check_cxx_source_compiles("int main() { return __APPLE__; }" OSX)
|
2017-11-03 13:10:27 +00:00
|
|
|
endmacro()
|