use function instead of macro
Some checks failed
eden-license / license-header (pull_request) Failing after 26s
Some checks failed
eden-license / license-header (pull_request) Failing after 26s
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
8d80349968
commit
69a3cc5399
1 changed files with 5 additions and 5 deletions
|
@ -40,7 +40,7 @@ if (CMAKE_OSX_ARCHITECTURES)
|
|||
return()
|
||||
endif()
|
||||
|
||||
function(detect_architecture symbol arch)
|
||||
macro(detect_architecture symbol arch)
|
||||
if (NOT DEFINED ARCHITECTURE)
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
||||
|
@ -52,9 +52,9 @@ function(detect_architecture symbol arch)
|
|||
add_definitions(-DARCHITECTURE_${arch}=1)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
endmacro()
|
||||
|
||||
macro(DetectArchitecture)
|
||||
function(DetectArchitecture)
|
||||
detect_architecture("__ARM64__" arm64)
|
||||
detect_architecture("__aarch64__" arm64)
|
||||
detect_architecture("_M_ARM64" arm64)
|
||||
|
@ -102,5 +102,5 @@ macro(DetectArchitecture)
|
|||
add_definitions(-DARCHITECTURE_GENERIC=1)
|
||||
endif()
|
||||
|
||||
message(STATUS "Target architecture(s): ${ARCHITECTURE}")
|
||||
endmacro()
|
||||
message(STATUS "[DetectArchitecture] Target architecture(s): ${ARCHITECTURE}")
|
||||
endfunction()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue