Skip to content

Commit

Permalink
Add CMake support + restructure code + remove makefiles (#1)
Browse files Browse the repository at this point in the history
Add CMake support, move all source code under the the src folder and remove existing makefiles. Add support for creating a TEB library to allow TEB functions to be easily called in from external models.
  • Loading branch information
dmey authored Apr 23, 2019
1 parent fc27fb7 commit 1809573
Show file tree
Hide file tree
Showing 183 changed files with 408 additions and 1,946 deletions.
41 changes: 41 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Build
build/

#macOS
.DS_Store

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# TEB test output files
tests/CAPITOUL/output/*.txt
43 changes: 43 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 3.1)
project(TEB Fortran)

set(CMAKE_Fortran_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/mod)

set(src_driver
src/driver/abor1_sfx.F90
src/driver/add_forecast_to_date_surf.F90
src/driver/close_file.F90
src/driver/close_file_asc.F90
src/driver/driver.F90
src/driver/modd_arch.F90
src/driver/modd_forc_atm.F90
src/driver/modd_reprod_oper.F90
src/driver/modd_surf_conf.F90
src/driver/mode_char2real.F90
src/driver/ol_alloc_atm.F90
src/driver/ol_read_atm.F90
src/driver/ol_read_atm_ascii.F90
src/driver/ol_time_interp_atm.F90
src/driver/open_close_bin_asc_forc.F90
src/driver/read_surf_atm.F90
)

file(GLOB_RECURSE src_proxi_SVAT "src/proxi_SVAT/*")
file(GLOB_RECURSE src_solar "src/solar/*")
file(GLOB_RECURSE src_struct "src/struct/*")
file(GLOB_RECURSE src_teb "src/teb/*")

add_library(teb STATIC
${src_driver}
${src_proxi_SVAT}
${src_solar}
${src_struct}
${src_teb}
)

add_executable(driver src/driver/driver.F90)
target_link_libraries(driver teb)

target_include_directories(teb
INTERFACE ${CMAKE_Fortran_MODULE_DIRECTORY}
)
6 changes: 3 additions & 3 deletions Licence_CeCILL-C_V1-en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the two main principles guiding its drafting:
The authors of the CeCILL-C (for Ce[a] C[nrs] I[nria] L[ogiciel] L[ibre])
license are:

Commissariat l'Energie Atomique - CEA, a public scientific, technical
Commissariat à l'Energie Atomique - CEA, a public scientific, technical
and industrial research establishment, having its principal place of
business at 25 rue Leblanc, immeuble Le Ponant D, 75015 Paris, France.

Expand Down Expand Up @@ -338,7 +338,7 @@ The Licensee expressly undertakes:

The Licensee undertakes not to directly or indirectly infringe the
intellectual property rights of the Holder and/or Contributors on the
Software and to take, where applicable, vis--vis its staff, any and all
Software and to take, where applicable, vis-à-vis its staff, any and all
measures required to ensure respect of said intellectual property rights
of the Holder and/or Contributors.

Expand Down Expand Up @@ -514,4 +514,4 @@ disagreements or disputes shall be referred to the Paris Courts having
jurisdiction, by the more diligent Party.


Version 1.0 dated 2006-09-05.
Version 1.0 dated 2006-09-05.
Loading

0 comments on commit 1809573

Please sign in to comment.