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)
26 ENDIF(NOT DEFINED ${VARIABLE})
27 ENDMACRO(GMX_TEST_INLINE_ASM_GCC_X86 VARIABLE)
31 # - Define macro to check MSVC x86 inline ASM support
33 # GMX_TEST_INLINE_ASM_MSVC_X86(VARIABLE)
35 # VARIABLE will be set to true if MSVC x86 inline asm works.
37 # Remember to have a cmakedefine for it too...
39 MACRO(GMX_TEST_INLINE_ASM_MSVC_X86 VARIABLE)
40 IF(NOT DEFINED ${VARIABLE})
42 MESSAGE(STATUS "Checking for MSVC x86 inline asm")
44 TRY_COMPILE(${VARIABLE} "${CMAKE_BINARY_DIR}"
45 "${CMAKE_SOURCE_DIR}/cmake/TestInlineASM_msvc_x86.c")
48 MESSAGE(STATUS "Checking for MSVC x86 inline asm - supported")
49 set(${VARIABLE} 1 CACHE INTERNAL "Result of test for MSVC x86 inline asm" FORCE)
51 MESSAGE(STATUS "Checking for MSVC x86 inline asm - not supported")
52 set(${VARIABLE} 0 CACHE INTERNAL "Result of test for MSVC x86 inline asm" FORCE)
55 ENDIF(NOT DEFINED ${VARIABLE})
56 ENDMACRO(GMX_TEST_INLINE_ASM_MSVC_X86 VARIABLE)