diff options
Diffstat (limited to 'functions.cmake')
-rw-r--r-- | functions.cmake | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/functions.cmake b/functions.cmake index f8a2eeae04..bac20e8bc6 100644 --- a/functions.cmake +++ b/functions.cmake @@ -216,3 +216,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() |