File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# examples_C++ Configuration
22include_directories ("${CMAKE_SOURCE_DIR } /src/cpp" )
33
4- # Find all .cpp files in the examples directory
5- file (GLOB EXAMPLE_SOURCES *.cpp )
4+ set (EXAMPLE_SOURCES
5+ backward_euler.cpp
6+ burgers1D.cpp
7+ convection_diffusion3D.cpp
8+ elliptic1D.cpp
9+ elliptic1DHomogeneousDirichlet.cpp
10+ elliptic1DLeftNeumannRightDirichlet.cpp
11+ elliptic1DLeftNeumannRightNeumann.cpp
12+ elliptic1DNonHomogeneousDirichlet.cpp
13+ elliptic2D.cpp
14+ elliptic2D_x_dirichlet_y_dirichlet.cpp
15+ elliptic3D.cpp
16+ hyperbolic1D_upwind.cpp
17+ lock_exchange.cpp
18+ maxwell1D.cpp
19+ parabolic1D.cpp
20+ poisson2D.cpp
21+ poisson_2D_dirichlet.cpp
22+ RK2.cpp
23+ schrodinger1D.cpp
24+ schrodinger2D.cpp
25+ sturmLiouvilleBessel.cpp
26+ sturmLiouvilleChebyshev.cpp
27+ sturmLiouvilleHelmholtzDirichletDirichlet.cpp
28+ sturmLiouvilleHelmholtzDirichletRobin.cpp
29+ sturmLiouvilleHermite.cpp
30+ sturmLiouvilleLaguerre.cpp
31+ sturmLiouvilleLegendre.cpp
32+ transport1D.cpp
33+ wave1d_case2.cpp
34+ wave1d.cpp
35+ wave2d_case2.cpp
36+ wave2d.cpp
37+ )
638
739# Create executables for each source file
840foreach (EXAMPLE_SOURCE ${EXAMPLE_SOURCES} )
941 get_filename_component (EXAMPLE_NAME ${EXAMPLE_SOURCE} NAME_WE )
1042 add_executable (${EXAMPLE_NAME} ${EXAMPLE_SOURCE} )
1143 target_link_libraries (${EXAMPLE_NAME} PUBLIC mole_C++ ${LINK_LIBS} )
12- endforeach ()
44+ endforeach ()
Original file line number Diff line number Diff line change 11# mole_C++ Library Configuration
22
3- file (GLOB SOURCES *.cpp )
4- add_library (mole_C++ ${SOURCES} )
3+ add_library (mole_C++
4+ addscalarbc.cpp
5+ divergence.cpp
6+ gradient.cpp
7+ interpol.cpp
8+ laplacian.cpp
9+ mixedbc.cpp
10+ robinbc.cpp
11+ utils.cpp
12+ )
513target_include_directories (mole_C++ PUBLIC ${ARMADILLO_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${OpenBLAS_INCLUDE_DIRS} ${SUPERLU_INCLUDE_DIR} )
614target_link_libraries (mole_C++ PUBLIC ${LINK_LIBS} )
715
@@ -11,4 +19,4 @@ install(TARGETS mole_C++ DESTINATION lib)
1119
1220
1321# ${CMAKE_INSTALL_PREFIX}/lib for custom installation path.
14- # ${CMAKE_BINARY_DIR}/install for cmake build directory installation
22+ # ${CMAKE_BINARY_DIR}/install for cmake build directory installation
Original file line number Diff line number Diff line change @@ -13,8 +13,14 @@ FetchContent_Declare(
1313# Set up the fetched content
1414FetchContent_MakeAvailable (googletest)
1515
16- # Find all test*.cpp files
17- file (GLOB TEST_SOURCES test *.cpp )
16+ set (TEST_SOURCES
17+ test1.cpp
18+ test2.cpp
19+ test3.cpp
20+ test4.cpp
21+ test5.cpp
22+ test_addscalarbc.cpp
23+ )
1824
1925set (TEST_EXECUTABLES "" )
2026
@@ -38,5 +44,4 @@ endforeach()
3844add_custom_target (run_tests
3945 COMMAND ${CMAKE_CTEST_COMMAND } --output-on-failure
4046 DEPENDS ${TEST_EXECUTABLES}
41- )
42-
47+ )
You can’t perform that action at this time.
0 commit comments