Brian Silverman | 20350ac | 2021-11-17 18:19:55 -0800 | [diff] [blame] | 1 | if(NOT COMMAND check_cxx_source_compiles) |
| 2 | include(CheckCXXSourceCompiles) |
| 3 | endif() |
| 4 | |
| 5 | macro(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) |
| 15 | endmacro() |