diff options
author | Brad King <brad.king@kitware.com> | 2017-10-05 11:35:45 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-10-05 11:36:03 (GMT) |
commit | 69257d456a0b924adb4b14eecfc6d53cc5f3e2e9 (patch) | |
tree | 364e245873bef2cd3d8a8c7cc7e9bc625b50d87d /Modules | |
parent | b374ea86c65ac56d077b75f9ff8cca96226f3731 (diff) | |
parent | 8b09c20c3a4aba1eabd65579ebc408c5d8d17a2e (diff) | |
download | CMake-69257d456a0b924adb4b14eecfc6d53cc5f3e2e9.zip CMake-69257d456a0b924adb4b14eecfc6d53cc5f3e2e9.tar.gz CMake-69257d456a0b924adb4b14eecfc6d53cc5f3e2e9.tar.bz2 |
Merge topic 'FindCUDA-run_nvcc-CMP0007'
8b09c20c FindCUDA: Fix CMP0007 warning in run_nvcc.cmake
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1340
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindCUDA/run_nvcc.cmake | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Modules/FindCUDA/run_nvcc.cmake b/Modules/FindCUDA/run_nvcc.cmake index ec5a099..f78119d 100644 --- a/Modules/FindCUDA/run_nvcc.cmake +++ b/Modules/FindCUDA/run_nvcc.cmake @@ -50,6 +50,8 @@ # generated_cubin_file:STRING=<> File to generate. This argument must be passed # in if build_cubin is true. +cmake_policy(PUSH) +cmake_policy(SET CMP0007 NEW) if(NOT generated_file) message(FATAL_ERROR "You must specify generated_file on the command line") endif() @@ -179,13 +181,8 @@ cuda_execute_process( set(depends_CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS}") set(CUDA_VERSION @CUDA_VERSION@) if(CUDA_VERSION VERSION_LESS "3.0") - cmake_policy(PUSH) - # CMake policy 0007 NEW states that empty list elements are not - # ignored. I'm just setting it to avoid the warning that's printed. - cmake_policy(SET CMP0007 NEW) # Note that this will remove all occurances of -G. list(REMOVE_ITEM depends_CUDA_NVCC_FLAGS "-G") - cmake_policy(POP) endif() # nvcc doesn't define __CUDACC__ for some reason when generating dependency files. This @@ -304,3 +301,5 @@ if( build_cubin ) ) endif() + +cmake_policy(POP) |