Skip to content

Commit ce20a1b

Browse files
Clean up examples
1 parent 3aa9a8f commit ce20a1b

3 files changed

Lines changed: 8 additions & 28 deletions

File tree

examples/CMakeLists.txt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Include Dependencies
2-
add_subdirectory(fplot)
32
add_subdirectory(fortran_csv_module)
3+
include(FetchContent)
4+
FetchContent_Declare(
5+
fplot
6+
GIT_REPOSITORY "https://github.com/jchristopherson/fplot"
7+
)
8+
FetchContent_MakeAvailable(fplot)
9+
set(fplot_LIBRARY fplot)
410

511
# Full Factorial Example
612
add_executable(full_factorial_example full_factorial_example.f90)
@@ -27,56 +33,46 @@ configure_file(
2733
add_executable(allan_example allan_example.f90)
2834
target_link_libraries(allan_example fstats)
2935
target_link_libraries(allan_example ${fplot_LIBRARY})
30-
target_include_directories(allan_example PUBLIC ${fplot_INCLUDE_DIR})
3136
target_link_libraries(allan_example ${fortran-csv-module_LIBRARY})
3237
target_include_directories(allan_example PUBLIC ${fortran-csv-module_INCLUDE_DIR})
3338

3439
# Box-Muller Example
3540
add_executable(box_muller_example box_muller_example.f90)
3641
target_link_libraries(box_muller_example fstats ${fplot_LIBRARY})
37-
target_include_directories(box_muller_example PUBLIC ${fplot_INCLUDE_DIR})
3842

3943
# Rejection Sampling Example
4044
add_executable(rejection_sample_example rejection_sample_example.f90)
4145
target_link_libraries(rejection_sample_example fstats ${fplot_LIBRARY})
42-
target_include_directories(rejection_sample_example PUBLIC ${fplot_INCLUDE_DIR})
4346

4447
# LOWESS Example
4548
add_executable(lowess_example lowess_example.f90)
4649
target_link_libraries(lowess_example fstats ${fplot_LIBRARY})
47-
target_include_directories(lowess_example PUBLIC ${fplot_INCLUDE_DIR})
4850

4951
# Bootstrap Example
5052
add_executable(bootstrap_example bootstrap_example.f90)
5153
target_link_libraries(bootstrap_example fstats ${fplot_LIBRARY})
52-
target_include_directories(bootstrap_example PUBLIC ${fplot_INCLUDE_DIR})
5354

5455
# MCMC Regression Example
5556
add_executable(mcmc_regression_example mcmc_regression_example.f90)
5657
target_link_libraries(mcmc_regression_example fstats)
5758
target_link_libraries(mcmc_regression_example ${fplot_LIBRARY})
58-
target_include_directories(mcmc_regression_example PUBLIC ${fplot_INCLUDE_DIR})
5959

6060
# MCMC Regression Example 2
6161
add_executable(mcmc_regression_example_2 mcmc_regression_example_2.f90)
6262
target_link_libraries(mcmc_regression_example_2 fstats)
6363
target_link_libraries(mcmc_regression_example_2 ${fplot_LIBRARY})
64-
target_include_directories(mcmc_regression_example_2 PUBLIC ${fplot_INCLUDE_DIR})
6564

6665
# MCMC Regression Example 3
6766
add_executable(mcmc_regression_example_3 mcmc_regression_example_3.f90)
6867
target_link_libraries(mcmc_regression_example_3 fstats)
6968
target_link_libraries(mcmc_regression_example_3 ${fplot_LIBRARY})
70-
target_include_directories(mcmc_regression_example_3 PUBLIC ${fplot_INCLUDE_DIR})
7169

7270
# Distribution Example
7371
add_executable(distribution_example distribution_example.f90)
7472
target_link_libraries(distribution_example fstats)
7573
target_link_libraries(distribution_example ${fplot_LIBRARY})
76-
target_include_directories(distribution_example PUBLIC ${fplot_INCLUDE_DIR})
7774

7875
# Interpolation Example
7976
add_executable(interpolation_example interpolation_example.f90)
8077
target_link_libraries(interpolation_example fstats)
8178
target_link_libraries(interpolation_example ${fplot_LIBRARY})
82-
target_include_directories(interpolation_example PUBLIC ${fplot_INCLUDE_DIR})

examples/distribution_example.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module distribution_plotting_module
22
use iso_fortran_env
3-
use fplot_core
43
use fstats
4+
use fplot_core
55
implicit none
66

77
contains

examples/fplot/CMakeLists.txt

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)