From cd9a2cbe42d5a596f52a49a85023955e1c7fda69 Mon Sep 17 00:00:00 2001 From: pradeepisro Date: Tue, 19 Jun 2018 12:26:18 +0530 Subject: [PATCH 1/2] added changes to FindHIP.cmake which would allow us to build using ninja #467 [ROCm/clr commit: 6bdb5f35417771d29e539e3d36ded5c205060998] --- projects/clr/hipamd/cmake/FindHIP.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/clr/hipamd/cmake/FindHIP.cmake b/projects/clr/hipamd/cmake/FindHIP.cmake index a45fb1b44d..e540ac35a6 100644 --- a/projects/clr/hipamd/cmake/FindHIP.cmake +++ b/projects/clr/hipamd/cmake/FindHIP.cmake @@ -471,7 +471,13 @@ macro(HIP_PREPARE_TARGET_COMMANDS _target _format _generated_files _source_files INPUT "${custom_target_script_pregen}" ) set(main_dep DEPENDS ${source_file}) - set(verbose_output "$(VERBOSE)") + if(CMAKE_GENERATOR MATCHES "Makefiles") + set(verbose_output "$(VERBOSE)") + elseif(HIP_VERBOSE_BUILD) + set(verbose_output ON) + else() + set(verbose_output OFF) + endif() # Create up the comment string file(RELATIVE_PATH generated_file_relative_path "${CMAKE_BINARY_DIR}" "${generated_file}") From 64b4f4101f56439455ef7434a349c58dd4b4fdf9 Mon Sep 17 00:00:00 2001 From: pradeepisro Date: Tue, 19 Jun 2018 13:50:24 +0530 Subject: [PATCH 2/2] added option HIP_BUILD_VERBOSE to enable verbosity in HIP build [ROCm/clr commit: bdfd6957aa9da6cb81563436b56a2b72a46a7822] --- projects/clr/hipamd/cmake/FindHIP.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/clr/hipamd/cmake/FindHIP.cmake b/projects/clr/hipamd/cmake/FindHIP.cmake index e540ac35a6..b761356c9a 100644 --- a/projects/clr/hipamd/cmake/FindHIP.cmake +++ b/projects/clr/hipamd/cmake/FindHIP.cmake @@ -20,6 +20,7 @@ foreach(config ${_hip_configuration_types}) mark_as_advanced(HIP_HIPCC_FLAGS_${config_upper} HIP_HCC_FLAGS_${config_upper} HIP_NVCC_FLAGS_${config_upper}) endforeach() option(HIP_HOST_COMPILATION_CPP "Host code compilation mode" ON) +option(HIP_VERBOSE_BUILD "Print out the commands run while compiling the HIP source file. With the Makefile generator this defaults to VERBOSE variable specified on the command line, but can be forced on with this option." OFF) mark_as_advanced(HIP_HOST_COMPILATION_CPP) ###############################################################################