summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
diff options
context:
space:
mode:
authorNathan Burles <nathan.burles@uk.ibm.com>2019-11-04 10:40:42 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-20 15:38:44 (GMT)
commit1b27ac78ac80a0edeaa90038a15b6ac985a29880 (patch)
treefbef0bc88d2e16969337dc200143fe623b2ad762 /Modules/UseJava.cmake
parentc7a4b1a58efd3b7ef8794547dcee738e8fd1b483 (diff)
downloadCMake-1b27ac78ac80a0edeaa90038a15b6ac985a29880.zip
CMake-1b27ac78ac80a0edeaa90038a15b6ac985a29880.tar.gz
CMake-1b27ac78ac80a0edeaa90038a15b6ac985a29880.tar.bz2
UseJava: Use list(APPEND) to simplify javadoc option construction
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r--Modules/UseJava.cmake21
1 files changed, 11 insertions, 10 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index 96b7c64..27f1218 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -1199,7 +1199,7 @@ function(create_javadoc _target)
set(_sourcepath ${_sourcepath}:${_path})
endif ()
endforeach()
- set(_javadoc_options ${_javadoc_options} -sourcepath ${_sourcepath})
+ list(APPEND _javadoc_options -sourcepath ${_sourcepath})
endif ()
if (_javadoc_classpath)
@@ -1212,33 +1212,34 @@ function(create_javadoc _target)
set(_classpath ${_classpath}:${_path})
endif ()
endforeach()
- set(_javadoc_options ${_javadoc_options} -classpath "${_classpath}")
+ list(APPEND _javadoc_options -classpath "${_classpath}")
endif ()
if (_javadoc_doctitle)
- set(_javadoc_options ${_javadoc_options} -doctitle '${_javadoc_doctitle}')
+ list(APPEND _javadoc_options -doctitle '${_javadoc_doctitle}')
endif ()
if (_javadoc_windowtitle)
- set(_javadoc_options ${_javadoc_options} -windowtitle '${_javadoc_windowtitle}')
+ list(APPEND _javadoc_options -windowtitle '${_javadoc_windowtitle}')
endif ()
if (_javadoc_author)
- set(_javadoc_options ${_javadoc_options} -author)
+ list(APPEND _javadoc_options -author)
endif ()
if (_javadoc_use)
- set(_javadoc_options ${_javadoc_options} -use)
+ list(APPEND _javadoc_options -use)
endif ()
if (_javadoc_version)
- set(_javadoc_options ${_javadoc_options} -version)
+ list(APPEND _javadoc_options -version)
endif ()
add_custom_target(${_target}_javadoc ALL
- COMMAND ${Java_JAVADOC_EXECUTABLE} ${_javadoc_options}
- ${_javadoc_files}
- ${_javadoc_packages}
+ COMMAND ${Java_JAVADOC_EXECUTABLE}
+ ${_javadoc_options}
+ ${_javadoc_files}
+ ${_javadoc_packages}
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
)