From 1eb91f1bab0007836c1fe663956442d02be23c29 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/hip commit: 4f0aefbd6320881804feadf38c2c00f09c021c95] --- projects/hip/cmake/FindHIP.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/projects/hip/cmake/FindHIP.cmake b/projects/hip/cmake/FindHIP.cmake index a45fb1b44d..e540ac35a6 100644 --- a/projects/hip/cmake/FindHIP.cmake +++ b/projects/hip/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 4c9fad371f0a61480f46cd5f4bb01715019054b3 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/hip commit: f6938961b9011dd42a393fed34a868fd9bf5260f] --- projects/hip/cmake/FindHIP.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/hip/cmake/FindHIP.cmake b/projects/hip/cmake/FindHIP.cmake index e540ac35a6..b761356c9a 100644 --- a/projects/hip/cmake/FindHIP.cmake +++ b/projects/hip/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) ###############################################################################