blob: ada015272187497d237b8bed5762da4dd988e285 [file] [log] [blame]
Brian Silverman20350ac2021-11-17 18:19:55 -08001if(NOT COMMAND check_cxx_source_compiles)
2 include(CheckCXXSourceCompiles)
3endif()
4
5macro(define_target_variables)
6 check_cxx_source_compiles("int main() { return __i386__; }" i386)
7 check_cxx_source_compiles("int main() { return __s390__; }" s390)
8 check_cxx_source_compiles("int main() { return __PPC64__; }" PPC64)
9 check_cxx_source_compiles("int main() { return __x86_64__; }" x86_64)
10 check_cxx_source_compiles("int main() { return __arm__; }" ARM)
11 check_cxx_source_compiles("int main() { return __FreeBSD__; }" FreeBSD)
12 check_cxx_source_compiles("int main() { return __MINGW__; }" MINGW)
13 check_cxx_source_compiles("int main() { return __linux; }" LINUX)
14 check_cxx_source_compiles("int main() { return __APPLE__; }" OSX)
15endmacro()