# Copyright (c) Advanced Micro Devices, Inc. All rights reserved.
#
# SPDX-License-Identifier: MIT

# You may need to add -DCMAKE_PREFIX_PATH=/path/to/hipfile
# if hipFile has been installed to a non-standard location

cmake_minimum_required(VERSION 3.21)

project(api_examples LANGUAGES CXX)

find_package(hip REQUIRED CONFIG)
find_package(hipfile REQUIRED CONFIG)

set(API_EXAMPLES
    get-version
)

foreach(example ${API_EXAMPLES})
    add_executable(${example} "${example}.cpp")

    target_compile_features(${example} PRIVATE cxx_std_17)
    set_target_properties(${example} PROPERTIES CXX_EXTENSIONS OFF)
    target_compile_options(${example} PRIVATE -Wall -Wextra)
    target_link_libraries(${example} PRIVATE hip::host hip::hipfile)
endforeach()
