2025-08-21 15:56:47 -04:00
|
|
|
cmake_minimum_required(VERSION 3.21 FATAL_ERROR)
|
2023-02-08 01:31:38 -06:00
|
|
|
|
2024-10-15 11:20:40 -04:00
|
|
|
project(rocprofiler-systems-fork LANGUAGES CXX)
|
2023-02-08 01:31:38 -06:00
|
|
|
|
|
|
|
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo")
|
|
|
|
|
string(REPLACE " " ";" _FLAGS "${CMAKE_CXX_FLAGS_DEBUG}")
|
2025-07-31 07:59:41 -04:00
|
|
|
list(APPEND _FLAGS -fno-inline)
|
2023-02-08 01:31:38 -06:00
|
|
|
|
|
|
|
|
find_package(Threads REQUIRED)
|
2024-10-15 11:20:40 -04:00
|
|
|
find_package(rocprofiler-systems REQUIRED COMPONENTS user)
|
2023-02-08 01:31:38 -06:00
|
|
|
add_executable(fork-example fork.cpp)
|
2025-06-22 10:44:33 -04:00
|
|
|
target_link_libraries(
|
|
|
|
|
fork-example
|
|
|
|
|
PRIVATE Threads::Threads rocprofiler-systems::rocprofiler-systems
|
|
|
|
|
)
|
2023-02-08 01:31:38 -06:00
|
|
|
target_compile_options(fork-example PRIVATE ${_FLAGS})
|
|
|
|
|
|
2024-10-15 11:20:40 -04:00
|
|
|
if(ROCPROFSYS_INSTALL_EXAMPLES)
|
2025-06-22 10:44:33 -04:00
|
|
|
install(TARGETS fork-example DESTINATION bin COMPONENT rocprofiler-systems-examples)
|
2023-02-08 01:31:38 -06:00
|
|
|
endif()
|