Files
rocm-systems/samples/2_Cookbook/19_cmake_lang/CMakeLists.txt
T
Tao Sang 818aa18d59 SWDEV-292273 - Add cmake tests
Add test on CXX and Fortran build in cmake.
Add test on hip::device interface linking in cmake.

Change-Id: I3fe6dba05a7a140a9a19df107b7885df83d28042
2021-07-08 12:51:46 -04:00

15 строки
471 B
CMake

# The test must be with CMake 3.18 or above which supports LINK_LANGUAGE that is necessary for
# Fortran build.
cmake_minimum_required(VERSION 3.18.0)
project(cmake_lang_test CXX Fortran)
find_package(hip REQUIRED)
add_executable(test_fortran TestFortran.F90)
add_executable(test_cpp MatrixTranspose.cpp)
target_link_libraries(test_cpp PUBLIC hip::device)
# Assuming to build a C/C++-to-Fortran library binding.
target_link_libraries(test_fortran PUBLIC hip::device)