Skip to content

Commit 29c70aa

Browse files
committed
Add cpp/Manual CMake files
1 parent ea74f30 commit 29c70aa

File tree

5 files changed

+86
-9
lines changed

5 files changed

+86
-9
lines changed

cpp/Manual/printer/CMakeLists.txt

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(manual_printer CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(client Client.cpp Printer.ice)
8+
slice2cpp_generate(client)
9+
target_link_libraries(client Ice::Ice)
10+
11+
add_executable(server Server.cpp Printer.ice)
12+
slice2cpp_generate(server)
13+
target_link_libraries(server Ice::Ice)

cpp/Manual/printer/README.md

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,38 @@
1+
# Manual Printer
2+
13
This demo implements the printer example in the Ice Manual.
24

3-
To run it, start the server in a window:
5+
To build the demo run:
6+
7+
```shell
8+
cmake -B build
9+
cmake --build build --config Release
10+
```
11+
12+
To run the demo, first start the server:
13+
14+
**Linux/macOS:**
415

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

9-
In a separate window, run the client:
26+
In a separate window, start the client:
27+
28+
**Linux/macOS:**
1029

30+
```shell
31+
./build/client
1132
```
12-
client
33+
34+
**Windows:**
35+
36+
```shell
37+
build\Release\client
1338
```
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(manual_simpleFilesystem CXX)
4+
5+
include(../../cmake/common.cmake)
6+
7+
add_executable(client Client.cpp Filesystem.ice)
8+
slice2cpp_generate(client)
9+
target_link_libraries(client Ice::Ice)
10+
11+
add_executable(server Server.cpp FilesystemI.cpp FilesystemI.h Filesystem.ice)
12+
slice2cpp_generate(server)
13+
target_link_libraries(server Ice::Ice)

cpp/Manual/simpleFilesystem/FilesystemI.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Copyright (c) ZeroC, Inc.
22

3-
#include <FilesystemI.h>
3+
#include "FilesystemI.h"
4+
45
#include <Ice/Ice.h>
56

67
using namespace std;
Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,39 @@
1+
# Manual Simple Filesystem
2+
13
This demo implements the simple filesystem application shown at the
24
end of the client and server C++ mapping chapters.
35

4-
To run it, start the server in a window:
6+
To build the demo run:
7+
8+
```shell
9+
cmake -B build
10+
cmake --build build --config Release
11+
```
12+
13+
To run the demo, first start the server:
14+
15+
**Linux/macOS:**
516

17+
```shell
18+
./build/server
619
```
7-
server
20+
21+
**Windows:**
22+
23+
```shell
24+
build\Release\server
825
```
926

10-
Then run the client in a separate window:
27+
In a separate window, start the client:
28+
29+
**Linux/macOS:**
1130

31+
```shell
32+
./build/client
1233
```
13-
client
34+
35+
**Windows:**
36+
37+
```shell
38+
build\Release\client
1439
```

0 commit comments

Comments
 (0)