diff options
| author | Aiden Woodruff <woodra@rpi.edu> | 2025-10-23 14:23:23 -0400 |
|---|---|---|
| committer | Aiden Woodruff <woodra@rpi.edu> | 2025-10-23 14:23:23 -0400 |
| commit | b8dcccdae593d36d4a45b26049d6049eb3007181 (patch) | |
| tree | 0f6628be92f9688023ca1ed38856e3a44594c7af | |
| parent | ff675a7e2b25ed61e95e56c35d70874dc3e63a61 (diff) | |
| download | tipping-points-b8dcccdae593d36d4a45b26049d6049eb3007181.tar.gz tipping-points-b8dcccdae593d36d4a45b26049d6049eb3007181.tar.bz2 tipping-points-b8dcccdae593d36d4a45b26049d6049eb3007181.zip | |
use snap in main
- cmake/GetSNAP.cmake: add include directory to imported target.
- src/main.cc: include SNAP and simple graph.
Signed-off-by: Aiden Woodruff <woodra@rpi.edu>
| -rw-r--r-- | cmake/GetSNAP.cmake | 7 | ||||
| -rw-r--r-- | src/main.cc | 5 |
2 files changed, 10 insertions, 2 deletions
diff --git a/cmake/GetSNAP.cmake b/cmake/GetSNAP.cmake index 87b8c65..4bcef96 100644 --- a/cmake/GetSNAP.cmake +++ b/cmake/GetSNAP.cmake | |||
| @@ -17,5 +17,10 @@ set(SNAP_SOURCE_DIR "${SOURCE_DIR}") | |||
| 17 | add_library(SNAP::SNAP STATIC IMPORTED) | 17 | add_library(SNAP::SNAP STATIC IMPORTED) |
| 18 | set_property(TARGET SNAP::SNAP | 18 | set_property(TARGET SNAP::SNAP |
| 19 | PROPERTY IMPORTED_LOCATION | 19 | PROPERTY IMPORTED_LOCATION |
| 20 | ${SNAP_SOURCE_DIR}/snap-core/libsnap.a | 20 | "${SNAP_SOURCE_DIR}/snap-core/libsnap.a" |
| 21 | ) | ||
| 22 | target_include_directories(SNAP::SNAP | ||
| 23 | INTERFACE | ||
| 24 | "${SNAP_SOURCE_DIR}/snap-core" | ||
| 25 | "${SNAP_SOURCE_DIR}/glib-core" | ||
| 21 | ) | 26 | ) |
diff --git a/src/main.cc b/src/main.cc index 6e80c53..0c1177d 100644 --- a/src/main.cc +++ b/src/main.cc | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | #include <iostream> | 1 | #include <iostream> |
| 2 | 2 | ||
| 3 | #include <Snap.h> | ||
| 4 | |||
| 3 | int main(int argc, char* argv[]) { | 5 | int main(int argc, char* argv[]) { |
| 4 | std::cout << "Hello world." << std::endl; | 6 | PNGraph g = TNGraph::New(); |
| 7 | g = TNGraph::New(); | ||
| 5 | return 0; | 8 | return 0; |
| 6 | } | 9 | } |
