Files
rocm-systems/examples/user-api/CMakeLists.txt
T

28 lines
841 B
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
2022-03-07 20:40:48 -06:00
2022-11-01 17:28:12 -05:00
project(omnitrace-user-api-example LANGUAGES CXX)
if(OMNITRACE_DISABLE_EXAMPLES)
get_filename_component(_DIR ${CMAKE_CURRENT_LIST_DIR} NAME)
if(${PROJECT_NAME} IN_LIST OMNITRACE_DISABLE_EXAMPLES OR ${_DIR} IN_LIST
OMNITRACE_DISABLE_EXAMPLES)
return()
endif()
endif()
2022-03-07 20:40:48 -06:00
2022-03-22 15:51:57 -05:00
set(CMAKE_BUILD_TYPE "Debug")
2022-03-07 20:40:48 -06:00
find_package(Threads REQUIRED)
if(NOT TARGET omnitrace::omnitrace-user-library)
find_package(omnitrace REQUIRED COMPONENTS user)
endif()
2022-03-07 20:40:48 -06:00
add_executable(user-api user-api.cpp)
target_link_libraries(user-api PRIVATE Threads::Threads omnitrace::omnitrace-user-library)
if(OMNITRACE_INSTALL_EXAMPLES)
install(
TARGETS user-api
DESTINATION bin
COMPONENT omnitrace-examples)
2022-03-07 20:40:48 -06:00
endif()