diff options
author | Jan Vorlicek <janvorli@microsoft.com> | 2020-04-15 14:19:41 +0300 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2020-04-18 12:18:05 +0300 |
commit | aec231da54ef8b45ebfb88cb9626cda0780261a7 (patch) | |
tree | fd1d969367ff41b01303a483ee35f61d083b2f2d /eng/native/functions.cmake | |
parent | cf66f084ca8b563c42cd814e8ce8b03519af51bd (diff) |
Implement native GetModuleIndex
This change replaces managed GetModuleIndex tool by shell scripts using
native tools.
Diffstat (limited to 'eng/native/functions.cmake')
-rw-r--r-- | eng/native/functions.cmake | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/eng/native/functions.cmake b/eng/native/functions.cmake index b7f8f463804..b422fc7c7c8 100644 --- a/eng/native/functions.cmake +++ b/eng/native/functions.cmake @@ -415,3 +415,28 @@ endfunction() function(add_executable_clr) _add_executable(${ARGV}) endfunction() + +function(generate_module_index Target ModuleIndexFile) + if(CLR_CMAKE_HOST_WIN32) + set(scriptExt ".cmd") + else() + set(scriptExt ".sh") + endif() + + add_custom_command( + OUTPUT ${ModuleIndexFile} + COMMAND ${CLR_ENG_NATIVE_DIR}/genmoduleindex${scriptExt} $<TARGET_FILE:${Target}> ${ModuleIndexFile} + DEPENDS ${Target} + COMMENT "Generating ${Target} module index file -> ${ModuleIndexFile}" + ) + + set_source_files_properties( + ${ModuleIndexFile} + PROPERTIES GENERATED TRUE + ) + + add_custom_target( + ${Target}_module_index_header + DEPENDS ${ModuleIndexFile} + ) +endfunction(generate_module_index) |