From 470dd2fbcf5af4bc6c490648d7fc35ba18cc0992 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Mon, 27 Feb 2017 13:11:11 +0530 Subject: [PATCH] FindHIP: added new macro HIP_RESET_FLAGS Change-Id: I0af491f6689abf1c1b5691261fe1f3e61a5d916d --- cmake/FindHIP.cmake | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/cmake/FindHIP.cmake b/cmake/FindHIP.cmake index 5e17af72a5..ea19725a1e 100644 --- a/cmake/FindHIP.cmake +++ b/cmake/FindHIP.cmake @@ -178,6 +178,21 @@ hip_find_helper_file(run_make2cmake cmake) hip_find_helper_file(run_hipcc cmake) ############################################################################### +############################################################################### +# MACRO: Reset compiler flags +############################################################################### +macro(HIP_RESET_FLAGS) + unset(HIP_HIPCC_FLAGS) + unset(HIP_HCC_FLAGS) + unset(HIP_NVCC_FLAGS) + foreach(config ${_hip_configuration_types}) + string(TOUPPER ${config} config_upper) + unset(HIP_HIPCC_FLAGS_${config_upper}) + unset(HIP_HCC_FLAGS_${config_upper}) + unset(HIP_NVCC_FLAGS_${config_upper}) + endforeach() +endmacro() + ############################################################################### # MACRO: Separate the options from the sources ###############################################################################