gperftools/cmake/DefineTargetVariables.cmake
Aliaksey Kandratsenka c2f60400a8 prefer backtrace() on OSX
It seems to work and _Unwind_Backtrace which is configured otherwise
doesn't.
2021-02-28 17:52:17 -08:00

16 lines
751 B
CMake

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)
check_cxx_source_compiles("int main() { return __APPLE__; }" OSX)
endmacro()