Debian Codegraph @

Tests/HIP/MathFunctions/CMakeLists.txt

raw
1 cmake_minimum_required(VERSION 3.18)
2 project(MathFunctions HIP)
3
4 # This test covers these major HIP language/runtime requirements:
5 #
6 # 1. This makes sure CMake properly specifies the internal clang header dirs
7 # that hold headers needed for overloads of device side functions
8 #
9 # 2. This makes sure that all HIP include directories are properly marked as
10 # system includes so we don't get the following warnings:
11 # replacement function 'operator delete' cannot be declared 'inline'#
12 #
13 # 3. This makes sure CMake properly links to all the built-in libraries
14 # that hip needs that inject support for __half support
15 #
16 add_executable(HIPOnlyMathFunctions main.hip)
17 if(CMAKE_HIP_COMPILER_ID STREQUAL "NVIDIA")
18 target_compile_options(HIPOnlyMathFunctions PRIVATE "SHELL:-Werror all-warnings")
19 elseif(CMAKE_HIP_COMPILER_ID STREQUAL "Clang")
20 target_compile_options(HIPOnlyMathFunctions PRIVATE "-Werror")
21 endif()
22 target_compile_features(HIPOnlyMathFunctions PRIVATE hip_std_14)