Add cmake rules for stanford modules
CMake can be told to build the separate Stanford modules in stdproc via the ISCE2_WITH_STANFORD configuration option. If not specified, it will be auto-enabled at configuration time if the stanford_license magic is not None.LT1AB
parent
790f25798d
commit
43cf756916
|
|
@ -66,6 +66,21 @@ InstallSameDir(
|
||||||
release_history.py
|
release_history.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
file(READ license.py LICENSE_TXT)
|
||||||
|
string(FIND "${LICENSE_TXT}" "stanford_license = None" match)
|
||||||
|
if(${match} EQUAL -1)
|
||||||
|
set(ISCE2_HAVE_LICENSE YES)
|
||||||
|
else()
|
||||||
|
set(ISCE2_HAVE_LICENSE NO)
|
||||||
|
endif()
|
||||||
|
option(ISCE2_WITH_STANFORD "Build Stanford components" ${ISCE2_HAVE_LICENSE})
|
||||||
|
if(ISCE2_WITH_STANFORD)
|
||||||
|
InstallSameDir(license.py)
|
||||||
|
message(STATUS "ISCE2's Stanford-licensed components will be built.")
|
||||||
|
else()
|
||||||
|
message(STATUS "ISCE2's Stanford-licensed components will NOT be built.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# We also need to create an empty directory for help
|
# We also need to create an empty directory for help
|
||||||
install(DIRECTORY DESTINATION ${ISCE2_PKG}/helper)
|
install(DIRECTORY DESTINATION ${ISCE2_PKG}/helper)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,12 @@
|
||||||
|
add_subdirectory(orbitLib)
|
||||||
|
|
||||||
|
add_subdirectory(fdmocomp)
|
||||||
|
add_subdirectory(getpeg)
|
||||||
|
add_subdirectory(mocompbaseline)
|
||||||
|
add_subdirectory(orbit2sch)
|
||||||
|
add_subdirectory(sch2orbit)
|
||||||
|
add_subdirectory(setmocomppath)
|
||||||
|
|
||||||
InstallSameDir(
|
InstallSameDir(
|
||||||
__init__.py
|
__init__.py
|
||||||
pegManipulator.py
|
pegManipulator.py
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
InstallSameDir(
|
||||||
|
__init__.py
|
||||||
|
Fdmocomp.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(fdmocomp MODULE
|
||||||
|
bindings/fdmocompmodule.cpp
|
||||||
|
src/fdmocomp.f90
|
||||||
|
src/fdmocompAllocateDeallocate.f
|
||||||
|
src/fdmocompGetState.f
|
||||||
|
src/fdmocompSetState.f
|
||||||
|
src/fdmocompState.f
|
||||||
|
)
|
||||||
|
target_include_directories(fdmocomp PRIVATE include)
|
||||||
|
target_link_libraries(fdmocomp PRIVATE
|
||||||
|
isce2::utilLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
fdmocomp
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
InstallSameDir(
|
||||||
|
Getpeg.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(getpeg MODULE
|
||||||
|
bindings/getpegmodule.cpp
|
||||||
|
src/getpeg.F
|
||||||
|
src/getpegAllocateDeallocate.F
|
||||||
|
src/getpegGetState.F
|
||||||
|
src/getpegSetState.F
|
||||||
|
src/getpegState.F
|
||||||
|
)
|
||||||
|
target_include_directories(getpeg PRIVATE include)
|
||||||
|
target_link_libraries(getpeg PRIVATE
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
getpeg
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
InstallSameDir(
|
||||||
|
__init__.py
|
||||||
|
Mocompbaseline.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(mocompbaseline MODULE
|
||||||
|
bindings/mocompbaselinemodule.cpp
|
||||||
|
src/mocompbaselineSetState.F
|
||||||
|
src/mocompbaselineGetState.F
|
||||||
|
src/mocompbaselineState.F
|
||||||
|
src/mocompbaseline.f90
|
||||||
|
src/mocompbaselineAllocateDeallocate.F
|
||||||
|
)
|
||||||
|
target_include_directories(mocompbaseline PRIVATE include)
|
||||||
|
target_link_libraries(mocompbaseline PRIVATE
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
mocompbaseline
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
InstallSameDir(
|
||||||
|
Orbit2sch.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(orbit2sch MODULE
|
||||||
|
bindings/orbit2schmodule.cpp
|
||||||
|
src/orbit2sch.F
|
||||||
|
src/orbit2schAllocateDeallocate.F
|
||||||
|
src/orbit2schGetState.F
|
||||||
|
src/orbit2schSetState.F
|
||||||
|
src/orbit2schState.F
|
||||||
|
)
|
||||||
|
target_include_directories(orbit2sch PRIVATE include)
|
||||||
|
target_link_libraries(orbit2sch PRIVATE
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
isce2::utilLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
orbit2sch
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
InstallSameDir(
|
||||||
|
__init__.py
|
||||||
|
CalcSchHeightVel.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
isce2_add_staticlib(orbitLib
|
||||||
|
src/ave_tpsch.f90
|
||||||
|
src/convert_sch_to_xyz.F
|
||||||
|
src/convert_schdot_to_xyzdot.F
|
||||||
|
src/curvature.F
|
||||||
|
src/dot.f90
|
||||||
|
src/geo_hdg.F
|
||||||
|
src/get_tpsch.f90
|
||||||
|
src/latlon.F
|
||||||
|
src/lincomb.F
|
||||||
|
src/matmat.F
|
||||||
|
src/matvec.F
|
||||||
|
src/radar_to_xyz.F
|
||||||
|
src/schbasis.F
|
||||||
|
src/tranmat.F
|
||||||
|
src/unitvec.f90
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
InstallSameDir(
|
||||||
|
Sch2orbit.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(sch2orbit MODULE
|
||||||
|
bindings/sch2orbitmodule.cpp
|
||||||
|
src/sch2orbit.F
|
||||||
|
src/sch2orbitAllocateDeallocate.F
|
||||||
|
src/sch2orbitGetState.F
|
||||||
|
src/sch2orbitSetState.F
|
||||||
|
src/sch2orbitState.F
|
||||||
|
)
|
||||||
|
target_include_directories(sch2orbit PRIVATE include)
|
||||||
|
target_link_libraries(sch2orbit PRIVATE
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
isce2::utilLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
sch2orbit
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
InstallSameDir(
|
||||||
|
Setmocomppath.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(setmocomppath MODULE
|
||||||
|
bindings/setmocomppathmodule.cpp
|
||||||
|
src/setmocomppath.F
|
||||||
|
src/setmocomppathAllocateDeallocate.F
|
||||||
|
src/setmocomppathState.F
|
||||||
|
src/setmocomppathSetState.F
|
||||||
|
src/setmocomppathGetState.F
|
||||||
|
)
|
||||||
|
target_include_directories(setmocomppath PRIVATE include)
|
||||||
|
target_link_libraries(setmocomppath PRIVATE
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
setmocomppath
|
||||||
|
)
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
add_subdirectory(dismphfile)
|
||||||
add_subdirectory(geocode)
|
add_subdirectory(geocode)
|
||||||
|
|
||||||
InstallSameDir(__init__.py)
|
InstallSameDir(__init__.py)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
InstallSameDir(
|
||||||
|
__init__.py
|
||||||
|
Dismphfile.py
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(dismphfile MODULE
|
||||||
|
bindings/dismphfilemodule.cpp
|
||||||
|
src/dismphfileSetState.F
|
||||||
|
src/dismphfileState.F
|
||||||
|
src/SConscript
|
||||||
|
src/dismphfile.F
|
||||||
|
src/writetiff.f
|
||||||
|
)
|
||||||
|
target_include_directories(dismphfile PRIVATE include)
|
||||||
|
target_link_libraries(dismphfile PRIVATE
|
||||||
|
isce2::DataAccessorLib
|
||||||
|
)
|
||||||
|
InstallSameDir(dismphfile)
|
||||||
|
|
@ -2,3 +2,22 @@ InstallSameDir(
|
||||||
__init__.py
|
__init__.py
|
||||||
Correct.py
|
Correct.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(correct MODULE
|
||||||
|
bindings/correctmodule.cpp
|
||||||
|
src/correct.f
|
||||||
|
src/correctAllocateDeallocate.f
|
||||||
|
src/correctSetState.f
|
||||||
|
src/correctState.f
|
||||||
|
)
|
||||||
|
target_include_directories(correct PRIVATE include)
|
||||||
|
target_link_libraries(correct PRIVATE
|
||||||
|
isce2::DataAccessorLib
|
||||||
|
isce2::orbitLib
|
||||||
|
isce2::utilLib
|
||||||
|
OpenMP::OpenMP_Fortran
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,21 @@ InstallSameDir(
|
||||||
__init__.py
|
__init__.py
|
||||||
Estamb.py
|
Estamb.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(estamb MODULE
|
||||||
|
bindings/estambmodule.cpp
|
||||||
|
src/estamb.f90
|
||||||
|
src/estambAllocateDeallocate.F
|
||||||
|
src/estambGetState.F
|
||||||
|
src/estambSetState.F
|
||||||
|
src/estambStateSoi.f90
|
||||||
|
)
|
||||||
|
target_include_directories(estamb PRIVATE include)
|
||||||
|
target_link_libraries(estamb PRIVATE
|
||||||
|
isce2::DataAccessorLib
|
||||||
|
isce2::formslcLib
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,27 @@ InstallSameDir(
|
||||||
__init__.py
|
__init__.py
|
||||||
Formslc.py
|
Formslc.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(stdproc_formslc MODULE
|
||||||
|
bindings/formslcmodule.cpp
|
||||||
|
src/formslc.f90
|
||||||
|
src/formslcAllocateDeallocate.F
|
||||||
|
src/formslcGetState.F
|
||||||
|
src/formslcSetState.F
|
||||||
|
src/formslcStateSoi.f90
|
||||||
|
)
|
||||||
|
target_include_directories(stdproc_formslc PRIVATE include)
|
||||||
|
target_link_libraries(stdproc_formslc PRIVATE
|
||||||
|
isce2::DataAccessorLib
|
||||||
|
isce2::formslcLib
|
||||||
|
)
|
||||||
|
set_target_properties(stdproc_formslc
|
||||||
|
PROPERTIES OUTPUT_NAME formslc
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
stdproc_formslc
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -16,3 +16,19 @@ set_property(TARGET formslcLib PROPERTY Fortran_MODULE_DIRECTORY ${mdir})
|
||||||
target_include_directories(formslcLib INTERFACE
|
target_include_directories(formslcLib INTERFACE
|
||||||
$<$<COMPILE_LANGUAGE:Fortran>:${mdir}>
|
$<$<COMPILE_LANGUAGE:Fortran>:${mdir}>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
target_sources(formslcLib PRIVATE
|
||||||
|
src/mocomp.f90
|
||||||
|
src/rciq.f90
|
||||||
|
src/rcov.f90
|
||||||
|
src/rmpatch.f90
|
||||||
|
src/tsxmocompIsce.f90
|
||||||
|
)
|
||||||
|
target_link_libraries(formslcLib PRIVATE
|
||||||
|
isce2::combinedLib
|
||||||
|
isce2::stdoelLib
|
||||||
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,3 +2,24 @@ InstallSameDir(
|
||||||
__init__.py
|
__init__.py
|
||||||
MocompTSX.py
|
MocompTSX.py
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(NOT ISCE2_WITH_STANFORD)
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Python_add_library(mocompTSX MODULE
|
||||||
|
bindings/mocompTSXmodule.cpp
|
||||||
|
src/mocompTSXAllocateDeallocate.f
|
||||||
|
src/mocompTSXState.f
|
||||||
|
src/mocompTSX.f90
|
||||||
|
src/mocompTSXGetState.f
|
||||||
|
src/mocompTSXSetState.f
|
||||||
|
)
|
||||||
|
target_include_directories(mocompTSX PRIVATE include)
|
||||||
|
target_link_libraries(mocompTSX PRIVATE
|
||||||
|
isce2::formslcLib
|
||||||
|
isce2::DataAccessorLib
|
||||||
|
)
|
||||||
|
InstallSameDir(
|
||||||
|
mocompTSX
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue