Commit 14b7c37e2d6baa1af6e2ef802e9c7bbb77ad6530

Authored by Hacene SI HADJ MOHAND
1 parent 14af65f9
Exists in master

library ok and tests ok

cainlib/CMakeLists.txt
... ... @@ -16,12 +16,6 @@ file(
16 16  
17 17 add_library(cainlib SHARED ${source_files})
18 18  
19   -add_custom_command( TARGET cainlib
20   - POST_BUILD
21   - COMMAND ${CMAKE_COMMAND} -E echo "Copying unit test data.."
22   - sOMMAND ${CMAKE_COMMAND} -E copy_directory src/FSU_mars90 cainlib
23   - )
24   -
25 19 SET_TARGET_PROPERTIES(cainlib PROPERTIES LINKER_LANGUAGE CXX)
26 20  
27 21 install (TARGETS cainlib DESTINATION lib)
... ...
cainlib/README 0 โ†’ 100644
... ... @@ -0,0 +1,4 @@
  1 +Cain library
  2 +Based on "JURNAL OF GEOPHYSICAL RESEARCH, VOL. 108, NO. E2, 5008, doi:10.1029/2000JE001487, 200"
  3 +the installation script will generate cain.f90 from cain.in
  4 +
... ...
cainlib/src/cain.f90 renamed to cainlib/src/cain.in
... ... @@ -14,8 +14,8 @@
14 14 !-------------------------------------------------------------
15 15 implicit real (kind=8) (a-h,o-z)
16 16 external cread, gfield
17   - character(2000) :: coeffs_cain_file ="/home/hacene/amda/AMDA_COTS/&
18   - &cainlib/src/FSU_mars90"
  17 + character(2000) :: coeffs_cain_file ="_path_&
  18 + &FSU_mars90"
19 19 integer l
20 20 common /trace/rm, maxln
21 21 ! real dlat,dlong,alt,Btt,Bpp,Brr,Bx,By,Bz,B
... ...
cainlib/src/postcompil.sh 0 โ†’ 100755
... ... @@ -0,0 +1,3 @@
  1 +#!/bin/bash
  2 +FULL_PATH="$(realpath "${0}" | xargs dirname)"
  3 +rm -f $FULL_PATH/cain.f90
... ...
cainlib/src/precompil.sh 0 โ†’ 100755
... ... @@ -0,0 +1,5 @@
  1 +#!/bin/bash
  2 +FULL_PATH="$(realpath "${0}" | xargs dirname)"
  3 +currentPath=$(echo $FULL_PATH | sed 's_/_\\/_g')
  4 +cp $FULL_PATH/cain.in $FULL_PATH/cain.f90
  5 +sed -i -e "s/_path_/${currentPath}/g" $FULL_PATH/cain.f90
... ...