This is a precaution to avoid current and future naming conflicts with common system libraries. libutil (part of libc) is the first, but probably not the last example that already caused trouble twice. git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1614 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
36 lines
1.1 KiB
CMake
36 lines
1.1 KiB
CMake
set(EXPERIMENT_NAME weather-monitor)
|
|
set(EXPERIMENT_TYPE WeatherMonitorExperiment)
|
|
configure_file(../instantiate-experiment.ah.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/instantiate-${EXPERIMENT_NAME}.ah @ONLY
|
|
)
|
|
|
|
## Setup desired protobuf descriptions HERE ##
|
|
set(MY_PROTOS
|
|
weathermonitor.proto
|
|
)
|
|
|
|
set(MY_CAMPAIGN_SRCS
|
|
experimentInfo.hpp
|
|
experiment.hpp
|
|
experiment.cc
|
|
campaign.hpp
|
|
campaign.cc
|
|
)
|
|
|
|
#### PROTOBUFS ####
|
|
find_package(Protobuf REQUIRED)
|
|
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${MY_PROTOS})
|
|
|
|
## Build library
|
|
add_library(fail-${EXPERIMENT_NAME} ${PROTO_SRCS} ${PROTO_HDRS} ${MY_CAMPAIGN_SRCS})
|
|
|
|
add_dependencies(${EXPERIMENT_NAME} fail-tracing)
|
|
|
|
## This is the example's campaign server distributing experiment parameters
|
|
add_executable(${EXPERIMENT_NAME}-server main.cc)
|
|
target_link_libraries(${EXPERIMENT_NAME}-server fail-${EXPERIMENT_NAME} fail ${PROTOBUF_LIBRARY} ${Boost_THREAD_LIBRARY})
|
|
install(TARGETS ${EXPERIMENT_NAME}-server RUNTIME DESTINATION bin)
|