Skip to content

Commit 835b996

Browse files
committed
Add IceDiscovery CMake files
1 parent ea74f30 commit 835b996

File tree

4 files changed

+79
-6
lines changed

4 files changed

+79
-6
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(icediscovery_hello CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(client Client.cpp Hello.ice)
8+
slice2cpp_generate(client)
9+
target_link_libraries(client Ice::Ice)
10+
11+
add_executable(server Server.cpp HelloI.cpp HelloI.h Hello.ice)
12+
slice2cpp_generate(server)
13+
target_link_libraries(server Ice::Ice)

cpp/IceDiscovery/hello/README.md

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,40 @@
1+
# IceGrid Hello
2+
13
This demo is the Ice hello world demo configured to use [IceDiscovery][1].
24

5+
To build the demo run:
6+
7+
```shell
8+
cmake -B build
9+
cmake --build build --config Release
10+
```
11+
312
To run the demo, first start the server:
413

14+
**Linux/macOS:**
15+
16+
```shell
17+
./build/server
518
```
6-
server
19+
20+
**Windows:**
21+
22+
```shell
23+
build\Release\server
724
```
825

926
In a separate window, start the client:
1027

28+
**Linux/macOS:**
29+
30+
```shell
31+
./build/client
1132
```
12-
client
33+
34+
**Windows:**
35+
36+
```shell
37+
build\Release\client
1338
```
1439

1540
The client and server use IceDiscovery to enable the location of the
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
cmake_minimum_required(VERSION 3.16)
2+
3+
project(icediscovery_replication CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(client Client.cpp Hello.ice)
8+
slice2cpp_generate(client)
9+
target_link_libraries(client Ice::Ice)
10+
11+
add_executable(server Server.cpp HelloI.cpp HelloI.h Hello.ice)
12+
slice2cpp_generate(server)
13+
target_link_libraries(server Ice::Ice)

cpp/IceDiscovery/replication/README.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,39 @@
1+
# IceDiscovery Replication
2+
13
This demo shows how to use replication with [IceDiscovery][1].
24

35
To run the demo, start the 3 servers:
46

7+
**Linux/macOS:**
8+
9+
```shell
10+
./build/client --Ice.Config=config.server1
11+
./build/client --Ice.Config=config.server2
12+
./build/client --Ice.Config=config.server3
513
```
6-
server --Ice.Config=config.server1
7-
server --Ice.Config=config.server2
8-
server --Ice.Config=config.server3
14+
15+
**Windows:**
16+
17+
```shell
18+
build\Release\client --Ice.Config=config.server1
19+
build\Release\client --Ice.Config=config.server2
20+
build\Release\client --Ice.Config=config.server3
921
```
1022

23+
Server is located in the `build` directory on Linux/macOS and in the `build\Release` directory on Windows.
24+
1125
In a separate window:
1226

27+
**Linux/macOS:**
28+
29+
```shell
30+
./build/client
1331
```
14-
client
32+
33+
**Windows:**
34+
35+
```shell
36+
build\Release\client
1537
```
1638

1739
The client invokes the number of specified iterations with a given

0 commit comments

Comments
 (0)