diff options
author | Brad King <brad.king@kitware.com> | 2020-09-01 13:20:16 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-09-01 13:20:23 (GMT) |
commit | 2d723e66f14452e4c6cf51528fa72777b5d5b396 (patch) | |
tree | 3cc194ccca5d8858487e3d4b3c04c3df43c09295 /Modules/CMakeDetermineCompilerId.cmake | |
parent | f7fbe405131eae2e914cd5aec310e1ec2614d840 (diff) | |
parent | 01428c5560f87122999a14fe4bf3e9b186b0127e (diff) | |
download | CMake-2d723e66f14452e4c6cf51528fa72777b5d5b396.zip CMake-2d723e66f14452e4c6cf51528fa72777b5d5b396.tar.gz CMake-2d723e66f14452e4c6cf51528fa72777b5d5b396.tar.bz2 |
Merge topic 'cuda_host_compiler_fail'
01428c5560 CUDA: Fail fast if CMAKE_CUDA_ARCHITECTURES doesn't work during detection
9f81aa0f69 CUDA: Fail if compiler detection using the host compiler fails
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5155
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index 8724ed8..688e1d8 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -628,9 +628,12 @@ ${CMAKE_${lang}_COMPILER_ID_OUTPUT} ") file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log "${MSG}") - #if(NOT CMAKE_${lang}_COMPILER_ID_ALLOW_FAIL) - # message(FATAL_ERROR "${MSG}") - #endif() + + # Some languages may know the correct/desired set of flags and want to fail right away if they don't work. + # This is currently only used by CUDA. + if(CMAKE_${lang}_COMPILER_ID_REQUIRE_SUCCESS) + message(FATAL_ERROR "${MSG}") + endif() # No output files should be inspected. set(COMPILER_${lang}_PRODUCED_FILES) |