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