function(clr_unknown_arch)
if (WIN32)
message(FATAL_ERROR "Only AMD64, ARM64, ARM and I386 are supported")
+ elseif(CLR_CROSS_COMPONENTS_BUILD)
+ message(FATAL_ERROR "Only AMD64, I386 host are supported for linux cross-architecture component")
else()
message(FATAL_ERROR "Only AMD64, ARM64 and ARM are supported")
endif()
function(strip_symbols targetName outputFilename)
if (CLR_CMAKE_PLATFORM_UNIX)
- if (UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE)
+ if (STRIP_SYMBOLS)
# On the older version of cmake (2.8.12) used on Ubuntu 14.04 the TARGET_FILE
# generator expression doesn't work correctly returning the wrong path and on
endif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(${outputFilename} ${strip_destination_file} PARENT_SCOPE)
- endif(UPPERCASE_CMAKE_BUILD_TYPE STREQUAL RELEASE)
+ endif (STRIP_SYMBOLS)
endif(CLR_CMAKE_PLATFORM_UNIX)
endfunction()
install(${ARGV})
endif()
endfunction()
+
+function(verify_dependencies targetName errorMessage)
+ # We don't need to verify dependencies on OSX, since missing dependencies
+ # result in link error over there.
+ if (NOT CLR_CMAKE_PLATFORM_DARWIN AND NOT CLR_CMAKE_PLATFORM_ANDROID)
+ add_custom_command(
+ TARGET ${targetName}
+ POST_BUILD
+ VERBATIM
+ COMMAND ${CMAKE_SOURCE_DIR}/verify-so.sh
+ $<TARGET_FILE:${targetName}>
+ ${errorMessage}
+ COMMENT "Verifying ${targetName} dependencies"
+ )
+ endif()
+endfunction()