summaryrefslogtreecommitdiff
path: root/cmake/DefineTargetVariables.cmake
blob: 5b7c5daf6d886d666b91419fc074c18e108bc9fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
if(NOT COMMAND check_cxx_source_compiles)
  include(CheckCXXSourceCompiles)
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 __arm__; }" ARM)
  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)
endmacro()