ovni/src/emu/CMakeLists.txt
Rodrigo Arias 1792c650ec Add definitions for emulator events
Implements a small language parser to define the emulator events. The
event specification is parsed at emulation (when the emulator runs).
The ovnidump output now prints the events with the arguments formatted
as given in the event description.

It also introduces some consistency checks over the event MCVs, which
must begin with the model identifier and cannot be duplicated.
2024-01-30 12:01:56 +01:00

109 lines
2.4 KiB
CMake

# Copyright (c) 2021-2024 Barcelona Supercomputing Center (BSC)
# SPDX-License-Identifier: GPL-3.0-or-later
include_directories(
"${CMAKE_SOURCE_DIR}/src/include"
"${CMAKE_SOURCE_DIR}/src/emu"
"${CMAKE_SOURCE_DIR}/src"
"${CMAKE_SOURCE_DIR}/include"
)
add_library(emu STATIC
../common.c
bay.c
chan.c
clkoff.c
cpu.c
emu.c
emu_args.c
emu_ev.c
emu_stat.c
ev_spec.c
model.c
model_cpu.c
model_thread.c
model_pvt.c
model_evspec.c
models.c
player.c
stream.c
trace.c
loom.c
metadata.c
mux.c
sort.c
path.c
proc.c
pv/pcf.c
pv/prf.c
pv/prv.c
pv/pvt.c
pv/cfg.c
recorder.c
system.c
task.c
track.c
thread.c
extend.c
value.c
ovni/event.c
ovni/setup.c
nanos6/setup.c
nanos6/event.c
nanos6/breakdown.c
nosv/setup.c
nosv/event.c
nodes/setup.c
nodes/event.c
mpi/setup.c
mpi/event.c
tampi/setup.c
tampi/event.c
kernel/setup.c
kernel/event.c
)
target_link_libraries(emu ovni-static)
add_executable(ovniemu ovniemu.c)
target_link_libraries(ovniemu emu parson-static ovni-static)
add_executable(ovnidump ovnidump.c)
target_link_libraries(ovnidump emu parson-static ovni-static)
add_executable(ovnisort ovnisort.c)
target_link_libraries(ovnisort emu parson-static ovni-static)
add_executable(ovnitop ovnitop.c)
target_link_libraries(ovnitop emu parson-static ovni-static)
# For ovniver we need to ensure we use the RUNPATH not the RPATH.
include(CheckLinkerFlag)
check_linker_flag(C "-Wl,--enable-new-dtags" SUPPORT_ENABLE_NEW_DTAGS)
if (NOT SUPPORT_ENABLE_NEW_DTAGS)
message(FATAL_ERROR "Flag -Wl,--enable-new-dtags not supported, refusing to build ovniver")
endif()
add_executable(ovniver ovniver.c)
target_link_libraries(ovniver ovni)
set_property(TARGET ovniver
PROPERTY INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
target_link_options(ovniver PRIVATE "-Wl,--enable-new-dtags")
set(USE_MPI ON CACHE BOOL "Use MPI (required by ovnisync)")
if(USE_MPI)
# Use <PackageName>_ROOT variables if available, commonly used by MPI
# installations
if(POLICY CMP0074)
cmake_policy(SET CMP0074 NEW)
endif()
find_package(MPI REQUIRED)
add_executable(ovnisync ovnisync.c)
target_link_libraries(ovnisync ovni-static m MPI::MPI_C)
install(TARGETS ovnisync)
else()
message(STATUS "Disabling ovnisync as MPI is disabled")
endif()
install(TARGETS ovniemu ovnidump ovnisort ovnitop ovniver)
install(FILES ovnitop.1 DESTINATION "${CMAKE_INSTALL_MANDIR}/man1")