gperftools/cmake/DefineTargetVariables.cmake

15 lines
683 B
CMake
Raw Normal View History

2017-11-03 13:10:27 +00:00
if(NOT COMMAND check_cxx_source_compiles)
include(CheckCXXSourceCompiles)
2017-11-03 13:10:27 +00:00
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)
2017-11-03 13:10:27 +00:00
endmacro()