Commit a7774469 authored by Dominik Charousset's avatar Dominik Charousset

moved dependency declarations to subproject CMake files

parent 2f032c19
...@@ -233,39 +233,6 @@ add_subdirectory(unit_testing) ...@@ -233,39 +233,6 @@ add_subdirectory(unit_testing)
add_subdirectory(examples) add_subdirectory(examples)
add_subdirectory(benchmarks) add_subdirectory(benchmarks)
# add libcppa as a dependency to all binaries
add_dependencies(announce_example_1 libcppa)
add_dependencies(announce_example_2 libcppa)
add_dependencies(announce_example_3 libcppa)
add_dependencies(announce_example_4 libcppa)
add_dependencies(announce_example_5 libcppa)
add_dependencies(dancing_kirby libcppa)
add_dependencies(dining_philosophers libcppa)
add_dependencies(hello_world_example libcppa)
add_dependencies(math_actor_example libcppa)
add_dependencies(actor_creation libcppa)
add_dependencies(mailbox_performance libcppa)
add_dependencies(mixed_case libcppa)
add_dependencies(distributed libcppa)
add_dependencies(matching libcppa)
add_dependencies(distributed_math_actor_example libcppa)
add_dependencies(test__atom libcppa)
add_dependencies(test__intrusive_containers libcppa)
add_dependencies(test__local_group libcppa)
add_dependencies(test__pattern libcppa)
add_dependencies(test__remote_actor libcppa)
add_dependencies(test__serialization libcppa)
add_dependencies(test__uniform_type libcppa)
add_dependencies(test__fixed_vector libcppa)
add_dependencies(test__intrusive_ptr libcppa)
add_dependencies(test__match libcppa)
add_dependencies(test__primitive_variant libcppa)
add_dependencies(test__ripemd_160 libcppa)
add_dependencies(test__spawn libcppa)
add_dependencies(test__type_list libcppa)
add_dependencies(test__yield_interface libcppa)
add_dependencies(test__sync_send libcppa)
# set optional flags # set optional flags
string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
set(CONTEXT_SWITCHING true) set(CONTEXT_SWITCHING true)
......
...@@ -6,20 +6,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wextra -Wall -pedantic") ...@@ -6,20 +6,13 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wextra -Wall -pedantic")
# Set up environment paths to cmake modules and libcppa # Set up environment paths to cmake modules and libcppa
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
# search for libs
if(NOT cppa_LIBRARY)
find_package(Libcppa REQUIRED)
endif (NOT cppa_LIBRARY)
find_package(Boost REQUIRED)
find_package(PTHREAD REQUIRED)
link_directories(${Boost_LIBRARY_DIRS}) link_directories(${Boost_LIBRARY_DIRS})
include_directories(. ${CPPA_INCLUDE} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR}) include_directories(. ${CPPA_INCLUDE} ${Boost_INCLUDE_DIRS} ${PTHREAD_INCLUDE_DIR})
macro(add_example name) macro(add_example name)
add_executable(${name} ${name}.cpp ${ARGN}) add_executable(${name} ${name}.cpp ${ARGN})
target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES}) target_link_libraries(${name} ${CMAKE_DL_LIBS} ${CPPA_LIBRARY} ${PTHREAD_LIBRARIES})
add_dependencies(${name} libcppa)
endmacro() endmacro()
add_example(announce_example_1) add_example(announce_example_1)
...@@ -32,3 +25,5 @@ add_example(dining_philosophers) ...@@ -32,3 +25,5 @@ add_example(dining_philosophers)
add_example(hello_world_example) add_example(hello_world_example)
add_example(math_actor_example) add_example(math_actor_example)
add_example(distributed_math_actor_example) add_example(distributed_math_actor_example)
add_example(group_server)
add_example(group_chat)
...@@ -24,6 +24,7 @@ macro(add_unit_test name) ...@@ -24,6 +24,7 @@ macro(add_unit_test name)
add_executable(test__${name} test__${name}.cpp ${ARGN}) add_executable(test__${name} test__${name}.cpp ${ARGN})
target_link_libraries(test__${name} ${EXAMPLE_LIBS} ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(test__${name} ${EXAMPLE_LIBS} ${CMAKE_THREAD_LIBS_INIT})
add_test(${name} ${EXECUTABLE_OUTPUT_PATH}/test__${name}) add_test(${name} ${EXECUTABLE_OUTPUT_PATH}/test__${name})
add_dependencies(${name} libcppa)
endmacro() endmacro()
add_unit_test(ripemd_160) add_unit_test(ripemd_160)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment