Merge branch release-4-6 into master
[alexxy/gromacs.git] / cmake / gmxDetectTargetArchitecture.cmake
1 # - Define function to detect whether the compiler's target
2 # - architecture is one for which GROMACS has special treatment
3 # - (e.g. kernel acceleration)
4 #
5 # Sets GMX_IS_X86 or GMX_IS_BGQ if targetting that architecture
6
7 function(gmx_detect_target_architecture)
8     try_compile(GMX_IS_X86 ${CMAKE_BINARY_DIR}
9         "${CMAKE_SOURCE_DIR}/cmake/TestX86.c")
10     try_compile(GMX_IS_BGQ ${CMAKE_BINARY_DIR}
11         "${CMAKE_SOURCE_DIR}/cmake/TestBlueGeneQ.c")
12 endfunction()