Skip to content

Commit

Permalink
UseJava: Reduce add_jar verbosity by default
Browse files Browse the repository at this point in the history
Set "Clean class files" message to verbose.

Fixes: #22107
  • Loading branch information
Gold856 authored and bradking committed Aug 13, 2024
1 parent aa6b218 commit ea62c44
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Modules/UseJava.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ function(add_jar _TARGET_NAME)
endforeach()
endif()

cmake_language(GET_MESSAGE_LOG_LEVEL _LOG_LEVEL)
# Compile the java files and create a list of class files
add_custom_command(
# NOTE: this command generates an artificial dependency file
Expand All @@ -881,6 +882,7 @@ function(add_jar _TARGET_NAME)
-DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
-DCMAKE_JAR_CLASSES_PREFIX=${CMAKE_JAR_CLASSES_PREFIX}
-P ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/UseJava/ClearClassFiles.cmake
--log-level ${_LOG_LEVEL}
COMMAND ${Java_JAVAC_EXECUTABLE}
${CMAKE_JAVA_COMPILE_FLAGS}
-classpath "${CMAKE_JAVA_INCLUDE_PATH_FINAL}"
Expand Down
2 changes: 1 addition & 1 deletion Modules/UseJava/ClearClassFiles.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if(CMAKE_JAVA_CLASS_OUTPUT_PATH)
list(TRANSFORM classes PREPEND "${CMAKE_JAVA_CLASS_OUTPUT_PATH}/")
if(classes)
file(REMOVE ${classes})
message(STATUS "Clean class files from previous build")
message(VERBOSE "Clean class files from previous build")
endif()
endif()
else()
Expand Down

0 comments on commit ea62c44

Please sign in to comment.