-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
173 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Objects sending notifications to each others. | ||
# | ||
project(ping_pong) | ||
|
||
# pop_add_object(ping_pong ping_pong.hpp ping_pong.cpp) | ||
pop_add_object(pop::mutex mutex.hpp) | ||
pop_add_object(ping_pong ping_pong.hpp ping_pong.cpp) | ||
# pop_add_all_classes(mutex.hpp) | ||
# pop_add_all_classes(ping_pong.hpp ping_pong.cpp ${CMAKE_CURRENT_BINARY_DIR}/pop/mutex.iface.hpp) | ||
add_executable(main_ping main.cpp ${CMAKE_CURRENT_BINARY_DIR}/ping_pong.iface.hpp ${CMAKE_CURRENT_BINARY_DIR}/pop/mutex.iface.hpp ${CMAKE_CURRENT_BINARY_DIR}/pop/mutex.brok.cpp) | ||
target_link_libraries(main_ping ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_ping_pong ./main_ping async 100 localhost --pop-path `pwd` DEPENDS main_ping ping_pong.obj pop.mutex.obj) | ||
add_test(NAME run_ping_pong COMMAND ./main_ping async 100 localhost --pop-path ${CMAKE_CURRENT_BINARY_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# A game for 2 players. Guess words of the category starting with the right letter. | ||
# | ||
project(word_list_game) | ||
|
||
find_package( Boost 1.40 COMPONENTS serialization system thread serialization context log filesystem program_options REQUIRED ) | ||
include_directories(${Boost_INCLUDE_DIR}) | ||
|
||
pop_add_objects("client;server" "client.hpp;client.cpp;server.hpp;server.cpp") | ||
# alternative: | ||
# pop_add_object(server server.hpp server.cpp ${CMAKE_CURRENT_BINARY_DIR}/client.iface.hpp) | ||
# pop_add_object(client client.hpp client.cpp ${CMAKE_CURRENT_BINARY_DIR}/server.iface.hpp) | ||
pop_add_objects("client;server" "client.hpp;client.cpp;server.hpp;server.cpp") | ||
add_executable(word_list_game word_list_game.cpp ${CMAKE_CURRENT_BINARY_DIR}/client.iface.hpp ${CMAKE_CURRENT_BINARY_DIR}/server.iface.hpp) | ||
target_link_libraries(word_list_game ${Boost_LIBRARIES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Example of asynchronous object creation. | ||
# | ||
project(popc_tests_asynccreation) | ||
|
||
pop_add_object(PopObject3 PopObject.h PopObject.cpp) | ||
add_executable(main_asynccreation main.cpp ${CMAKE_CURRENT_BINARY_DIR}/PopObject3.iface.hpp) | ||
target_link_libraries(main_asynccreation ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_asynccreation ./main_asynccreation DEPENDS main_asynccreation PopObject3.obj) | ||
add_test(NAME run_asynccreation COMMAND ./main_asynccreation WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Tests with large amounts of data. | ||
# | ||
project(popc_tests_bigdata) | ||
|
||
pop_add_object(POPObject POPObject.hpp) | ||
add_executable(main_bigdata main.cc ${CMAKE_CURRENT_BINARY_DIR}/POPObject.iface.hpp) | ||
target_link_libraries(main_bigdata ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_bigdata ./main_bigdata DEPENDS main_bigdata POPObject.obj) | ||
add_test(NAME run_bigdata COMMAND ./main_bigdata WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Example using callback functions. | ||
# | ||
project(popc_tests_callback) | ||
|
||
pop_add_objects("Titi;Toto" "titi.hpp;titi.cc;toto.hpp;toto.cc") | ||
add_executable(main_callback main.cc ${CMAKE_CURRENT_BINARY_DIR}/Titi.iface.hpp ${CMAKE_CURRENT_BINARY_DIR}/Toto.iface.hpp) | ||
target_link_libraries(main_callback ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_callback ./main_callback DEPENDS main_callback Titi.obj Toto.obj) | ||
add_test(NAME run_callback COMMAND ./main_callback WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Demonstrate the use of inheritence for parallel objects. | ||
# | ||
project(popc_tests_heritage) | ||
|
||
pop_add_objects("Child;Mother" "child.hpp;child.cc;mother.hpp;mother.cc") | ||
add_executable(main_heritage main.cc ${CMAKE_CURRENT_BINARY_DIR}/Child.iface.hpp ${CMAKE_CURRENT_BINARY_DIR}/Mother.iface.hpp) | ||
target_link_libraries(main_heritage ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_heritage ./main_heritage DEPENDS main_heritage Child.obj Mother.obj) | ||
add_test(NAME run_heritage COMMAND ./main_heritage WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Example with different C++ classes from stdlib. | ||
# | ||
project(popc_tests_stdlib) | ||
|
||
pop_add_object(TestMethod method.hpp method.cc) | ||
add_executable(main_stdlib main.cc ${CMAKE_CURRENT_BINARY_DIR}/TestMethod.iface.hpp) | ||
target_link_libraries(main_stdlib ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_stdlib ./main_stdlib DEPENDS main_stdlib TestMethod.obj) | ||
add_test(NAME run_stdlib COMMAND ./main_stdlib WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Test poplite in difficult cases. | ||
# | ||
project(popc_tests_stresstest) | ||
|
||
pop_add_object(stress_test::POPObject POPObject.hpp POPObject.cc) | ||
add_executable(main_stresstest main.cc ${CMAKE_CURRENT_BINARY_DIR}/stress_test/POPObject.iface.hpp) | ||
target_link_libraries(main_stresstest ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_stresstest ./main_stresstest 200 DEPENDS main_stresstest stress_test.POPObject.obj) | ||
add_test(NAME run_stresstest COMMAND ./main_stresstest 200 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Example using tree-like structures. | ||
# | ||
project(popc_tests_tree) | ||
|
||
pop_add_object(Tree tree.hpp tree.cc) | ||
add_executable(main_tree main.cc ${CMAKE_CURRENT_BINARY_DIR}/Tree.iface.hpp) | ||
target_link_libraries(main_tree ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_tree ./main_tree 3 4 DEPENDS main_tree Tree.obj) | ||
add_test(NAME run_tree COMMAND ./main_tree 3 4 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
project(poplite_examples) | ||
|
||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
add_subdirectory(default_values) | ||
add_subdirectory(get_and_set) | ||
add_subdirectory(inheritance) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,16 @@ | ||
# | ||
# Copyright (c) Laurent Winkler 2019 | ||
# | ||
# Distributed under the Boost Software License, Version 1.0. (See accompanying | ||
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | ||
# | ||
# Test the use of default values for C++ methods. | ||
# | ||
project(tests_default_values) | ||
|
||
pop_add_object(tester_default tester_default.hpp) | ||
add_executable(main_default_values main.cpp ${CMAKE_CURRENT_BINARY_DIR}/tester_default.iface.hpp) | ||
target_link_libraries(main_default_values ${Boost_LIBRARIES}) | ||
|
||
add_custom_target(run_default_values ./main_default_values DEPENDS main_default_values tester_default.obj) | ||
add_test(NAME run_default_values COMMAND ./main_default_values WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.