Merge release-4-6 into master
[alexxy/gromacs.git] / cmake / gmxTestCatamount.cmake
1 # - Define function to check we are compiling for CRAY XT catamount
2 #
3 #  GMX_TEST_CATAMOUNT(VARIABLE)
4 #
5 #  VARIABLE will be set to true if we are compiling for catamount
6 #
7
8 function(GMX_TEST_CATAMOUNT VARIABLE)
9     include(CheckCSourceCompiles)
10     check_c_source_compiles(
11         "int
12 main()
13 {
14 #if defined __QK_USER__
15   return 0;
16 #else
17 #  error not catamount
18 #endif
19 }" CATAMOUNT_COMPILE_OK)
20     set(${VARIABLE} ${CATAMOUNT_COMPILE_OK} PARENT_SCOPE)
21 endfunction()