1 # - Define macro to check GCC x86 inline ASM support
3 # GMX_TEST_INLINE_ASM_GCC_X86(VARIABLE)
5 # VARIABLE will be set to true if GCC x86 inline asm works.
7 # Remember to have a cmakedefine for it too...
9 MACRO(GMX_TEST_INLINE_ASM_GCC_X86 VARIABLE)
10 IF(NOT DEFINED ${VARIABLE})
12 MESSAGE(STATUS "Checking for GCC x86 inline asm")
14 TRY_COMPILE(${VARIABLE} "${CMAKE_BINARY_DIR}"
15 "${CMAKE_SOURCE_DIR}/cmake/TestInlineASM_gcc_x86.c")
18 MESSAGE(STATUS "Checking for GCC x86 inline asm - supported")
19 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for GCC x86 inline asm" FORCE)
21 MESSAGE(STATUS "Checking for GCC x86 inline asm - not supported")
22 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for GCC x86 inline asm" FORCE)
25 ENDIF(NOT DEFINED ${VARIABLE})
26 ENDMACRO(GMX_TEST_INLINE_ASM_GCC_X86 VARIABLE)
30 # - Define macro to check MSVC x86 inline ASM support
32 # GMX_TEST_INLINE_ASM_MSVC_X86(VARIABLE)
34 # VARIABLE will be set to true if MSVC x86 inline asm works.
36 # Remember to have a cmakedefine for it too...
38 MACRO(GMX_TEST_INLINE_ASM_MSVC_X86 VARIABLE)
39 IF(NOT DEFINED ${VARIABLE})
41 MESSAGE(STATUS "Checking for MSVC x86 inline asm")
43 TRY_COMPILE(${VARIABLE} "${CMAKE_BINARY_DIR}"
44 "${CMAKE_SOURCE_DIR}/cmake/TestInlineASM_msvc_x86.c")
47 MESSAGE(STATUS "Checking for MSVC x86 inline asm - supported")
48 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for MSVC x86 inline asm" FORCE)
50 MESSAGE(STATUS "Checking for MSVC x86 inline asm - not supported")
51 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for MSVC x86 inline asm" FORCE)
54 ENDIF(NOT DEFINED ${VARIABLE})
55 ENDMACRO(GMX_TEST_INLINE_ASM_MSVC_X86 VARIABLE)