Exclude building these samples for ARM.
This commit is contained in:
Родитель
012c6cd346
Коммит
73af8f4acb
|
@ -3,5 +3,37 @@
|
|||
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
|
||||
function(detect_architecture symbol arch)
|
||||
if (NOT DEFINED ARCHITECTURE OR ARCHITECTURE STREQUAL "")
|
||||
set(CMAKE_REQUIRED_QUIET 1)
|
||||
check_symbol_exists("${symbol}" "" ARCHITECTURE_${arch})
|
||||
unset(CMAKE_REQUIRED_QUIET)
|
||||
|
||||
# The output variable needs to be unique across invocations otherwise
|
||||
# CMake's crazy scope rules will keep it defined
|
||||
if (ARCHITECTURE_${arch})
|
||||
set(ARCHITECTURE "${arch}" PARENT_SCOPE)
|
||||
set(ARCHITECTURE_${arch} 1 PARENT_SCOPE)
|
||||
add_definitions(-DARCHITECTURE_${arch}=1)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (MSVC)
|
||||
detect_architecture("_M_AMD64" x86_64)
|
||||
detect_architecture("_M_IX86" x86)
|
||||
detect_architecture("_M_ARM" ARM)
|
||||
else()
|
||||
detect_architecture("__x86_64__" x86_64)
|
||||
detect_architecture("__i386__" x86)
|
||||
detect_architecture("__arm__" ARM)
|
||||
endif()
|
||||
if (NOT DEFINED ARCHITECTURE OR ARCHITECTURE STREQUAL "")
|
||||
set(ARCHITECTURE "GENERIC")
|
||||
endif()
|
||||
message(STATUS "iothub architecture: ${ARCHITECTURE}")
|
||||
|
||||
if (NOT ("${ARCHITECTURE}" STREQUAL "ARM"))
|
||||
add_subdirectory(socketio_connect)
|
||||
add_subdirectory(tlsio_connect)
|
||||
endif()
|
Загрузка…
Ссылка в новой задаче