File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2727 add_definitions (-DWITHOUT_NUMPY )
2828endif ()
2929
30- # add_subdirectory("examples")
31- set (CMAKE_CXX_STANDARD 17)
32- add_executable (basic examples/basic.cpp matplotlibcpp.h )
33- target_link_libraries (basic ${Python3_LIBRARIES} )
30+ add_subdirectory (examples )
Original file line number Diff line number Diff line change 1+ function (add_example basename )
2+ # set C++ standard to C++17
3+ set (CMAKE_CXX_STANDARD 17)
4+
5+ # add WITH_EIGEN, if specified
6+ if (WITH_EIGEN)
7+ add_definitions ("-DWITH_EIGEN" )
8+ endif ()
9+
10+ # add the exectuable and link it to the Python libs
11+ add_executable (${basename} ${basename} .cpp ../matplotlibcpp.h )
12+ target_link_libraries (${basename} ${Python3_LIBRARIES} )
13+ endfunction (add_example )
14+
15+ # add the executables
16+ add_example (bar )
17+ add_example (basic )
18+ add_example (eigen )
19+ add_example (errorbar )
20+ add_example (fill_inbetween )
21+ add_example (fill )
22+ add_example (loglog )
23+ add_example (minimal )
24+ add_example (modern )
25+ add_example (nonblock )
26+ add_example (quiver )
27+ add_example (semilogx )
28+ add_example (semilogy )
29+ add_example (small )
30+ add_example (spy )
31+ add_example (subplot )
32+ add_example (surface )
33+ add_example (update )
34+ add_example (xkcd )
You can’t perform that action at this time.
0 commit comments