diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2019-12-08 00:39:02 (GMT) |
---|---|---|
committer | Alex Turbov <i.zaufi@gmail.com> | 2019-12-10 14:43:27 (GMT) |
commit | 24fdd51f4503ccee33c07881cc8dd487cdc8b347 (patch) | |
tree | ff07504a0782e3a79fb996594d9fcbcabf98ecf0 /Modules/UseJava.cmake | |
parent | 90e3e2a7778dc0ec5b421e9657ec49936a3cf174 (diff) | |
download | CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.zip CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.gz CMake-24fdd51f4503ccee33c07881cc8dd487cdc8b347.tar.bz2 |
Refactor: Replace CMAKE_CURRENT_LIST_DIR with CMAKE_CURRENT_FUNCTION_LIST_DIR
Some modules define an intermediate global scope visible variables
to access "resource" files from functions.
Now these variables could be eliminated.
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r-- | Modules/UseJava.cmake | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake index 0798488..a73fc2a 100644 --- a/Modules/UseJava.cmake +++ b/Modules/UseJava.cmake @@ -405,7 +405,6 @@ endfunction() # define helper scripts set(_JAVA_EXPORT_TARGETS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/javaTargets.cmake.in) -set(_JAVA_CLASS_FILELIST_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaClassFilelist.cmake) set(_JAVA_SYMLINK_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/UseJavaSymlinks.cmake) function(add_jar _TARGET_NAME) @@ -627,7 +626,7 @@ function(add_jar _TARGET_NAME) COMMAND ${CMAKE_COMMAND} -DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH} -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}" - -P ${_JAVA_CLASS_FILELIST_SCRIPT} + -P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJavaClassFilelist.cmake DEPENDS ${CMAKE_JAVA_CLASS_OUTPUT_PATH}/java_compiled_${_TARGET_NAME} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) |