ag++ is now called with a list of currently active aspect headers
(ag++ -a aspect1.ah -a aspect2.ah ...). This resolves several problems at
once:
- Build directories may be positioned arbitrarily now, they need not be
a subdirectory of the project anymore.
- Multiple build directories can coexist within the project tree. Before
this commit, the generated instantiate-*.ah aspect headers disturbed
neighboring build trees.
- Due to this, the regression test should be runnable much more easily
now.
- The build time was reduced by an average of about 10%.
git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1753 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
36 lines
1.2 KiB
CMake
36 lines
1.2 KiB
CMake
set(EXPERIMENT_NAME ecos_kernel_test)
|
|
set(EXPERIMENT_TYPE EcosKernelTestExperiment)
|
|
configure_file(../instantiate-experiment.ah.in
|
|
${CMAKE_CURRENT_BINARY_DIR}/instantiate-${EXPERIMENT_NAME}.ah @ONLY
|
|
)
|
|
add_aspect_headers(${CMAKE_CURRENT_BINARY_DIR}/instantiate-${EXPERIMENT_NAME}.ah)
|
|
|
|
## Setup desired protobuf descriptions HERE ##
|
|
set(MY_PROTOS
|
|
ecos_kernel_test.proto
|
|
)
|
|
|
|
set(MY_CAMPAIGN_SRCS
|
|
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(fail-${EXPERIMENT_NAME} fail-tracing)
|
|
target_link_libraries(fail-${EXPERIMENT_NAME} ${PROTOBUF_LIBRARY})
|
|
|
|
## 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)
|