forked from lava/matplotlib-cpp
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMakeLists for all executables in examples folder
- Loading branch information
Showing
2 changed files
with
35 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
function(add_example basename) | ||
# set C++ standard to C++17 | ||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
# add WITH_EIGEN, if specified | ||
if(WITH_EIGEN) | ||
add_definitions("-DWITH_EIGEN") | ||
endif() | ||
|
||
# add the exectuable and link it to the Python libs | ||
add_executable(${basename} ${basename}.cpp ../matplotlibcpp.h) | ||
target_link_libraries(${basename} ${Python3_LIBRARIES}) | ||
endfunction(add_example) | ||
|
||
# add the executables | ||
add_example(bar) | ||
add_example(basic) | ||
add_example(eigen) | ||
add_example(errorbar) | ||
add_example(fill_inbetween) | ||
add_example(fill) | ||
add_example(loglog) | ||
add_example(minimal) | ||
add_example(modern) | ||
add_example(nonblock) | ||
add_example(quiver) | ||
add_example(semilogx) | ||
add_example(semilogy) | ||
add_example(small) | ||
add_example(spy) | ||
add_example(subplot) | ||
add_example(surface) | ||
add_example(update) | ||
add_example(xkcd) |