diff options
author | Jeremy Koritzinsky <jekoritz@microsoft.com> | 2019-04-09 15:21:43 -0700 |
---|---|---|
committer | Jeremy Koritzinsky <jekoritz@microsoft.com> | 2019-04-11 10:20:32 -0700 |
commit | 2581b446f6182e9f362d6d760c8b3b102a7603a8 (patch) | |
tree | dc81fefad5ec4a935afca3e27f95c8b9664d03fb /functions.cmake | |
parent | 449285b8b7ccc7158038e5ca3e6cfe11a0d7cc29 (diff) | |
download | coreclr-2581b446f6182e9f362d6d760c8b3b102a7603a8.tar.gz coreclr-2581b446f6182e9f362d6d760c8b3b102a7603a8.tar.bz2 coreclr-2581b446f6182e9f362d6d760c8b3b102a7603a8.zip |
Fix CMake warning about clrjit.exports.in file when using Ninja generator. Make generation of clrjit.exports.in not break incremental "install". Only write clrjit.exports.in when inputs change.
Diffstat (limited to 'functions.cmake')
-rw-r--r-- | functions.cmake | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/functions.cmake b/functions.cmake index d868445910..1d97a9eee5 100644 --- a/functions.cmake +++ b/functions.cmake @@ -86,11 +86,7 @@ function(preprocess_def_file inputFilename outputFilename) PROPERTIES GENERATED TRUE) endfunction() -function(generate_exports_file) - set(INPUT_LIST ${ARGN}) - list(GET INPUT_LIST -1 outputFilename) - list(REMOVE_AT INPUT_LIST -1) - +function(generate_exports_file INPUT_FILE OUTPUT_FILE) if(CMAKE_SYSTEM_NAME STREQUAL Darwin) set(AWK_SCRIPT generateexportedsymbols.awk) else() @@ -98,9 +94,9 @@ function(generate_exports_file) endif(CMAKE_SYSTEM_NAME STREQUAL Darwin) add_custom_command( - OUTPUT ${outputFilename} - COMMAND ${AWK} -f ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT} ${INPUT_LIST} >${outputFilename} - DEPENDS ${INPUT_LIST} ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT} + OUTPUT ${OUTPUT_FILE} + COMMAND ${AWK} -f ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT} ${INPUT_FILE} >${OUTPUT_FILE} + DEPENDS ${INPUT_FILE} ${CMAKE_SOURCE_DIR}/${AWK_SCRIPT} COMMENT "Generating exports file ${outputFilename}" ) set_source_files_properties(${outputFilename} |