Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2020-04-15 14:19:41 +0300
committerJan Vorlicek <janvorli@microsoft.com>2020-04-18 12:18:05 +0300
commitaec231da54ef8b45ebfb88cb9626cda0780261a7 (patch)
treefd1d969367ff41b01303a483ee35f61d083b2f2d /eng/native/functions.cmake
parentcf66f084ca8b563c42cd814e8ce8b03519af51bd (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.cmake25
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)