Add ExprTk_BUILD_EXAMPLES to build examples
Also move examples into an examples folder
This commit is contained in:
parent
2c35cb4e74
commit
1491ae63ca
|
@ -48,3 +48,10 @@ if (ExprTk_BUILD_TESTING)
|
|||
enable_testing()
|
||||
add_subdirectory(tests)
|
||||
endif ()
|
||||
|
||||
# create an ExprTK option for building examples
|
||||
option(ExprTk_BUILD_EXAMPLES "Build ExprTk examples" ON)
|
||||
# if ExprTk_BUILD_EXAMPLES is set to ON, then build the examples
|
||||
if (ExprTk_BUILD_EXAMPLES)
|
||||
add_subdirectory(examples)
|
||||
endif ()
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
# **************************************************************
|
||||
# * C++ Mathematical Expression Toolkit Library *
|
||||
# * *
|
||||
# * Author: Arash Partow (1999-2023) *
|
||||
# * URL: https://www.partow.net/programming/exprtk/index.html *
|
||||
# * *
|
||||
# * Copyright notice: *
|
||||
# * Free use of the Mathematical Expression Toolkit Library is *
|
||||
# * permitted under the guidelines and in accordance with the *
|
||||
# * most current version of the MIT License. *
|
||||
# * http://www.opensource.org/licenses/MIT *
|
||||
# * *
|
||||
# **************************************************************
|
||||
|
||||
# create executables for each example
|
||||
add_executable(exprtk_simple_example_01 exprtk_simple_example_01.cpp)
|
||||
target_link_libraries(exprtk_simple_example_01 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_02 exprtk_simple_example_02.cpp)
|
||||
target_link_libraries(exprtk_simple_example_02 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_03 exprtk_simple_example_03.cpp)
|
||||
target_link_libraries(exprtk_simple_example_03 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_04 exprtk_simple_example_04.cpp)
|
||||
target_link_libraries(exprtk_simple_example_04 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_05 exprtk_simple_example_05.cpp)
|
||||
target_link_libraries(exprtk_simple_example_05 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_06 exprtk_simple_example_06.cpp)
|
||||
target_link_libraries(exprtk_simple_example_06 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_07 exprtk_simple_example_07.cpp)
|
||||
target_link_libraries(exprtk_simple_example_07 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_08 exprtk_simple_example_08.cpp)
|
||||
target_link_libraries(exprtk_simple_example_08 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_09 exprtk_simple_example_09.cpp)
|
||||
target_link_libraries(exprtk_simple_example_09 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_10 exprtk_simple_example_10.cpp)
|
||||
target_link_libraries(exprtk_simple_example_10 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_11 exprtk_simple_example_11.cpp)
|
||||
target_link_libraries(exprtk_simple_example_11 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_12 exprtk_simple_example_12.cpp)
|
||||
target_link_libraries(exprtk_simple_example_12 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_13 exprtk_simple_example_13.cpp)
|
||||
target_link_libraries(exprtk_simple_example_13 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_14 exprtk_simple_example_14.cpp)
|
||||
target_link_libraries(exprtk_simple_example_14 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_15 exprtk_simple_example_15.cpp)
|
||||
target_link_libraries(exprtk_simple_example_15 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_16 exprtk_simple_example_16.cpp)
|
||||
target_link_libraries(exprtk_simple_example_16 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_17 exprtk_simple_example_17.cpp)
|
||||
target_link_libraries(exprtk_simple_example_17 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_18 exprtk_simple_example_18.cpp)
|
||||
target_link_libraries(exprtk_simple_example_18 ExprTk)
|
||||
|
||||
add_executable(exprtk_simple_example_19 exprtk_simple_example_19.cpp)
|
||||
target_link_libraries(exprtk_simple_example_19 ExprTk)
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void trig_function()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void square_wave()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void polynomial()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void fibonacci()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct myfunc : public exprtk::ifunction<T>
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void vector_function()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void logic()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void composite()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void primes()
|
||||
{
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void newton_sqrt()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void square_wave2()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void bubble_sort()
|
||||
{
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void savitzky_golay_filter()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void stddev_example()
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void black_scholes_merton_model()
|
||||
{
|
|
@ -22,7 +22,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void linear_least_squares()
|
||||
{
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct rnd_01 : public exprtk::ifunction<T>
|
||||
{
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
void file_io()
|
||||
{
|
|
@ -23,7 +23,6 @@
|
|||
|
||||
#include "exprtk.hpp"
|
||||
|
||||
|
||||
template <typename T>
|
||||
class randu : public exprtk::igeneric_function<T>
|
||||
{
|
Loading…
Reference in New Issue