diff options
author | Brad King <brad.king@kitware.com> | 2023-09-18 19:06:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-09-21 19:34:37 (GMT) |
commit | 9ebdf3281f431589af88e94470ef3274f2c6e753 (patch) | |
tree | 168bc96e69502aff21acc9896b89ae7ce82c576a | |
parent | cfec29196ef13b62fc391bcae6ebbde5e377fdb2 (diff) | |
download | CMake-9ebdf3281f431589af88e94470ef3274f2c6e753.zip CMake-9ebdf3281f431589af88e94470ef3274f2c6e753.tar.gz CMake-9ebdf3281f431589af88e94470ef3274f2c6e753.tar.bz2 |
Tests/HIP/ArchitectureOff: Cover HIP_ARCHITECTURES initialization
Verify that the property is initialized by `CMAKE_HIP_ARCHITECTURES`.
-rw-r--r-- | Tests/HIP/ArchitectureOff/CMakeLists.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/HIP/ArchitectureOff/CMakeLists.txt b/Tests/HIP/ArchitectureOff/CMakeLists.txt index bccb3b4..b40301a 100644 --- a/Tests/HIP/ArchitectureOff/CMakeLists.txt +++ b/Tests/HIP/ArchitectureOff/CMakeLists.txt @@ -2,7 +2,11 @@ cmake_minimum_required(VERSION 3.18) project(HIPArchitecture HIP) # Make sure CMake doesn't pass architectures if HIP_ARCHITECTURES is OFF. +set(CMAKE_HIP_ARCHITECTURES OFF) string(APPEND CMAKE_HIP_FLAGS " --offload-arch=gfx908") add_executable(HIPOnlyArchitectureOff main.hip) -set_property(TARGET HIPOnlyArchitectureOff PROPERTY HIP_ARCHITECTURES OFF) +get_property(hip_archs TARGET HIPOnlyArchitectureOff PROPERTY HIP_ARCHITECTURES) +if(NOT hip_archs STREQUAL "OFF") + message(FATAL_ERROR "CMAKE_HIP_ARCHITECTURES did not initialize HIP_ARCHITECTURES") +endif() |