diff options
Diffstat (limited to 'functions.cmake')
-rw-r--r-- | functions.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/functions.cmake b/functions.cmake index f8a2eeae04..e1a9abb469 100644 --- a/functions.cmake +++ b/functions.cmake @@ -1,6 +1,8 @@ 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 are supported for cross-architecture component") else() message(FATAL_ERROR "Only AMD64, ARM64 and ARM are supported") endif() @@ -216,3 +218,19 @@ function(_install) 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) + 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() |