Skip to content

Commit e2aa8ef

Browse files
authored
Upgraded cppsm (#29)
New boilerplate make root CMakeLists.txt act like a pure library by default.
1 parent 8c5d018 commit e2aa8ef

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

.cppsm

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
cmake_minimum_required(VERSION 3.9)
1+
cmake_minimum_required(VERSION 3.10)
22
project(trade.cpp)
33
include(.cppsm/c++17.cmake)

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,28 @@ cd trade.cpp
6868
git submodule update --init
6969
mkdir .build
7070
cd .build
71-
cmake ..
71+
cmake -DCPPSM=1 ..
7272
make all test
7373
```
7474

75+
Above the `-DCPPSM=1` option specifies that internal targets should be included,
76+
which is what you want when you are developing Trade.C++ itself.
77+
78+
If you are not using `cppsm` in your project and just want to use Trade.C++, you
79+
should be able to just
80+
81+
```cmake
82+
add_subdirectory(path-to/trade.cpp)
83+
```
84+
85+
and then
86+
87+
```cmake
88+
target_link_libraries(your-target PRIVATE trade_v1)
89+
```
90+
91+
in your CMake files.
92+
7593
### <a id="basics"></a> [](#contents) [Basics](#basics)
7694

7795
Using this library one stores values in `atom`s that can then be accessed from

0 commit comments

Comments
 (0)