File tree Expand file tree Collapse file tree 6 files changed +71
-7
lines changed
Expand file tree Collapse file tree 6 files changed +71
-7
lines changed Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.14)
2+
3+ project (
4+ "SPH"
5+ LANGUAGES "Fortran"
6+ VERSION "0.0.1"
7+ )
8+
9+ # Collect source of the project
10+ add_subdirectory ("src" )
11+
12+ # Collect source of the application
13+ add_subdirectory ("app" )
14+
15+ # Include test suite
16+ #enable_testing()
17+ #add_subdirectory("test")
Original file line number Diff line number Diff line change 1+ set (prog
2+ sph.f
3+ )
4+
5+ add_executable (
6+ "${PROJECT_NAME} -exe"
7+ "${prog} "
8+ )
9+
10+ target_link_libraries (
11+ "${PROJECT_NAME} -exe"
12+ PRIVATE
13+ "${PROJECT_NAME} -lib"
14+ )
Original file line number Diff line number Diff line change 33# Orginal test
44sph : sph.o
55 $(FC ) $(FFLAGS ) $< -L../src -l$(LIB ) -I../src -o $@ .x
6- cd .. && time ./app/sph.x
6+ cd .. && time ./app/sph.x
7+
8+ clean :
9+ rm -f -r * .o * .x * .so * .mod * .smod
Original file line number Diff line number Diff line change 1- name = " sph_code "
1+ name = " SPH "
22
33[build ]
44auto-executables = false
5- auto-tests = false
6- auto-examples = false
5+ auto-tests = false
6+ auto-examples = false
77
88[library ]
99include-dir = " src"
1010
1111[[executable ]]
12- name = " sph"
13- source-dir = " app"
14- main = " sph.f"
12+ name = " sph"
13+ source-dir = " app"
14+ main = " sph.f"
Original file line number Diff line number Diff line change 1+ set (SRC
2+ art_heat.f
3+ art_visc.f
4+ av_vel.f
5+ density.f
6+ direct_find.f
7+ eos.f
8+ external_force.f
9+ grid_geom.f
10+ hsml.f
11+ init_grid.f
12+ input .f
13+ internal_force.f
14+ kernel.f
15+ link_list.f
16+ output .f
17+ single_step.f
18+ time_integration.f
19+ virt_part.f
20+ viscosity.f
21+ time_elapsed.f90
22+ time_print.f90
23+ )
24+
25+ add_library (${PROJECT_NAME} -lib ${SRC} )
Original file line number Diff line number Diff line change 1+ set (dir "${CMAKE_CURRENT_SOURCE_DIR} " )
2+
3+ set (
4+ ""
5+ )
You can’t perform that action at this time.
0 commit comments