aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcryptobox/AsmOp.cmake
blob: a0d8b1377ecc23cd0f130b54e2891d606a13c31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Check for assembler option specified

function(asm_op output_var op description)
	SET(asm_code "
	${op}
	")
	file(WRITE "${CMAKE_BINARY_DIR}/asm.S" "${asm_code}")
	try_compile(HAVE_OP 
			"${CMAKE_BINARY_DIR}"
            "${CMAKE_BINARY_DIR}/asm.S"
            CMAKE_FLAGS "-DCMAKE_ASM_LINK_EXECUTABLE='echo not linking now...'")
    #file(REMOVE "${CMAKE_BINARY_DIR}/asm.s")
    
	if(HAVE_OP)
		MESSAGE(STATUS "Compilation of ${description} asm set is supported")
	else()
		MESSAGE(STATUS "Compilation of ${description} asm set is -NOT- supported")
    endif()
    
  	set(${output_var} "${HAVE_OP}" PARENT_SCOPE)
endfunction()