[llvm] 2a9c3eb - Make ninja smart console builds more pretty
David Zarzycki via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 22 03:35:30 PDT 2020
Author: David Zarzycki
Date: 2020-06-22T06:35:13-04:00
New Revision: 2a9c3eb9ec8e16519ac33c601aa1a7deaaf6c1c2
URL: https://github.com/llvm/llvm-project/commit/2a9c3eb9ec8e16519ac33c601aa1a7deaaf6c1c2
DIFF: https://github.com/llvm/llvm-project/commit/2a9c3eb9ec8e16519ac33c601aa1a7deaaf6c1c2.diff
LOG: Make ninja smart console builds more pretty
Summary: CMake's `find_package` outputs to the console on success, which confuses the smart console mode of the `ninja` build system. Let's quiet the success message and manually warn instead.
Reviewers: tstellar, phosek, mehdi_amini
Reviewed By: mehdi_amini
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82276
Added:
Modified:
llvm/cmake/modules/VersionFromVCS.cmake
Removed:
################################################################################
diff --git a/llvm/cmake/modules/VersionFromVCS.cmake b/llvm/cmake/modules/VersionFromVCS.cmake
index 1b6519b4b7c4..18edbeabe3e4 100644
--- a/llvm/cmake/modules/VersionFromVCS.cmake
+++ b/llvm/cmake/modules/VersionFromVCS.cmake
@@ -4,7 +4,7 @@
# extra argument, otherwise uses CMAKE_CURRENT_SOURCE_DIR).
function(get_source_info path revision repository)
- find_package(Git)
+ find_package(Git QUIET)
if(GIT_FOUND)
execute_process(COMMAND ${GIT_EXECUTABLE} rev-parse --git-dir
WORKING_DIRECTORY ${path}
@@ -45,5 +45,7 @@ function(get_source_info path revision repository)
set(${repository} ${path} PARENT_SCOPE)
endif()
endif()
+ else()
+ message(WARNING "Git not found. Version cannot be determined.")
endif()
endfunction()
More information about the llvm-commits
mailing list