diff --git a/.circleci/config.yml b/.circleci/config.yml index 25ba14b..31b9e03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,5 +1,59 @@ version: 2.1 jobs: + test-cmake: + docker: + - image: hysds/pge-base:latest + user: root + steps: + - checkout: + path: /root/project/src + + - run: + name: Install development tools + command: | + set -ex + pwd + yum update -y + yum groupinstall -y "development tools" + + - run: + name: Install ISCE requirements + command: | + set -ex + pwd + mkdir config build install + . /opt/conda/bin/activate root + conda install -y cython gdal h5py libgdal pytest numpy fftw scipy basemap scons opencv hdf4 hdf5 netcdf4 libgcc libstdcxx-ng cmake astropy + yum install -y x11-devel motif-devel jq gcc-gfortran + + - run: + name: Build and Install ISCE + command: | + set -ex + cd /root/project/src + . /opt/conda/bin/activate root + mkdir build + cd build + INSTALLPATH=/opt/conda + MODPATH=$(python3 -c "import site; print(site.getsitepackages()[0])") + # convert to relative path + MODPATH=$(realpath --relative-to=$INSTALLPATH $MODPATH) + cmake .. -DCMAKE_INSTALL_PREFIX=$INSTALLPATH -DPYTHON_MODULE_DIR=$MODPATH + make install VERBOSE=y + + - run: + name: Test ISCE installation + command: | + set -ex + cd /root/project/src/build + . /opt/conda/bin/activate root + ctest + ISCE2DIR=$(python3 -c "import os, isce2; print(os.path.dirname(isce2.__file__))" | tail -n 1) + export PATH=$ISCE2DIR/applications:$PATH + topsApp.py --help --steps + stripmapApp.py --help --steps + python3 -c "import isce" + test: docker: - image: hysds/pge-base:latest @@ -186,6 +240,7 @@ workflows: test: jobs: - test + - test-cmake build-deploy: jobs: - build: diff --git a/.cmake/FindCython.cmake b/.cmake/FindCython.cmake new file mode 100644 index 0000000..32f7ce9 --- /dev/null +++ b/.cmake/FindCython.cmake @@ -0,0 +1,14 @@ +# Tries to run Cython using `python -m cython` +execute_process(COMMAND ${Python_EXECUTABLE} -m cython --help + RESULT_VARIABLE cython_status + ERROR_QUIET OUTPUT_QUIET) + +if(NOT cython_status) + set(CYTHON_EXECUTABLE ${Python_EXECUTABLE} -m cython CACHE STRING + "Cython executable") +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(Cython REQUIRED_VARS CYTHON_EXECUTABLE) + +mark_as_advanced(CYTHON_EXECUTABLE) diff --git a/.cmake/FindFFTW.cmake b/.cmake/FindFFTW.cmake new file mode 100644 index 0000000..d516136 --- /dev/null +++ b/.cmake/FindFFTW.cmake @@ -0,0 +1,169 @@ +#[[ +Usage: + find_package(FFTW [REQUIRED] [QUIET] [COMPONENTS ...]) + +Be warned that this will only search for FFTW3 libraries. + +It sets the following variables: + FFTW_FOUND .. true if FFTW is found on the system + FFTW_[component]_LIB_FOUND .. true if the component is found (see below) + FFTW_LIBRARIES .. full paths to all found FFTW libraries + FFTW_[component]_LIB .. full path to one component (see below) + FFTW_INCLUDE_DIRS .. FFTW include directory paths + +The following variables will be checked by the function + FFTW_USE_STATIC_LIBS .. if true, only static libraries are searched + FFTW_ROOT .. if set, search under this path first + +Paths will be searched in the following order: + FFTW_ROOT (if provided) + PkgConfig paths (if found) + Library/include installation directories + Default find_* paths + +The following component library locations will be defined (if found): + FFTW_FLOAT_LIB + FFTW_DOUBLE_LIB + FFTW_LONGDOUBLE_LIB + FFTW_FLOAT_THREADS_LIB + FFTW_DOUBLE_THREADS_LIB + FFTW_LONGDOUBLE_THREADS_LIB + FFTW_FLOAT_OMP_LIB + FFTW_DOUBLE_OMP_LIB + FFTW_LONGDOUBLE_OMP_LIB + +The following IMPORTED targets will be created (if found): + FFTW::Float + FFTW::Double + FFTW::LongDouble + FFTW::FloatThreads + FFTW::DoubleThreads + FFTW::LongDoubleThreads + FFTW::FloatOMP + FFTW::DoubleOMP + FFTW::LongDoubleOMP +]] + +include(FindPackageHandleStandardArgs) + +if(NOT FFTW_ROOT AND DEFINED ENV{FFTWDIR}) + set(FFTW_ROOT $ENV{FFTWDIR}) +endif() + +# Check if we can use PkgConfig +find_package(PkgConfig) + +# Determine from PKG +if(PKG_CONFIG_FOUND) + pkg_check_modules(PKG_FFTW QUIET fftw3) +endif() + +# Check whether to search static or dynamic libs +set(CMAKE_FIND_LIBRARY_SUFFIXES_SAV ${CMAKE_FIND_LIBRARY_SUFFIXES}) + +if(${FFTW_USE_STATIC_LIBS}) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) +else() + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV}) +endif() + +# Paths to pass to find_library for each component +set(findlib_paths + ${FFTW_ROOT} + ${PKG_FFTW_LIBRARY_DIRS} + ${LIB_INSTALL_DIR} + ) + +# Find include directory +find_path(FFTW_INCLUDE_DIRS + NAMES fftw3.h + PATHS ${FFTW_ROOT} + ${PKG_FFTW_INCLUDE_DIRS} + ${INCLUDE_INSTALL_DIR} + PATH_SUFFIXES include + ) + +set(FFTW_LIBRARIES "") + +foreach(dtype Float Double LongDouble) + + # Single-letter suffix for the library name + string(REGEX REPLACE "(.).*" "\\1" letter ${dtype}) + string(TOLOWER ${letter} letter) + # The double-precision library doesn't use a suffix + if("${letter}" STREQUAL "d") + set(letter "") + endif() + + foreach(system "" Threads OMP) + + # CamelCase component name used for interface libraries + # e.g. FloatThreads + set(component ${dtype}${system}) + + # Component library location variable used via find_library + # e.g. FFTW_DOUBLE_THREADS_LIB + if(system) + set(libvar FFTW_${dtype}_${system}_LIB) + else() + set(libvar FFTW_${dtype}_LIB) + endif() + string(TOUPPER ${libvar} libvar) + + # Filename root common to all libraries + set(libname fftw3${letter}) + if(system) + string(TOLOWER ${system} systemlower) + set(libname ${libname}_${systemlower}) + endif() + # Actual filenames looked for by find_library + set(libnames + ${libname} + lib${libname}3-3 + ) + + find_library( + ${libvar} + NAMES ${libnames} + PATHS ${findlib_paths} + PATH_SUFFIXES lib lib64 + ) + + # Tell find_package whether this component was found + set(FFTW_${component}_FIND_QUIETLY TRUE) + find_package_handle_standard_args(FFTW_${component} + HANDLE_COMPONENTS REQUIRED_VARS ${libvar} FFTW_INCLUDE_DIRS) + # Also set the value of the legacy library-variable + # (Will be set to *-NOTFOUND if not found) + set(${libvar} ${FFTW_${component}}) + + # If the library was found: + if(${libvar} AND NOT TARGET FFTW::${component}) + # Add it to the list of FFTW libraries + list(APPEND FFTW_LIBRARIES ${${libvar}}) + + # Create a corresponding interface library + add_library(FFTW::${component} IMPORTED INTERFACE) + target_include_directories( + FFTW::${component} SYSTEM INTERFACE ${FFTW_INCLUDE_DIRS}) + target_link_libraries( + FFTW::${component} INTERFACE ${${libvar}}) + endif() + + mark_as_advanced(${libvar}) + + endforeach() +endforeach() + +# Restore saved find_library suffixes +set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_SAV}) + +find_package_handle_standard_args(FFTW + REQUIRED_VARS FFTW_LIBRARIES FFTW_INCLUDE_DIRS + HANDLE_COMPONENTS + ) + +mark_as_advanced( + FFTW_INCLUDE_DIRS + FFTW_LIBRARIES + ) diff --git a/.cmake/TargetGDAL.cmake b/.cmake/TargetGDAL.cmake new file mode 100644 index 0000000..cee980a --- /dev/null +++ b/.cmake/TargetGDAL.cmake @@ -0,0 +1,9 @@ +find_package(GDAL) + +# Make a compatibility GDAL::GDAL interface target +# In CMake >= 3.14, this already exists for us :) +if(GDAL_FOUND AND NOT TARGET GDAL::GDAL) + add_library(GDAL::GDAL IMPORTED INTERFACE) + target_include_directories(GDAL::GDAL SYSTEM INTERFACE ${GDAL_INCLUDE_DIRS}) + target_link_libraries(GDAL::GDAL INTERFACE ${GDAL_LIBRARIES}) +endif() diff --git a/.cmake/TargetMotif.cmake b/.cmake/TargetMotif.cmake new file mode 100644 index 0000000..77b9ddf --- /dev/null +++ b/.cmake/TargetMotif.cmake @@ -0,0 +1,9 @@ +find_package(Motif) + +if(MOTIF_FOUND AND NOT TARGET Motif::Motif) + add_library(Motif::Motif IMPORTED INTERFACE) + target_include_directories(Motif::Motif + SYSTEM INTERFACE ${MOTIF_INCLUDE_DIR}) + target_link_libraries(Motif::Motif + INTERFACE ${MOTIF_LIBRARIES}) +endif() diff --git a/.cmake/TargetX11.cmake b/.cmake/TargetX11.cmake new file mode 100644 index 0000000..f997883 --- /dev/null +++ b/.cmake/TargetX11.cmake @@ -0,0 +1,27 @@ +set(components + Xau + Xt + ) + +find_package(X11 COMPONENTS ${components}) + +if(X11_FOUND) + + # make X11 look like a regular find_package component + set(X11_X11_FOUND TRUE) + set(X11_X11_INCLUDE_PATH ${X11_INCLUDE_DIR}) + list(APPEND components X11) + + foreach(component ${components}) + message("${component} include = ${X11_${component}_INCLUDE_PATH}") + if(X11_${component}_FOUND) + if(NOT TARGET X11::${component}) + add_library(X11::${component} IMPORTED INTERFACE) + endif() + target_link_libraries(X11::${component} + INTERFACE ${X11_${component}_LIB}) + target_include_directories(X11::${component} SYSTEM + INTERFACE ${X11_${component}_INCLUDE_PATH}) + endif() + endforeach() +endif() diff --git a/.cmake/UseCython.cmake b/.cmake/UseCython.cmake new file mode 100644 index 0000000..1cf9b4b --- /dev/null +++ b/.cmake/UseCython.cmake @@ -0,0 +1,142 @@ +# Define a function to create Cython modules. +# +# For more information on the Cython project, see http://cython.org/. +# "Cython is a language that makes writing C extensions for the Python language +# as easy as Python itself." +# +# This file defines a CMake function to build a Cython Python module. +# To use it, first include this file. +# +# include(UseCython) +# +# Then call cython_add_module to create a module. +# +# cython_add_module( ... ) +# +# Where is the name of the resulting Python module and +# ... are source files to be compiled into the module, e.g. *.pyx, +# *.py, *.cxx, etc. A CMake target is created with name . This can +# be used for target_link_libraries(), etc. +# +# The sample paths set with the CMake include_directories() command will be used +# for include directories to search for *.pxd when running the Cython complire. +# +# Cache variables that effect the behavior include: +# +# CYTHON_ANNOTATE +# CYTHON_NO_DOCSTRINGS +# CYTHON_FLAGS +# +# See also FindCython.cmake + +#============================================================================= +# Copyright 2011 Kitware, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +#============================================================================= + +# Configuration options. +set( CYTHON_ANNOTATE OFF + CACHE BOOL "Create an annotated .html file when compiling *.pyx." ) +set( CYTHON_NO_DOCSTRINGS OFF + CACHE BOOL "Strip docstrings from the compiled module." ) +set( CYTHON_FLAGS "" CACHE STRING + "Extra flags to the cython compiler." ) +mark_as_advanced( CYTHON_ANNOTATE CYTHON_NO_DOCSTRINGS CYTHON_FLAGS ) + +find_package(Cython REQUIRED) +find_package(Python REQUIRED COMPONENTS Development) + +# Check the version of Cython +execute_process( COMMAND ${CYTHON_EXECUTABLE} --version + OUTPUT_VARIABLE CYTHON_VERSION ERROR_VARIABLE CYTHON_VERSION ) +string(REGEX MATCH "([0-9]|\\.)+" CYTHON_VERSION ${CYTHON_VERSION}) +if((CYTHON_VERSION VERSION_GREATER_EQUAL 0.28.1)) + message(STATUS "Found Cython: ${CYTHON_VERSION}") +else() + message(FATAL_ERROR "Could not find Cython version >= 0.28.1") +endif() + +# Create a *.cxx file from a *.pyx file. +# Input the generated file basename. The generate file will put into the variable +# placed in the "generated_file" argument. Finally all the *.py and *.pyx files. +function( compile_pyx _name generated_file ) + + set( pyx_locations "" ) + + foreach( pyx_file ${ARGN} ) + # Get the include directories. + get_source_file_property( pyx_location ${pyx_file} LOCATION ) + get_filename_component( pyx_path ${pyx_location} PATH ) + list( APPEND pyx_locations "${pyx_location}" ) + endforeach() # pyx_file + + # Set additional flags. + set(cython_args "") + if( CYTHON_ANNOTATE ) + list(APPEND cython_args "--annotate" ) + endif() + + if( CYTHON_NO_DOCSTRINGS ) + list(APPEND cython_args "--no-docstrings") + endif() + + if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug" OR + "${CMAKE_BUILD_TYPE}" STREQUAL "RelWithDebInfo") + set(APPEND cython_args "--gdb") + endif() + + list(APPEND cython_args "-${Python_VERSION_MAJOR}") + + # Determining generated file name. + set(_generated_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx) + set_source_files_properties( ${_generated_file} PROPERTIES GENERATED TRUE ) + set( ${generated_file} ${_generated_file} PARENT_SCOPE ) + + # Add the command to run the compiler. + add_custom_command( OUTPUT ${_generated_file} + COMMAND ${CYTHON_EXECUTABLE} + ARGS --cplus ${cython_args} ${CYTHON_FLAGS} + --output-file ${_generated_file} ${pyx_locations} + DEPENDS ${pyx_locations} + IMPLICIT_DEPENDS CXX + COMMENT "Compiling Cython CXX source for ${_name}..." + ) +endfunction() + +# cython_add_module( src1 src2 ... srcN ) +# Build the Cython Python module. +function( cython_add_module _name ) + set( pyx_module_sources "" ) + set( other_module_sources "" ) + foreach( _file ${ARGN} ) + if( ${_file} MATCHES ".*\\.py[x]?$" ) + list( APPEND pyx_module_sources ${_file} ) + else() + list( APPEND other_module_sources ${_file} ) + endif() + endforeach() + set( CYTHON_FLAGS ${CYTHON_FLAGS} -X embedsignature=True) + compile_pyx( ${_name} generated_file ${pyx_module_sources} ) + Python_add_library( ${_name} MODULE ${generated_file} ${other_module_sources} ) + if( APPLE ) + set_target_properties( ${_name} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup" ) + endif() + # ignore overflow warnings caused by Python's implicit conversions + set_property( SOURCE ${generated_file} + PROPERTY COMPILE_OPTIONS -Wno-overflow APPEND ) + # ignore Numpy deprecated API warning + # ignore warnings for using the #warning extension directive + # TODO fix -Wno-cpp for nvcc + # target_compile_options( ${_name} PRIVATE -Wno-cpp -Wno-pedantic) +endfunction() diff --git a/.cmake/isce2_buildflags.cmake b/.cmake/isce2_buildflags.cmake new file mode 100644 index 0000000..447f0c0 --- /dev/null +++ b/.cmake/isce2_buildflags.cmake @@ -0,0 +1,26 @@ +# TODO (global build flags) +# These definitions and compile options are +# set globally for convenience. +# Perhaps we should apply them only as needed on a +# per-target basis, and propagate them via the interface? +add_definitions(-DNEEDS_F77_TRANSLATION -DF77EXTERNS_LOWERCASE_TRAILINGBAR) +add_compile_options( + $<$:-ffixed-line-length-none> + $<$:-fno-range-check> + $<$:-fno-second-underscore>) + +# Set up build flags for C++ and Fortran. +set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD_REQUIRED y) +set(CMAKE_CXX_EXTENSIONS n) + +# TODO (fix RPATHs) +# We have to hack our RPATHs a bit for these shared libraries to be +# loaded by others on the install-side. Maybe these libraries should +# be combined and/or installed to a common ISCE2 lib directory. +# Is there a semantic way to propagate their RPATHs +# without using these global variables? +set(CMAKE_INSTALL_RPATH_USE_LINK_PATH ON) +list(APPEND CMAKE_INSTALL_RPATH + ${CMAKE_INSTALL_PREFIX}/${ISCE2_PKG}/components/isceobj/Util + ) diff --git a/.cmake/isce2_helpers.cmake b/.cmake/isce2_helpers.cmake new file mode 100644 index 0000000..f147569 --- /dev/null +++ b/.cmake/isce2_helpers.cmake @@ -0,0 +1,71 @@ +# There are a lot of similarly-built modules in isce2 +# so we add some helpers here to avoid code duplication. +# TODO maybe these helpers should have a unique prefix, e.g. "isce2_" + +# Compute a prefix based on the current project subdir +# This disambiguates tests with similar names and +# allows better pattern matching using `ctest -R` +macro(isce2_get_dir_prefix) + file(RELATIVE_PATH dir_prefix ${CMAKE_SOURCE_DIR} ${CMAKE_CURRENT_LIST_DIR}) + string(REPLACE "/" "." dir_prefix ${dir_prefix}) +endmacro() + +# Usage: +# add_exe_test(main.cpp helpers.F [additional_source.c ...] ) +# or +# add_exe_test(target_from_add_executable) +# The latter form is useful when you need to add dependencies, +# since the former mangles the name via dir_prefix. +function(add_exe_test testfile) + isce2_get_dir_prefix() + if(TARGET ${testfile}) + set(target ${testfile}) + set(testname ${dir_prefix}.${testfile}) + else() + set(target ${dir_prefix}.${testfile}) + add_executable(${target} ${testfile} ${ARGN}) + set(testname ${target}) + endif() + add_test(NAME ${testname} COMMAND ${target}) +endfunction() + +# Usage: +# add_python_test(mytest.py) +# This is simpler than add_exe_test since there is no compilation step. +# The python file is esecuted directly, using the exit status as the result. +function(add_python_test testfile) + isce2_get_dir_prefix() + set(testname ${dir_prefix}.${testfile}) + add_test(NAME ${testname} COMMAND + ${Python_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/${testfile}) + set_tests_properties(${testname} PROPERTIES + ENVIRONMENT PYTHONPATH=${CMAKE_INSTALL_PREFIX}/${PYTHON_MODULE_DIR}) +endfunction() + +# Computes the relative path from the current binary dir to the base binary +# dir, and installs the given files/targets using this relative path with +# respect to the python package dir. +# This greatly simplifies installation since the source dir structure +# primarily mimics the python package directory structure. +# Note that it first checks if a provided file is a target, +# and if so, installs it as a TARGET instead. Make sure your +# filenames and target names don't have any overlap! + +function(InstallSameDir) +mark_as_advanced(isce2_bin_base) + foreach(name ${ARGN}) + if(TARGET ${name}) + set(installtype TARGETS) + else() + set(installtype FILES) + endif() + file(RELATIVE_PATH path ${isce2_bin_dir} ${CMAKE_CURRENT_BINARY_DIR}) + install(${installtype} ${name} + DESTINATION ${ISCE2_PKG}/${path} + ) + endforeach() +endfunction() +# We use this instead of CMAKE_BINARY_DIR to handle +# cases where isce2 is added as a subdirectory +set(isce2_bin_dir ${CMAKE_CURRENT_BINARY_DIR} CACHE PATH + "ISCE2 root build directory") diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..3292dc4 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,58 @@ +cmake_minimum_required(VERSION 3.12 FATAL_ERROR) + +project(isce2 LANGUAGES C CXX Fortran) + +include(CheckLanguage) +check_language(CUDA) +if(CMAKE_CUDA_COMPILER) + enable_language(CUDA) +endif() + +list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/.cmake) + +find_package(Python 3.5 REQUIRED COMPONENTS Interpreter Development) +find_package(FFTW REQUIRED) +find_package(Motif) +find_package(OpenMP REQUIRED COMPONENTS C CXX Fortran) +# Find these, and create IMPORTED INTERFACE libraries for them if they exist +include(TargetGDAL) +include(TargetMotif) +include(TargetX11) +include(UseCython) + +if(NOT DEFINED PYTHON_MODULE_DIR) + set(PYTHON_MODULE_DIR packages CACHE PATH + "Python module directory (relative to install prefix)") +endif() +if(NOT DEFINED ISCE2_PKG) + set(ISCE2_PKG ${PYTHON_MODULE_DIR}/isce2 CACHE PATH + "ISCE 2 python package install dir (relative to install prefix)") +endif() + +include(isce2_buildflags) +include(isce2_helpers) + +enable_testing() + +add_subdirectory(applications) +add_subdirectory(components) +add_subdirectory(contrib components/contrib) +add_subdirectory(defaults) +add_subdirectory(library) +add_subdirectory(test) + +InstallSameDir( + __init__.py + release_history.py + ) + +# We also need to create an empty directory for help +install(DIRECTORY DESTINATION ${ISCE2_PKG}/helper) + +# CMake will install a python package named "isce2", +# but legacy scripts import it as simply "isce". +# Make a symlink isce -> isce2 for compatibility. +set(symsrc ${CMAKE_INSTALL_PREFIX}/${ISCE2_PKG}) +set(symdest ${symsrc}/../isce) +install(CODE "execute_process(COMMAND + ${CMAKE_COMMAND} -E create_symlink ${symsrc} ${symdest})") diff --git a/applications/CMakeLists.txt b/applications/CMakeLists.txt new file mode 100644 index 0000000..48ff0bc --- /dev/null +++ b/applications/CMakeLists.txt @@ -0,0 +1,42 @@ +set(files + __init__.py + alos2App.py + alos2burstApp.py + dataTileManager.py + dem.py + demdb.py + downsampleDEM.py + fixImageXml.py + gdal2isce_xml.py + imageMath.py + insarApp.py + isce2geotiff.py + isce2gis.py + isceApp.py + iscehelp.py + looks.py + make_raw.py + mdx.py + rtcApp.py + stitcher.py + stripmapApp.py + topsApp.py + upsampleDem.py + waterMask.py + wbd.py + wbdStitcher.py + ) + +install(PROGRAMS ${files} + DESTINATION ${ISCE2_PKG}/applications) + +# Symlink apps into PREFIX/bin so they are on the $PATH +install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory \ + ${CMAKE_INSTALL_PREFIX}/bin)" + ) +foreach(file ${files}) + install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink \ + ${CMAKE_INSTALL_PREFIX}/${ISCE2_PKG}/applications/${file} \ + ${CMAKE_INSTALL_PREFIX}/bin/${file})" + ) +endforeach() diff --git a/components/CMakeLists.txt b/components/CMakeLists.txt new file mode 100644 index 0000000..80f2dd5 --- /dev/null +++ b/components/CMakeLists.txt @@ -0,0 +1,7 @@ +add_subdirectory(isceobj) +add_subdirectory(iscesys) +add_subdirectory(mroipac) +add_subdirectory(stdproc) +add_subdirectory(zerodop) + +InstallSameDir(__init__.py) diff --git a/components/isceobj/Alos2Proc/CMakeLists.txt b/components/isceobj/Alos2Proc/CMakeLists.txt new file mode 100644 index 0000000..e9fef33 --- /dev/null +++ b/components/isceobj/Alos2Proc/CMakeLists.txt @@ -0,0 +1,37 @@ +InstallSameDir( + __init__.py + Alos2Proc.py + Alos2ProcPublic.py + Factories.py + denseOffsetNote.txt + runCoherence.py + runDenseOffset.py + runDiffInterferogram.py + runDownloadDem.py + runFilt.py + runFiltOffset.py + runFormInterferogram.py + runFrameMosaic.py + runFrameOffset.py + runGeo2Rdr.py + runGeocode.py + runGeocodeOffset.py + runIonFilt.py + runIonSubband.py + runIonUwrap.py + runLook.py + runPrepareSlc.py + runPreprocessor.py + runRdr2Geo.py + runRdrDemOffset.py + runRectRangeOffset.py + runSlcMatch.py + runSlcMosaic.py + runSlcOffset.py + runSwathMosaic.py + runSwathOffset.py + runUnwrapSnaphu.py + srtm_no_swbd_tiles.txt + srtm_tiles.txt + swbd_tiles.txt + ) diff --git a/components/isceobj/Alos2burstProc/CMakeLists.txt b/components/isceobj/Alos2burstProc/CMakeLists.txt new file mode 100644 index 0000000..77b6db4 --- /dev/null +++ b/components/isceobj/Alos2burstProc/CMakeLists.txt @@ -0,0 +1,19 @@ +InstallSameDir( + __init__.py + Factories.py + Alos2burstProc.py + runPreprocessor.py + runExtractBurst.py + runCoregGeom.py + runCoregCc.py + runCoregSd.py + runSwathOffset.py + runSwathMosaic.py + runFrameOffset.py + runFrameMosaic.py + runIonSubband.py + runLookSd.py + runFiltSd.py + runUnwrapSnaphuSd.py + runGeocodeSd.py + ) diff --git a/components/isceobj/Attitude/CMakeLists.txt b/components/isceobj/Attitude/CMakeLists.txt new file mode 100644 index 0000000..d9609ff --- /dev/null +++ b/components/isceobj/Attitude/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Attitude.py + ) diff --git a/components/isceobj/CMakeLists.txt b/components/isceobj/CMakeLists.txt new file mode 100644 index 0000000..118f28c --- /dev/null +++ b/components/isceobj/CMakeLists.txt @@ -0,0 +1,31 @@ +add_subdirectory(Util) +add_subdirectory(Sensor) + +add_subdirectory(Alos2Proc) +add_subdirectory(Alos2burstProc) +add_subdirectory(Attitude) +add_subdirectory(Catalog) +add_subdirectory(Constants) +add_subdirectory(Doppler) +add_subdirectory(Filter) +add_subdirectory(Image) +add_subdirectory(ImageFilter) +add_subdirectory(InsarProc) +add_subdirectory(IsceProc) +add_subdirectory(LineAccessor) +add_subdirectory(Location) +add_subdirectory(Orbit) +add_subdirectory(Planet) +add_subdirectory(Platform) +add_subdirectory(Radar) +add_subdirectory(Registry) +add_subdirectory(Renderer) +add_subdirectory(RtcProc) +add_subdirectory(Scene) +add_subdirectory(Stack) +add_subdirectory(StripmapProc) +add_subdirectory(TopsProc) +add_subdirectory(Unwrap) +add_subdirectory(XmlUtil) + +InstallSameDir(__init__.py) diff --git a/components/isceobj/Catalog/CMakeLists.txt b/components/isceobj/Catalog/CMakeLists.txt new file mode 100644 index 0000000..8a8816b --- /dev/null +++ b/components/isceobj/Catalog/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + Catalog.py + OrderedDict.py + ) diff --git a/components/isceobj/Constants/CMakeLists.txt b/components/isceobj/Constants/CMakeLists.txt new file mode 100644 index 0000000..0f27e53 --- /dev/null +++ b/components/isceobj/Constants/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Constants.py + ) diff --git a/components/isceobj/Doppler/CMakeLists.txt b/components/isceobj/Doppler/CMakeLists.txt new file mode 100644 index 0000000..d41e0b4 --- /dev/null +++ b/components/isceobj/Doppler/CMakeLists.txt @@ -0,0 +1,6 @@ +InstallSameDir( + __init__.py + Calc_dop.py + DefaultDopp.py + Doppler.py + ) diff --git a/components/isceobj/Filter/CMakeLists.txt b/components/isceobj/Filter/CMakeLists.txt new file mode 100644 index 0000000..088cbf9 --- /dev/null +++ b/components/isceobj/Filter/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Filter.py + ) diff --git a/components/isceobj/Image/CMakeLists.txt b/components/isceobj/Image/CMakeLists.txt new file mode 100644 index 0000000..70db759 --- /dev/null +++ b/components/isceobj/Image/CMakeLists.txt @@ -0,0 +1,17 @@ +add_subdirectory(test) + +InstallSameDir( + __init__.py + AmpImage.py + BILImage.py + DemImage.py + Image.py + IntImage.py + OffsetImage.py + RawImage.py + RawIQImage.py + RgImage.py + SlcImage.py + StreamImage.py + UnwImage.py + ) diff --git a/components/isceobj/Image/test/CMakeLists.txt b/components/isceobj/Image/test/CMakeLists.txt new file mode 100644 index 0000000..c5a1862 --- /dev/null +++ b/components/isceobj/Image/test/CMakeLists.txt @@ -0,0 +1,2 @@ +# TODO add_python_test(testRawImagePy.py) +# TODO add_python_test(testSlcImagePy.py) diff --git a/components/isceobj/ImageFilter/CMakeLists.txt b/components/isceobj/ImageFilter/CMakeLists.txt new file mode 100644 index 0000000..5fd25db --- /dev/null +++ b/components/isceobj/ImageFilter/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(test) + +InstallSameDir( + __init__.py + BandExtractor.py + ComplexExtractor.py + FilterFactory.py + ImageFilter.py + ) diff --git a/components/isceobj/ImageFilter/test/CMakeLists.txt b/components/isceobj/ImageFilter/test/CMakeLists.txt new file mode 100644 index 0000000..402d587 --- /dev/null +++ b/components/isceobj/ImageFilter/test/CMakeLists.txt @@ -0,0 +1,2 @@ +# TODO add_python_test(testFilter.py) +# TODO add_exe_test(test.cpp) diff --git a/components/isceobj/InsarProc/CMakeLists.txt b/components/isceobj/InsarProc/CMakeLists.txt new file mode 100644 index 0000000..b827274 --- /dev/null +++ b/components/isceobj/InsarProc/CMakeLists.txt @@ -0,0 +1,47 @@ +InstallSameDir( + __init__.py + createDem.py + extractInfo.py + Factories.py + __InsarProc.py + InsarProc.py + runCoherence.py + runCorrect.py + runCreateWbdMask.py + runEstimateHeights_peg.py + runEstimateHeights.py + runFdMocomp.py + runFilter.py + runFormSLCisce.py + runFormSLC.py + runFormSLCTSX.py + runGeocode.py + runGrass.py + runMaskImages.py + runMocompbaseline.py + runOffoutliers.py + runOffsetprf_ampcor.py + runOffsetprf_none.py + runOffsetprf_nstage.py + runOffsetprf.py + runOrbit2sch.py + runPrepareResamps.py + runPreprocessor.py + runPulseTiming.py + runResamp_image.py + runResamp_only.py + runResamp.py + runRgoffset_ampcor.py + runRgoffset_none.py + runRgoffset_nstage.py + runRgoffset.py + runSetmocomppathFromFrame.py + runSetmocomppath.py + runShadecpx2rg.py + runTopo.py + runUnwrap2Stage.py + runUnwrapGrass.py + runUnwrapIcu.py + runUnwrapSnaphu.py + runUpdatePreprocInfo.py + ) diff --git a/components/isceobj/IsceProc/CMakeLists.txt b/components/isceobj/IsceProc/CMakeLists.txt new file mode 100644 index 0000000..93f6e29 --- /dev/null +++ b/components/isceobj/IsceProc/CMakeLists.txt @@ -0,0 +1,44 @@ +InstallSameDir( + __init__.py + createDem.py + extractInfo.py + Factories.py + IsceProc.py + runCoherence.py + runCorrect.py + runCrossmul.py + runEstimateHeights_peg.py + runEstimateHeights.py + runFilter.py + runFormSLCisce.py + runFormSLC.py + runFormSLCTSX.py + runGeocode.py + runGrass.py + runISSI.py + runMocompbaseline.py + runOffoutliers.py + runOffsetprf_ampcor.py + runOffsetprf_nstage.py + runOffsetprf.py + runOrbit2sch.py + runPrepareResamps.py + runPreprocessor.py + runPulseTiming.py + runResamp_image.py + runResamp_only.py + runResamp.py + runResamp_slc.py + runRgoffset_ampcor.py + runRgoffset_none.py + runRgoffset_nstage.py + runRgoffset.py + runSetmocomppathFromFrame.py + runSetmocomppath.py + runShadecpx2rg.py + runTopo.py + runUnwrapGrass.py + runUnwrapIcu.py + runUnwrapSnaphu.py + runUpdatePreprocInfo.py + ) diff --git a/components/isceobj/LineAccessor/CMakeLists.txt b/components/isceobj/LineAccessor/CMakeLists.txt new file mode 100644 index 0000000..4358334 --- /dev/null +++ b/components/isceobj/LineAccessor/CMakeLists.txt @@ -0,0 +1,18 @@ +add_library(LineAccessor_static STATIC + src/ImageAccessor.cpp + src/LineAccessor.cpp + src/LineAccessorF.cpp + ) +target_include_directories(LineAccessor_static PUBLIC include) +set_property(TARGET LineAccessor_static PROPERTY POSITION_INDEPENDENT_CODE ON) + +Python_add_library(LineAccessor MODULE + bindings/LineAccessormodule.cpp + ) +target_link_libraries(LineAccessor PUBLIC LineAccessor_static) + +InstallSameDir( + LineAccessor + __init__.py + LineAccessorPy.py + ) diff --git a/components/isceobj/Location/CMakeLists.txt b/components/isceobj/Location/CMakeLists.txt new file mode 100644 index 0000000..d13bb27 --- /dev/null +++ b/components/isceobj/Location/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(test) + +InstallSameDir( + __init__.py + Coordinate.py + Offset.py + Peg.py + SCH.py + ) diff --git a/components/isceobj/Location/test/CMakeLists.txt b/components/isceobj/Location/test/CMakeLists.txt new file mode 100644 index 0000000..f731fc6 --- /dev/null +++ b/components/isceobj/Location/test/CMakeLists.txt @@ -0,0 +1,3 @@ +# TODO add_python_test(test_offset.py) +# TODO add_python_test(test_pegfactory.py) +# TODO add_python_test(test_sch.py) diff --git a/components/isceobj/Orbit/CMakeLists.txt b/components/isceobj/Orbit/CMakeLists.txt new file mode 100644 index 0000000..7050e0a --- /dev/null +++ b/components/isceobj/Orbit/CMakeLists.txt @@ -0,0 +1,16 @@ +Python_add_library(orbitHermite MODULE + src/orbitHermiteC.c + src/orbithermite.F + ) +target_include_directories(orbitHermite PUBLIC include) + +InstallSameDir( + orbitHermite + __init__.py + ODR.py + Orbit.py + OrbitExtender.py + PDS.py + PRC.py + Spice.py + ) diff --git a/components/isceobj/Pause/CMakeLists.txt b/components/isceobj/Pause/CMakeLists.txt new file mode 100644 index 0000000..deb50a4 --- /dev/null +++ b/components/isceobj/Pause/CMakeLists.txt @@ -0,0 +1 @@ +InstallSameDir(__init__.py) diff --git a/components/isceobj/Planet/CMakeLists.txt b/components/isceobj/Planet/CMakeLists.txt new file mode 100644 index 0000000..feadded --- /dev/null +++ b/components/isceobj/Planet/CMakeLists.txt @@ -0,0 +1,6 @@ +InstallSameDir( + __init__.py + AstronomicalHandbook.py + Ellipsoid.py + Planet.py + ) diff --git a/components/isceobj/Platform/CMakeLists.txt b/components/isceobj/Platform/CMakeLists.txt new file mode 100644 index 0000000..ea2b7dc --- /dev/null +++ b/components/isceobj/Platform/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Platform.py + ) diff --git a/components/isceobj/Radar/CMakeLists.txt b/components/isceobj/Radar/CMakeLists.txt new file mode 100644 index 0000000..28c7a70 --- /dev/null +++ b/components/isceobj/Radar/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Radar.py + ) diff --git a/components/isceobj/Registry/CMakeLists.txt b/components/isceobj/Registry/CMakeLists.txt new file mode 100644 index 0000000..eecb138 --- /dev/null +++ b/components/isceobj/Registry/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Registry.py + ) diff --git a/components/isceobj/Renderer/CMakeLists.txt b/components/isceobj/Renderer/CMakeLists.txt new file mode 100644 index 0000000..cafaba4 --- /dev/null +++ b/components/isceobj/Renderer/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + BaseRenderer.py + XmlRenderer.py + ) diff --git a/components/isceobj/RtcProc/CMakeLists.txt b/components/isceobj/RtcProc/CMakeLists.txt new file mode 100644 index 0000000..67f5366 --- /dev/null +++ b/components/isceobj/RtcProc/CMakeLists.txt @@ -0,0 +1,10 @@ +InstallSameDir( + __init__.py + Factories.py + RtcProc.py + runLooks.py + runNormalize.py + runPreprocessor.py + runTopo.py + runVerifyDEM.py + ) diff --git a/components/isceobj/Scene/CMakeLists.txt b/components/isceobj/Scene/CMakeLists.txt new file mode 100644 index 0000000..59ddc0f --- /dev/null +++ b/components/isceobj/Scene/CMakeLists.txt @@ -0,0 +1,11 @@ +add_library(concatenate SHARED + src/frame_concatenate.c + src/swst_resample.c + ) + +InstallSameDir( + concatenate + __init__.py + Frame.py + Track.py + ) diff --git a/components/isceobj/Sensor/CMakeLists.txt b/components/isceobj/Sensor/CMakeLists.txt new file mode 100644 index 0000000..45d14b1 --- /dev/null +++ b/components/isceobj/Sensor/CMakeLists.txt @@ -0,0 +1,91 @@ +add_subdirectory(db) +add_subdirectory(TOPS) +add_subdirectory(MultiMode) + +set(installfiles + alos + __init__.py + ALOS.py + ALOS2.py + ALOS_SLC.py + CEOS.py + COSMO_SkyMed.py + COSMO_SkyMed_SLC.py + ERS.py + ERS_EnviSAT.py + ERS_EnviSAT_SLC.py + ERS_SLC.py + EnviSAT.py + EnviSAT_SLC.py + Generic.py + ICEYE_SLC.py + JERS.py + KOMPSAT5.py + Polarimetry.py + ROI_PAC.py + Radarsat1.py + Radarsat2.py + Risat1.py + Risat1_SLC.py + SICD_RGZERO.py + Sensor.py + Sentinel1.py + TanDEMX.py + TerraSARX.py + UAVSAR_HDF5_SLC.py + UAVSAR_Polsar.py + UAVSAR_RPI.py + UAVSAR_Stack.py + ) + +if(HDF5_FOUND) + Python_add_library(csk MODULE + src/extract_csk/extract_csk.c + src/extract_csk/extract_csk_slc.c + ) + target_include_directories(csk PUBLIC include) + target_link_libraries(csk PUBLIC HDF5::HDF5) + list(APPEND installfiles csk) +endif() + +Python_add_library(alos MODULE + bindings/alosmodule.cpp + src/ALOS_pre_process/SConscript + src/ALOS_pre_process/lib_functions.h + src/ALOS_pre_process/read_ALOSE_data.c + src/ALOS_pre_process/siocomplex.h + src/ALOS_pre_process/utils.c + src/ALOS_pre_process/ALOSE_orbits_utils.c + src/ALOS_pre_process/ALOS_ldr_orbit.c + src/ALOS_pre_process/ALOS_pre_process.c + src/ALOS_pre_process/calc_dop.c + src/ALOS_pre_process/data_ALOS.h + src/ALOS_pre_process/data_ALOSE.h + src/ALOS_pre_process/hermite_c.c + src/ALOS_pre_process/image_sio.h + src/ALOS_pre_process/init_from_PRM.c + src/ALOS_pre_process/interpolate_ALOS_orbit.c + src/ALOS_pre_process/null_sio_struct.c + src/ALOS_pre_process/orbit_ALOS.h + src/ALOS_pre_process/parse_ALOS_commands.c + src/ALOS_pre_process/polyfit.c + src/ALOS_pre_process/readOrbitPulseSetState.f + src/ALOS_pre_process/readOrbitPulseState.f + src/ALOS_pre_process/read_ALOS_data.c + src/ALOS_pre_process/read_ALOS_sarleader.c + src/ALOS_pre_process/roi_utils.c + src/ALOS_pre_process/sarleader_ALOS.h + src/ALOS_pre_process/sarleader_fdr.h + src/ALOS_pre_process/set_ALOS_defaults.c + src/ALOS_pre_process/siocomplex.c + src/ALOS_pre_process/swap_ALOS_data_info.c + src/ALOS_pre_process/write_ALOS_prm.c + src/ALOS_pre_process/readOrbitPulse.f + ) +target_include_directories(alos PUBLIC + include + src/ALOS_pre_process + ) +target_link_libraries(alos PUBLIC DataAccessor_static) + +InstallSameDir(${installfiles}) diff --git a/components/isceobj/Sensor/MultiMode/CMakeLists.txt b/components/isceobj/Sensor/MultiMode/CMakeLists.txt new file mode 100644 index 0000000..769c80a --- /dev/null +++ b/components/isceobj/Sensor/MultiMode/CMakeLists.txt @@ -0,0 +1,7 @@ +InstallSameDir( + __init__.py + ALOS2.py + Frame.py + Swath.py + Track.py + ) diff --git a/components/isceobj/Sensor/TOPS/CMakeLists.txt b/components/isceobj/Sensor/TOPS/CMakeLists.txt new file mode 100644 index 0000000..54dc8f3 --- /dev/null +++ b/components/isceobj/Sensor/TOPS/CMakeLists.txt @@ -0,0 +1,7 @@ +InstallSameDir( + __init__.py + BurstSLC.py + Sentinel1.py + TOPSSLCProduct.py + TOPSSwathSLCProduct.py + ) diff --git a/components/isceobj/Sensor/db/CMakeLists.txt b/components/isceobj/Sensor/db/CMakeLists.txt new file mode 100644 index 0000000..d4a9ab7 --- /dev/null +++ b/components/isceobj/Sensor/db/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(alos) diff --git a/components/isceobj/Sensor/db/alos/CMakeLists.txt b/components/isceobj/Sensor/db/alos/CMakeLists.txt new file mode 100644 index 0000000..c18ca1c --- /dev/null +++ b/components/isceobj/Sensor/db/alos/CMakeLists.txt @@ -0,0 +1,18 @@ +InstallSameDir( + attitude_record.xml + calibration_record.xml + data_quality_summary_record.xml + facility_record.xml + file_pointer_record.xml + image_file.xml + image_record.xml + leader_file.xml + map_proj_record.xml + platform_position_record.xml + processed_data_record.xml + radiometric_record.xml + scene_record.xml + text_record.xml + trailer_file.xml + volume_descriptor.xml + ) diff --git a/components/isceobj/Stack/CMakeLists.txt b/components/isceobj/Stack/CMakeLists.txt new file mode 100644 index 0000000..ca1836e --- /dev/null +++ b/components/isceobj/Stack/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Stack.py + ) diff --git a/components/isceobj/StripmapProc/CMakeLists.txt b/components/isceobj/StripmapProc/CMakeLists.txt new file mode 100644 index 0000000..80c774b --- /dev/null +++ b/components/isceobj/StripmapProc/CMakeLists.txt @@ -0,0 +1,31 @@ +InstallSameDir( + __init__.py + createDem.py + extractInfo.py + Factories.py + runCoherence.py + runCrop.py + runDenseOffsets.py + runDispersive.py + runFilter.py + runGeo2rdr.py + runGeocode.py + runInterferogram.py + runPreprocessor.py + runRefineSlaveTiming.py + runResampleSlc.py + runResampleSubbandSlc.py + runROI.py + runRubbersheetAzimuth.py + runRubbersheet.py + runRubbersheetRange.py + runSplitSpectrum.py + runTopo.py + runUnwrapGrass.py + runUnwrapIcu.py + runUnwrapSnaphu.py + runVerifyDEM.py + Sensor.py + __StripmapProc.py + StripmapProc.py + ) diff --git a/components/isceobj/TopsProc/CMakeLists.txt b/components/isceobj/TopsProc/CMakeLists.txt new file mode 100644 index 0000000..0812e2f --- /dev/null +++ b/components/isceobj/TopsProc/CMakeLists.txt @@ -0,0 +1,35 @@ +InstallSameDir( + __init__.py + Factories.py + runBurstIfg.py + runCoarseOffsets.py + runCoarseResamp.py + runComputeBaseline.py + runCropOffsetGeo.py + runDenseOffsets.py + run_downsample_unwrapper.py + runESD.py + runFilter.py + runFineOffsets.py + runFineResamp.py + runGeocode.py + runIon.py + runMergeBursts.py + runMergeSLCs.py + runOffsetFilter.py + runOffsetGeocode.py + runOverlapIfg.py + runPrepESD.py + runPreprocessor.py + runRangeCoreg.py + runSubsetOverlaps.py + runTopo.py + runUnwrap2Stage.py + runUnwrapGrass.py + runUnwrapIcu.py + runUnwrapSnaphu.py + runVerifyDEM.py + runVerifyGeocodeDEM.py + TopsProc.py + VRTManager.py + ) diff --git a/components/isceobj/Unwrap/CMakeLists.txt b/components/isceobj/Unwrap/CMakeLists.txt new file mode 100644 index 0000000..87763b2 --- /dev/null +++ b/components/isceobj/Unwrap/CMakeLists.txt @@ -0,0 +1,7 @@ +InstallSameDir( + __init__.py + grass.py + icu.py + snaphu.py + snaphu_mcf.py + ) diff --git a/components/isceobj/Util/CMakeLists.txt b/components/isceobj/Util/CMakeLists.txt new file mode 100644 index 0000000..b44a6f0 --- /dev/null +++ b/components/isceobj/Util/CMakeLists.txt @@ -0,0 +1,147 @@ +add_subdirectory(ImageUtil) +add_subdirectory(geo) + +Python_add_library(offoutliers MODULE + offoutliers/bindings/offoutliersmodule.cpp + offoutliers/src/offoutliers.F + offoutliers/src/offoutliersAllocateDeallocate.F + offoutliers/src/offoutliersGetState.F + offoutliers/src/offoutliersSetState.F + offoutliers/src/offoutliersState.F + ) +target_include_directories(offoutliers PUBLIC offoutliers/include) +target_link_libraries(offoutliers PUBLIC + stdoel_static + ) + +add_definitions(-DHAVE_CONFIG_H -DHAVE_FFTW=1) + +add_library(utilLib SHARED + src/akima_reg.F + src/args_roi.F + src/besseldiffs.F + src/bilinear.F + src/cfft1d_jpl.F + src/cfft2d.F + src/cffts.F + src/config.h + src/convert_schdot_to_xyzdot.F + src/convert_sch_to_xyz.F + src/cross.F + src/curvature.F + src/derampc.F + src/dop.F + src/dot.F + src/enubasis.F + src/fc.F + src/fc.f.org + src/fftw3stub.c + src/fftw3stub.cc + src/fortranUtils.f90 + src/fourn.F + src/fournnr.F + src/getangs.F + src/gettcn_tcvec.F + src/hunt.F + src/inter_motion.F + src/interp.F + src/intp_coef.f90 + src/intpcoefnorm.F + src/io.c + src/latlon.F + src/latlon_nostruct.F + #src/lfit.F + src/linalg.f90 + src/lincomb.F + src/lookvec.F + src/lsq.f90 + src/matmat.F + src/matvec.F + src/norm.F + src/orrmread1.F + src/polint.F + src/PowerOfTwo.cc + src/quadfit.f90 + src/radar_to_xyz.F + src/rdf_common.inc + src/roi_exit.cc + src/schbasis.F + src/second.c + src/sfftw_import.c + src/spline.f + #src/svd.F + #src/svdvecfit9.F + #src/svdvecfit.F + src/tranmat.F + src/uniform_interp.f90 + src/unitvec.F + src/utmtoll.F + src/zbrent.F + ) +target_include_directories(utilLib PUBLIC + include + ) +target_link_libraries(utilLib PUBLIC + FFTW::Float + ) +# TODO (fortran module include) +# This seems to be needed to use this library's modules, +# but is there a more idiomatic way to do this? +target_include_directories(utilLib INTERFACE + ${CMAKE_CURRENT_BINARY_DIR} + ) + +add_library(combinedLib SHARED + Library/geometry/src/geometryModule.F + Library/linalg3/src/linalg3Module.F + Library/linalg3/src/linalg3.c + Library/orbit/src/orbit.c + Library/orbit/src/orbitModule.F + Library/orbit/src/orbitHermite.c + Library/poly1d/src/poly1d.c + Library/poly1d/src/poly1dModule.F + Library/poly2d/src/poly2d.c + Library/poly2d/src/poly2dModule.F + ) +target_include_directories(combinedLib PUBLIC + Library/geometry/include + Library/linalg3/include + Library/orbit/include + Library/poly1d/include + Library/poly2d/include + ) + +Python_add_library(combinedlibmodule MODULE + Library/bindings/combinedlibmodule.cpp + ) +target_include_directories(combinedlibmodule PUBLIC + Library/include + ) +target_link_libraries(combinedlibmodule PUBLIC + combinedLib + ) +# TODO (fortran module include) +# This seems to be needed to use this library's modules, +# but is there a more idiomatic way to do this? +target_include_directories(combinedLib INTERFACE + ${CMAKE_CURRENT_BINARY_DIR} + ) + +install(TARGETS + utilLib + combinedLib + LIBRARY DESTINATION lib) + +InstallSameDir( + combinedlibmodule + offoutliers + __init__.py + decorators.py + mathModule.py + offoutliers/Offoutliers.py + StringUtils.py + Library/python/Poly1D.py + Library/python/Poly2D.py + Library/python/PolyFactory.py + Library/python/Polynomial.py + ) diff --git a/components/isceobj/Util/ImageUtil/CMakeLists.txt b/components/isceobj/Util/ImageUtil/CMakeLists.txt new file mode 100644 index 0000000..87575a8 --- /dev/null +++ b/components/isceobj/Util/ImageUtil/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + DemImageLib.py + ImageLib.py + ) diff --git a/components/isceobj/Util/geo/CMakeLists.txt b/components/isceobj/Util/geo/CMakeLists.txt new file mode 100644 index 0000000..8187e6e --- /dev/null +++ b/components/isceobj/Util/geo/CMakeLists.txt @@ -0,0 +1,12 @@ +InstallSameDir( + __init__.py + affine.py + charts.py + coordinates.py + dxdt.py + ellipsoid.py + euclid.py + exceptions.py + motion.py + trig.py + ) diff --git a/components/isceobj/XmlUtil/CMakeLists.txt b/components/isceobj/XmlUtil/CMakeLists.txt new file mode 100644 index 0000000..5f71fd3 --- /dev/null +++ b/components/isceobj/XmlUtil/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(test) + +InstallSameDir( + __init__.py + FastXML.py + XmlUtil.py + test/testXmlUtilPy.py + xmlUtils.py + ) diff --git a/components/isceobj/XmlUtil/test/CMakeLists.txt b/components/isceobj/XmlUtil/test/CMakeLists.txt new file mode 100644 index 0000000..aaa249f --- /dev/null +++ b/components/isceobj/XmlUtil/test/CMakeLists.txt @@ -0,0 +1,8 @@ +# TODO add_python_test(testXmlUtilPy.py) + +foreach(xml + test1.xml + ) + + configure_file(${xml} ${xml}) +endforeach() diff --git a/components/iscesys/CMakeLists.txt b/components/iscesys/CMakeLists.txt new file mode 100644 index 0000000..e860c6d --- /dev/null +++ b/components/iscesys/CMakeLists.txt @@ -0,0 +1,18 @@ +add_subdirectory(Compatibility) +add_subdirectory(Component) +add_subdirectory(DataManager) +add_subdirectory(DataRetriever) +add_subdirectory(DateTimeUtil) +add_subdirectory(DebugLiner) +add_subdirectory(DictUtils) +add_subdirectory(Display) +add_subdirectory(Dumpers) +add_subdirectory(ImageApi) +add_subdirectory(ImageUtil) +add_subdirectory(Parsers) +add_subdirectory(StdOE) +add_subdirectory(StdOEL) +add_subdirectory(Stitcher) +add_subdirectory(Traits) + +InstallSameDir(__init__.py) diff --git a/components/iscesys/Compatibility/CMakeLists.txt b/components/iscesys/Compatibility/CMakeLists.txt new file mode 100644 index 0000000..2ea2e05 --- /dev/null +++ b/components/iscesys/Compatibility/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + Compatibility.py + __init__.py + ) diff --git a/components/iscesys/Component/CMakeLists.txt b/components/iscesys/Component/CMakeLists.txt new file mode 100644 index 0000000..9f2e2b0 --- /dev/null +++ b/components/iscesys/Component/CMakeLists.txt @@ -0,0 +1,14 @@ +InstallSameDir( + __init__.py + Application.py + Component.py + Configurable.py + FactoryInit.py + InitFromDictionary.py + InitFromFile.py + InitFromObject.py + InitFromXmlFile.py + manager.py + ProductManager.py + TraitSeq.py + ) diff --git a/components/iscesys/DataManager/CMakeLists.txt b/components/iscesys/DataManager/CMakeLists.txt new file mode 100644 index 0000000..bcfe978 --- /dev/null +++ b/components/iscesys/DataManager/CMakeLists.txt @@ -0,0 +1,8 @@ +InstallSameDir( + __init__.py + Dem1Manager.py + Dem3Manager.py + SRTMManager.py + SWBDManager.py + TileManager.py + ) diff --git a/components/iscesys/DataRetriever/CMakeLists.txt b/components/iscesys/DataRetriever/CMakeLists.txt new file mode 100644 index 0000000..0a3136c --- /dev/null +++ b/components/iscesys/DataRetriever/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + DataRetriever.py + gzipfile.py + ) diff --git a/components/iscesys/DateTimeUtil/CMakeLists.txt b/components/iscesys/DateTimeUtil/CMakeLists.txt new file mode 100644 index 0000000..436a0e5 --- /dev/null +++ b/components/iscesys/DateTimeUtil/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + DateTimeUtil.py + ) diff --git a/components/iscesys/DebugLiner/CMakeLists.txt b/components/iscesys/DebugLiner/CMakeLists.txt new file mode 100644 index 0000000..0248d39 --- /dev/null +++ b/components/iscesys/DebugLiner/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + DebugLiner.py + ) diff --git a/components/iscesys/DictUtils/CMakeLists.txt b/components/iscesys/DictUtils/CMakeLists.txt new file mode 100644 index 0000000..e0cfe6b --- /dev/null +++ b/components/iscesys/DictUtils/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + DictUtils.py + ) diff --git a/components/iscesys/Display/CMakeLists.txt b/components/iscesys/Display/CMakeLists.txt new file mode 100644 index 0000000..918a21f --- /dev/null +++ b/components/iscesys/Display/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + Display.py + GracePlot.py + ) diff --git a/components/iscesys/Dumpers/CMakeLists.txt b/components/iscesys/Dumpers/CMakeLists.txt new file mode 100644 index 0000000..cdd9a13 --- /dev/null +++ b/components/iscesys/Dumpers/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + DumperFactory.py + XmlDumper.py + ) diff --git a/components/iscesys/ImageApi/CMakeLists.txt b/components/iscesys/ImageApi/CMakeLists.txt new file mode 100644 index 0000000..a638d41 --- /dev/null +++ b/components/iscesys/ImageApi/CMakeLists.txt @@ -0,0 +1,53 @@ +# TODO (subdir-staticlib) +# This library is in a subdirectory but used by other libraries, +# so it's compiled as a static library so we don't need to worry +# about RPATH. Is there a better way to this? +add_library(DataAccessor_static STATIC + DataAccessor/src/DataAccessorCaster.cpp + DataAccessor/src/DataAccessor.cpp + DataAccessor/src/DataAccessorF.cpp + DataAccessor/src/DataAccessorNoCaster.cpp + Factories/src/AccessorFactory.cpp + Factories/src/CasterFactory.cpp + Factories/src/InterleavedFactory.cpp + InterleavedAccessor/src/BILAccessor.cpp + InterleavedAccessor/src/BIPAccessor.cpp + InterleavedAccessor/src/BSQAccessor.cpp + InterleavedAccessor/src/InterleavedAccessor.cpp + InterleavedAccessor/src/InterleavedBase.cpp + InterleavedAccessor/src/Poly1dInterpolator.cpp + InterleavedAccessor/src/Poly2dInterpolator.cpp + ) + +set_property(TARGET DataAccessor_static PROPERTY POSITION_INDEPENDENT_CODE ON) +target_include_directories(DataAccessor_static PUBLIC + DataAccessor/include + DataCaster/include + Factories/include + InterleavedAccessor/include + ) +target_link_libraries(DataAccessor_static PUBLIC + combinedLib + ) + +if(TARGET GDAL::GDAL) + target_sources(DataAccessor_static PRIVATE + InterleavedAccessor/src/GDALAccessor.cpp + ) + target_link_libraries(DataAccessor_static PUBLIC + GDAL::GDAL + ) +else() + target_compile_definitions(DataAccessor_static PRIVATE -DHAVE_GDAL=0) +endif() + +Python_add_library(DataAccessor MODULE + DataAccessor/bindings/DataAccessormodule.cpp + ) +target_link_libraries(DataAccessor PRIVATE DataAccessor_static) + +InstallSameDir( + Factories/CasterFactory.py + DataAccessor/DataAccessorPy.py + DataAccessor + ) diff --git a/components/iscesys/ImageUtil/CMakeLists.txt b/components/iscesys/ImageUtil/CMakeLists.txt new file mode 100644 index 0000000..7b9c2d6 --- /dev/null +++ b/components/iscesys/ImageUtil/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + ImageUtil.py + ) diff --git a/components/iscesys/Parsers/CMakeLists.txt b/components/iscesys/Parsers/CMakeLists.txt new file mode 100644 index 0000000..427fe58 --- /dev/null +++ b/components/iscesys/Parsers/CMakeLists.txt @@ -0,0 +1,9 @@ +add_subdirectory(rdf) + +InstallSameDir( + __init__.py + FileParserFactory.py + Parser.py + RscParser.py + XmlParser.py + ) diff --git a/components/iscesys/Parsers/rdf/CMakeLists.txt b/components/iscesys/Parsers/rdf/CMakeLists.txt new file mode 100644 index 0000000..60ff35b --- /dev/null +++ b/components/iscesys/Parsers/rdf/CMakeLists.txt @@ -0,0 +1,14 @@ +add_subdirectory(data) +add_subdirectory(language) +add_subdirectory(reserved) +add_subdirectory(units) + +InstallSameDir( + __init__.py + eRDF.py + iRDF.py + parse.py + read.py + uRDF.py + utils.py + ) diff --git a/components/iscesys/Parsers/rdf/data/CMakeLists.txt b/components/iscesys/Parsers/rdf/data/CMakeLists.txt new file mode 100644 index 0000000..3aac058 --- /dev/null +++ b/components/iscesys/Parsers/rdf/data/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + entries.py + files.py + ) diff --git a/components/iscesys/Parsers/rdf/language/CMakeLists.txt b/components/iscesys/Parsers/rdf/language/CMakeLists.txt new file mode 100644 index 0000000..0cfc5c5 --- /dev/null +++ b/components/iscesys/Parsers/rdf/language/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + errors.py + ) diff --git a/components/iscesys/Parsers/rdf/language/grammar/CMakeLists.txt b/components/iscesys/Parsers/rdf/language/grammar/CMakeLists.txt new file mode 100644 index 0000000..6972b3d --- /dev/null +++ b/components/iscesys/Parsers/rdf/language/grammar/CMakeLists.txt @@ -0,0 +1,6 @@ +InstallSameDir( + __init__.py + morpheme.py + punctuation.py + syntax.py + ) diff --git a/components/iscesys/Parsers/rdf/language/lexis/CMakeLists.txt b/components/iscesys/Parsers/rdf/language/lexis/CMakeLists.txt new file mode 100644 index 0000000..78f4b99 --- /dev/null +++ b/components/iscesys/Parsers/rdf/language/lexis/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + pragmatics.py + semantics.py + ) diff --git a/components/iscesys/Parsers/rdf/reserved/CMakeLists.txt b/components/iscesys/Parsers/rdf/reserved/CMakeLists.txt new file mode 100644 index 0000000..60f4d9a --- /dev/null +++ b/components/iscesys/Parsers/rdf/reserved/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + glyphs.py + words.py + ) diff --git a/components/iscesys/Parsers/rdf/units/CMakeLists.txt b/components/iscesys/Parsers/rdf/units/CMakeLists.txt new file mode 100644 index 0000000..27cda19 --- /dev/null +++ b/components/iscesys/Parsers/rdf/units/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + addendum.py + physical_quantity.py + ) diff --git a/components/iscesys/StdOE/CMakeLists.txt b/components/iscesys/StdOE/CMakeLists.txt new file mode 100644 index 0000000..7a1384b --- /dev/null +++ b/components/iscesys/StdOE/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + StdOEPy.py + ) diff --git a/components/iscesys/StdOEL/CMakeLists.txt b/components/iscesys/StdOEL/CMakeLists.txt new file mode 100644 index 0000000..5726e8d --- /dev/null +++ b/components/iscesys/StdOEL/CMakeLists.txt @@ -0,0 +1,30 @@ +add_library(stdoel_static STATIC + src/ScreenWriter.cpp + src/StdOELF.cpp + src/FileWriter.cpp + src/StdOEL.cpp + src/WriterFactory.cpp + ) +set_property(TARGET stdoel_static PROPERTY POSITION_INDEPENDENT_CODE ON) +target_include_directories(stdoel_static PUBLIC include) + +Python_add_library(StdOEL MODULE + bindings/StdOELmodule.cpp + ) +target_link_libraries(StdOEL PUBLIC stdoel_static) + +InstallSameDir( + StdOEL + __init__.py + StdOELPy.py + ) + +add_executable(testStdOEL test/testStdOEL.cpp + src/ScreenWriter.cpp + src/StdOELF.cpp + src/FileWriter.cpp + src/StdOEL.cpp + src/WriterFactory.cpp + ) +target_include_directories(testStdOEL PUBLIC include) +add_exe_test(testStdOEL) diff --git a/components/iscesys/Stitcher/CMakeLists.txt b/components/iscesys/Stitcher/CMakeLists.txt new file mode 100644 index 0000000..2a276d9 --- /dev/null +++ b/components/iscesys/Stitcher/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Stitcher.py + ) diff --git a/components/iscesys/Traits/CMakeLists.txt b/components/iscesys/Traits/CMakeLists.txt new file mode 100644 index 0000000..6beaffb --- /dev/null +++ b/components/iscesys/Traits/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Datetime.py + ) diff --git a/components/mroipac/CMakeLists.txt b/components/mroipac/CMakeLists.txt new file mode 100644 index 0000000..79ac998 --- /dev/null +++ b/components/mroipac/CMakeLists.txt @@ -0,0 +1,17 @@ +add_subdirectory(aikima) +add_subdirectory(ampcor) +add_subdirectory(baseline) +add_subdirectory(correlation) +add_subdirectory(dopav) +add_subdirectory(dopiq) +add_subdirectory(doppler) +add_subdirectory(filter) +add_subdirectory(fitoff) +add_subdirectory(formimage) +add_subdirectory(getPegInfo) +add_subdirectory(geolocate) +add_subdirectory(grass) +add_subdirectory(icu) +add_subdirectory(looks) + +InstallSameDir(__init__.py) diff --git a/components/mroipac/aikima/CMakeLists.txt b/components/mroipac/aikima/CMakeLists.txt new file mode 100644 index 0000000..03e2bdb --- /dev/null +++ b/components/mroipac/aikima/CMakeLists.txt @@ -0,0 +1,17 @@ +Python_add_library(aikima MODULE + bindings/aikimamodule.cpp + src/aikima.f90 + src/aikimaLib.F + src/aikimaSetState.F + src/aikimaState.F + ) +target_include_directories(aikima PUBLIC include) +target_link_libraries(aikima PUBLIC + DataAccessor_static + ) + +InstallSameDir( + aikima + __init__.py + Aikima.py + ) diff --git a/components/mroipac/ampcor/CMakeLists.txt b/components/mroipac/ampcor/CMakeLists.txt new file mode 100644 index 0000000..6b8625d --- /dev/null +++ b/components/mroipac/ampcor/CMakeLists.txt @@ -0,0 +1,22 @@ +Python_add_library(ampcor MODULE + bindings/ampcormodule.cpp + src/ampcor.F + src/ampcorAllocateDeallocate.F + src/ampcorGetState.F + src/ampcorPrintState.F + src/ampcorSetState.F + src/ampcorState.F + ) +target_include_directories(ampcor PUBLIC include) +target_link_libraries(ampcor PUBLIC + utilLib + DataAccessor_static + ) + +InstallSameDir( + ampcor + __init__.py + Ampcor.py + DenseAmpcor.py + NStage.py + ) diff --git a/components/mroipac/baseline/CMakeLists.txt b/components/mroipac/baseline/CMakeLists.txt new file mode 100644 index 0000000..a8df301 --- /dev/null +++ b/components/mroipac/baseline/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Baseline.py + ) diff --git a/components/mroipac/correlation/CMakeLists.txt b/components/mroipac/correlation/CMakeLists.txt new file mode 100644 index 0000000..b35aff7 --- /dev/null +++ b/components/mroipac/correlation/CMakeLists.txt @@ -0,0 +1,15 @@ +Python_add_library(correlationlib MODULE + bindings/correlationmodule.cpp + src/cchz_wave.cpp + src/magnitude_threshold.c + ) +target_include_directories(correlationlib PUBLIC include) +target_link_libraries(correlationlib PRIVATE + DataAccessor_static + ) + +InstallSameDir( + correlationlib + __init__.py + correlation.py + ) diff --git a/components/mroipac/dopav/CMakeLists.txt b/components/mroipac/dopav/CMakeLists.txt new file mode 100644 index 0000000..3f9e383 --- /dev/null +++ b/components/mroipac/dopav/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + Dopav.py + ) diff --git a/components/mroipac/dopiq/CMakeLists.txt b/components/mroipac/dopiq/CMakeLists.txt new file mode 100644 index 0000000..bec211a --- /dev/null +++ b/components/mroipac/dopiq/CMakeLists.txt @@ -0,0 +1,16 @@ +Python_add_library(dopiq MODULE + bindings/dopiqmodule.cpp + src/dopiq-new.f + src/dopiqAllocateDeallocate.f + src/dopiqGetState.f + src/dopiqSetState.f + src/dopiqState.f + ) +target_include_directories(dopiq PUBLIC include) +target_link_libraries(dopiq PUBLIC DataAccessor_static) + +InstallSameDir( + dopiq + __init__.py + DopIQ.py + ) diff --git a/components/mroipac/doppler/CMakeLists.txt b/components/mroipac/doppler/CMakeLists.txt new file mode 100644 index 0000000..268076b --- /dev/null +++ b/components/mroipac/doppler/CMakeLists.txt @@ -0,0 +1,16 @@ +Python_add_library(doppler MODULE + bindings/dopplermodule.cpp + src/doppler.f + src/dopplerAllocateDeallocate.f + src/dopplerGetState.f + src/dopplerSetState.f + src/dopplerState.f + ) +target_include_directories(doppler PUBLIC include) +target_link_libraries(doppler PUBLIC DataAccessor_static) + +InstallSameDir( + doppler + __init__.py + Doppler.py + ) diff --git a/components/mroipac/filter/CMakeLists.txt b/components/mroipac/filter/CMakeLists.txt new file mode 100644 index 0000000..f9e0976 --- /dev/null +++ b/components/mroipac/filter/CMakeLists.txt @@ -0,0 +1,12 @@ +Python_add_library(libfilter MODULE + src/rescale_magnitude.c + src/psfilt.c + src/timing.c + ) +target_include_directories(libfilter PUBLIC include) + +InstallSameDir( + libfilter + __init__.py + Filter.py + ) diff --git a/components/mroipac/fitoff/CMakeLists.txt b/components/mroipac/fitoff/CMakeLists.txt new file mode 100644 index 0000000..64b3541 --- /dev/null +++ b/components/mroipac/fitoff/CMakeLists.txt @@ -0,0 +1,19 @@ +Python_add_library(fitoff MODULE + bindings/fitoffmodule.cpp + src/fitoffGetState.F + src/fitoffAllocateDeallocate.F + src/fitoffSetState.F + src/fitoff.F + src/fitoffState.F + ) +target_include_directories(fitoff PUBLIC include) +target_link_libraries(fitoff PUBLIC + combinedLib + utilLib + ) + +InstallSameDir( + fitoff + __init__.py + Fitoff.py + ) diff --git a/components/mroipac/formimage/CMakeLists.txt b/components/mroipac/formimage/CMakeLists.txt new file mode 100644 index 0000000..8e299b0 --- /dev/null +++ b/components/mroipac/formimage/CMakeLists.txt @@ -0,0 +1,43 @@ +Python_add_library(formslc MODULE + formslc/bindings/formslcmodule.cpp + formslc/src/formslc.F + formslc/src/formslcGetState.F + formslc/src/formslcSetState.F + formslc/src/formslcState.F + src/acpatch.F + src/intp_coef.F + src/rcpatch.F + src/rmpatch.F + ) +target_include_directories(formslc PUBLIC + formslc/include + ) +target_link_libraries(formslc PRIVATE + DataAccessor_static + ) + +target_link_libraries(formslc PUBLIC + utilLib + ) + +InstallSameDir( + formslc + formslc/__init__.py + formslc/FormSLC.py + ) + +set(tests + formslc/test/driverFormslc.py + formslc/test/testFormslcPy.py + formslc/test/Platform930110.xml + formslc/test/SlcImage930110.xml + formslc/test/platform950523Init.ini + formslc/test/DriverFormSLC.xml + formslc/test/DriverFormSLCXXX.xml + formslc/test/Radar930110.xml + formslc/test/RawImage930110.xml + formslc/test/SlcImage930110New.xml + formslc/test/exampleCommandLine + formslc/test/formslcInit.ini + formslc/test/platform930110Init.ini + ) diff --git a/components/mroipac/formimage/formslc/test/CMakeLists.txt b/components/mroipac/formimage/formslc/test/CMakeLists.txt new file mode 100644 index 0000000..5ec6612 --- /dev/null +++ b/components/mroipac/formimage/formslc/test/CMakeLists.txt @@ -0,0 +1,7 @@ +add_python_test(driverFormslc.py) +add_python_test(testFormslcPy.py) +configure_file( + FormSCL930110.xml + FormSCL930110.xml + COPYONLY + ) diff --git a/components/mroipac/geolocate/CMakeLists.txt b/components/mroipac/geolocate/CMakeLists.txt new file mode 100644 index 0000000..5b836b6 --- /dev/null +++ b/components/mroipac/geolocate/CMakeLists.txt @@ -0,0 +1,10 @@ +Python_add_library(libgeolocate MODULE + src/geolocate_wrapper.c + src/geolocate.f + ) + +InstallSameDir( + libgeolocate + __init__.py + Geolocate.py + ) diff --git a/components/mroipac/getPegInfo/CMakeLists.txt b/components/mroipac/getPegInfo/CMakeLists.txt new file mode 100644 index 0000000..dfd6bcc --- /dev/null +++ b/components/mroipac/getPegInfo/CMakeLists.txt @@ -0,0 +1,15 @@ +Python_add_library(get_peg_info MODULE + bindings/get_peg_infomodule.cpp + src/get_peg_info.F + src/get_peg_infoSetState.F + src/get_peg_infoAllocateDeallocate.F + src/get_peg_infoGetState.F + src/get_peg_infoState.F + ) +target_include_directories(get_peg_info PUBLIC include) + +InstallSameDir( + get_peg_info + __init__.py + Get_peg_info.py + ) diff --git a/components/mroipac/grass/CMakeLists.txt b/components/mroipac/grass/CMakeLists.txt new file mode 100644 index 0000000..1599605 --- /dev/null +++ b/components/mroipac/grass/CMakeLists.txt @@ -0,0 +1,12 @@ +Python_add_library(libgrass MODULE + src/corr_flag.c + src/grass.c + src/trees.c + src/residue.c + ) + +InstallSameDir( + libgrass + __init__.py + grass.py + ) diff --git a/components/mroipac/icu/CMakeLists.txt b/components/mroipac/icu/CMakeLists.txt new file mode 100644 index 0000000..ec5b79c --- /dev/null +++ b/components/mroipac/icu/CMakeLists.txt @@ -0,0 +1,33 @@ +Python_add_library(icu MODULE + bindings/icumodule.cpp + src/grass.F + src/icu.F + src/icuState.F + src/residues.F + src/rt.F + src/unw_rt.F + src/SConscript + src/abs_phase.F + src/bermuda.F + src/gen_neutrons.F + src/icuSetState.F + src/intf_cc.F + src/intf_filt.F + src/lowpass.F + src/norm_cor.F + src/ph_sigma.F + src/ph_slope.F + src/psfilt_sub.F + src/std_cor.F + ) +target_include_directories(icu PUBLIC include) +target_link_libraries(icu PUBLIC + DataAccessor_static + utilLib + ) + +InstallSameDir( + icu + __init__.py + Icu.py + ) diff --git a/components/mroipac/looks/CMakeLists.txt b/components/mroipac/looks/CMakeLists.txt new file mode 100644 index 0000000..597a137 --- /dev/null +++ b/components/mroipac/looks/CMakeLists.txt @@ -0,0 +1,18 @@ +Python_add_library(looks MODULE + bindings/looksmodule.cpp + ) +target_include_directories(looks PUBLIC include) +target_link_libraries(looks PRIVATE + DataAccessor_static + ) + +InstallSameDir( + looks + __init__.py + Cpxlooks.py + Looks.py + Nbymdem.py + Nbymhgt.py + Powlooks.py + Rilooks.py + ) diff --git a/components/stdproc/CMakeLists.txt b/components/stdproc/CMakeLists.txt new file mode 100644 index 0000000..a299012 --- /dev/null +++ b/components/stdproc/CMakeLists.txt @@ -0,0 +1,6 @@ +add_subdirectory(alosreformat) +add_subdirectory(orbit) +add_subdirectory(rectify) +add_subdirectory(stdproc) + +InstallSameDir(__init__.py) diff --git a/components/stdproc/alosreformat/ALOS_fbd2fbs/CMakeLists.txt b/components/stdproc/alosreformat/ALOS_fbd2fbs/CMakeLists.txt new file mode 100644 index 0000000..21f2130 --- /dev/null +++ b/components/stdproc/alosreformat/ALOS_fbd2fbs/CMakeLists.txt @@ -0,0 +1,14 @@ +Python_add_library(ALOS_fbd2fbs MODULE + bindings/ALOS_fbd2fbsmodule.c + ) +target_include_directories(ALOS_fbd2fbs PUBLIC include) +target_link_libraries(ALOS_fbd2fbs PUBLIC + alos_lib + utilLib + ) + +InstallSameDir( + ALOS_fbd2fbs + __init__.py + ALOS_fbd2fbsPy.py + ) diff --git a/components/stdproc/alosreformat/ALOS_fbs2fbd/CMakeLists.txt b/components/stdproc/alosreformat/ALOS_fbs2fbd/CMakeLists.txt new file mode 100644 index 0000000..15d0c79 --- /dev/null +++ b/components/stdproc/alosreformat/ALOS_fbs2fbd/CMakeLists.txt @@ -0,0 +1,14 @@ +Python_add_library(ALOS_fbs2fbd MODULE + bindings/ALOS_fbs2fbdmodule.c + ) +target_include_directories(ALOS_fbs2fbd PUBLIC include) +target_link_libraries(ALOS_fbs2fbd PUBLIC + alos_lib + utilLib + ) + +InstallSameDir( + ALOS_fbs2fbd + __init__.py + ALOS_fbs2fbdPy.py + ) diff --git a/components/stdproc/alosreformat/CMakeLists.txt b/components/stdproc/alosreformat/CMakeLists.txt new file mode 100644 index 0000000..7d2dbe8 --- /dev/null +++ b/components/stdproc/alosreformat/CMakeLists.txt @@ -0,0 +1,23 @@ +add_library(alos_lib STATIC + ALOS_lib/src/cfft1d.c + ALOS_lib/src/find_fft_length.c + ALOS_lib/src/utils.c + ALOS_lib/src/ALOS_ldr_orbit.c + ALOS_lib/src/SConscript + ALOS_lib/src/calc_dop.c + ALOS_lib/src/cfft1d_fftpack.c + ALOS_lib/src/fftpack.c + ALOS_lib/src/get_sio_struct.c + ALOS_lib/src/hermite_c.c + ALOS_lib/src/interpolate_ALOS_orbit.c + ALOS_lib/src/null_sio_struct.c + ALOS_lib/src/read_ALOS_sarleader.c + ALOS_lib/src/rng_compress.c + ) +target_include_directories(alos_lib PUBLIC include) +set_property(TARGET alos_lib PROPERTY POSITION_INDEPENDENT_CODE ON) + +add_subdirectory(ALOS_fbd2fbs) +add_subdirectory(ALOS_fbs2fbd) + +InstallSameDir(__init__.py) diff --git a/components/stdproc/orbit/CMakeLists.txt b/components/stdproc/orbit/CMakeLists.txt new file mode 100644 index 0000000..701ac99 --- /dev/null +++ b/components/stdproc/orbit/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + pegManipulator.py + ) diff --git a/components/stdproc/rectify/CMakeLists.txt b/components/stdproc/rectify/CMakeLists.txt new file mode 100644 index 0000000..56c5d4f --- /dev/null +++ b/components/stdproc/rectify/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(geocode) + +InstallSameDir(__init__.py) diff --git a/components/stdproc/rectify/geocode/CMakeLists.txt b/components/stdproc/rectify/geocode/CMakeLists.txt new file mode 100644 index 0000000..c535ae1 --- /dev/null +++ b/components/stdproc/rectify/geocode/CMakeLists.txt @@ -0,0 +1,26 @@ +Python_add_library(geocode MODULE + bindings/geocodemodule.cpp + src/coordinates.f90 + src/geocode.f90 + src/geocodeAllocateDeallocate.F + src/geocodeGetState.F + src/geocodeMethods.F + src/geocodeReadWrite.F + src/geocodeSetState.F + src/geocodeState.F + ) +target_include_directories(geocode PUBLIC include) +target_link_libraries(geocode PUBLIC + DataAccessor_static + OpenMP::OpenMP_CXX + stdoel_static + combinedLib + utilLib + ) + +InstallSameDir( + geocode + __init__.py + Geocode.py + Geocodable.py + ) diff --git a/components/stdproc/stdproc/CMakeLists.txt b/components/stdproc/stdproc/CMakeLists.txt new file mode 100644 index 0000000..c40da12 --- /dev/null +++ b/components/stdproc/stdproc/CMakeLists.txt @@ -0,0 +1,35 @@ +# TODO (subdir-staticlib) +# This library is in a subdirectory but used by other libraries, +# so it's compiled as a static library so we don't need to worry +# about RPATH. Is there a better way to this? +add_library(formslcLib SHARED + formslcLib/src/arraymodule.f90 + formslcLib/src/get_frate.f90 + formslcLib/src/io.c + ) +set_property(TARGET formslcLib PROPERTY POSITION_INDEPENDENT_CODE ON) +target_include_directories(formslcLib PRIVATE formslcLib/include) +target_link_libraries(formslcLib PUBLIC + utilLib + ) +# TODO (fortran module include) +# This seems to be needed to use this library's modules, +# but is there a more idiomatic way to do this? +target_include_directories(formslcLib INTERFACE + ${CMAKE_CURRENT_BINARY_DIR} + ) + +add_subdirectory(correct) +add_subdirectory(crossmul) +add_subdirectory(estamb) +add_subdirectory(formslc) +add_subdirectory(mocompTSX) +add_subdirectory(offsetpoly) +add_subdirectory(resamp) +add_subdirectory(resamp_amps) +add_subdirectory(resamp_image) +add_subdirectory(resamp_only) +add_subdirectory(resamp_slc) +add_subdirectory(topo) + +InstallSameDir(__init__.py) diff --git a/components/stdproc/stdproc/correct/CMakeLists.txt b/components/stdproc/stdproc/correct/CMakeLists.txt new file mode 100644 index 0000000..a237f5c --- /dev/null +++ b/components/stdproc/stdproc/correct/CMakeLists.txt @@ -0,0 +1,13 @@ +Python_add_library(correct MODULE + bindings/correctmodule.cpp + src/correctAllocateDeallocate.f + src/correctSetState.f + src/correctState.f + ) +target_include_directories(correct PUBLIC include) + +InstallSameDir( + correct + __init__.py + Correct.py + ) diff --git a/components/stdproc/stdproc/crossmul/CMakeLists.txt b/components/stdproc/stdproc/crossmul/CMakeLists.txt new file mode 100644 index 0000000..094f295 --- /dev/null +++ b/components/stdproc/stdproc/crossmul/CMakeLists.txt @@ -0,0 +1,12 @@ +Python_add_library(crossmul MODULE + bindings/crossmulmodule.cpp + src/crossmulState.F + src/crossmul.f90 + ) +target_include_directories(crossmul PUBLIC include) + +InstallSameDir( + crossmul + __init__.py + Crossmul.py + ) diff --git a/components/stdproc/stdproc/estamb/CMakeLists.txt b/components/stdproc/stdproc/estamb/CMakeLists.txt new file mode 100644 index 0000000..a729fea --- /dev/null +++ b/components/stdproc/stdproc/estamb/CMakeLists.txt @@ -0,0 +1,14 @@ +Python_add_library(estamb MODULE + bindings/estambmodule.cpp + src/estambAllocateDeallocate.F + src/estambGetState.F + src/estambSetState.F + src/estambStateSoi.f90 + ) +target_include_directories(estamb PUBLIC include) + +InstallSameDir( + estamb + __init__.py + Estamb.py + ) diff --git a/components/stdproc/stdproc/formslc/CMakeLists.txt b/components/stdproc/stdproc/formslc/CMakeLists.txt new file mode 100644 index 0000000..aee2a7e --- /dev/null +++ b/components/stdproc/stdproc/formslc/CMakeLists.txt @@ -0,0 +1,22 @@ +Python_add_library(stdproc_formslc MODULE + bindings/formslcmodule.cpp + src/formslcAllocateDeallocate.F + src/formslcGetState.F + src/formslcSetState.F + src/formslcStateSoi.f90 + ) +target_include_directories(stdproc_formslc PUBLIC include) +target_link_libraries(stdproc_formslc PUBLIC + combinedLib + formslcLib + utilLib + ) + +set_target_properties(stdproc_formslc + PROPERTIES OUTPUT_NAME formslc) + +InstallSameDir( + stdproc_formslc + __init__.py + Formslc.py + ) diff --git a/components/stdproc/stdproc/mocompTSX/CMakeLists.txt b/components/stdproc/stdproc/mocompTSX/CMakeLists.txt new file mode 100644 index 0000000..02118e8 --- /dev/null +++ b/components/stdproc/stdproc/mocompTSX/CMakeLists.txt @@ -0,0 +1,20 @@ +Python_add_library(mocompTSX MODULE + bindings/mocompTSXmodule.cpp + src/mocompTSXAllocateDeallocate.f + src/mocompTSXGetState.f + src/mocompTSXSetState.f + src/mocompTSXState.f + ) +target_include_directories(mocompTSX PUBLIC include) +target_link_libraries(mocompTSX + PUBLIC + combinedLib + formslcLib + utilLib + ) + +InstallSameDir( + mocompTSX + __init__.py + MocompTSX.py + ) diff --git a/components/stdproc/stdproc/offsetpoly/CMakeLists.txt b/components/stdproc/stdproc/offsetpoly/CMakeLists.txt new file mode 100644 index 0000000..0124945 --- /dev/null +++ b/components/stdproc/stdproc/offsetpoly/CMakeLists.txt @@ -0,0 +1,19 @@ +Python_add_library(offsetpoly MODULE + bindings/offsetpolymodule.cpp + src/offsetpolyState.F + src/offsetpoly.f90 + src/offsetpolySetState.F + src/offsetpolyAllocateDeallocate.F + src/offsetpolyGetState.F + ) +target_include_directories(offsetpoly PUBLIC include) +target_link_libraries(offsetpoly PUBLIC + combinedLib + utilLib + ) + +InstallSameDir( + offsetpoly + __init__.py + Offsetpoly.py + ) diff --git a/components/stdproc/stdproc/resamp/CMakeLists.txt b/components/stdproc/stdproc/resamp/CMakeLists.txt new file mode 100644 index 0000000..62df9b0 --- /dev/null +++ b/components/stdproc/stdproc/resamp/CMakeLists.txt @@ -0,0 +1,18 @@ +Python_add_library(resamp MODULE + bindings/resampmodule.cpp + src/resamp.f90 + src/resampAllocateDeallocate.F + src/resampGetState.F + src/resampSetState.F + src/resampState.F + ) +target_include_directories(resamp PUBLIC include) +target_link_libraries(resamp PUBLIC + utilLib + ) + +InstallSameDir( + resamp + __init__.py + Resamp.py + ) diff --git a/components/stdproc/stdproc/resamp_amps/CMakeLists.txt b/components/stdproc/stdproc/resamp_amps/CMakeLists.txt new file mode 100644 index 0000000..a8c3edb --- /dev/null +++ b/components/stdproc/stdproc/resamp_amps/CMakeLists.txt @@ -0,0 +1,15 @@ +Python_add_library(resamp_amps MODULE + bindings/resamp_ampsmodule.cpp + src/resamp_amps.f90 + src/resamp_ampsAllocateDeallocate.F + src/resamp_ampsGetState.F + src/resamp_ampsSetState.F + src/resamp_ampsState.F + ) +target_include_directories(resamp_amps PUBLIC include) + +InstallSameDir( + resamp_amps + __init__.py + Resamp_amps.py + ) diff --git a/components/stdproc/stdproc/resamp_image/CMakeLists.txt b/components/stdproc/stdproc/resamp_image/CMakeLists.txt new file mode 100644 index 0000000..c5966e5 --- /dev/null +++ b/components/stdproc/stdproc/resamp_image/CMakeLists.txt @@ -0,0 +1,17 @@ +Python_add_library(resamp_image MODULE + bindings/resamp_imagemodule.cpp + src/resamp_imageState.F + src/resamp_image.f90 + src/resamp_imageAllocateDeallocate.F + src/resamp_imageSetState.F + ) +target_include_directories(resamp_image PUBLIC include) +target_link_libraries(resamp_image PUBLIC + utilLib + ) + +InstallSameDir( + resamp_image + __init__.py + Resamp_image.py + ) diff --git a/components/stdproc/stdproc/resamp_only/CMakeLists.txt b/components/stdproc/stdproc/resamp_only/CMakeLists.txt new file mode 100644 index 0000000..add4b5d --- /dev/null +++ b/components/stdproc/stdproc/resamp_only/CMakeLists.txt @@ -0,0 +1,15 @@ +Python_add_library(resamp_only MODULE + bindings/resamp_onlymodule.cpp + src/resamp_onlySetState.F + src/resamp_only.f90 + src/resamp_onlyAllocateDeallocate.F + src/resamp_onlyGetState.F + src/resamp_onlyState.F + ) +target_include_directories(resamp_only PUBLIC include) + +InstallSameDir( + resamp_only + __init__.py + Resamp_only.py + ) diff --git a/components/stdproc/stdproc/resamp_slc/CMakeLists.txt b/components/stdproc/stdproc/resamp_slc/CMakeLists.txt new file mode 100644 index 0000000..96c833b --- /dev/null +++ b/components/stdproc/stdproc/resamp_slc/CMakeLists.txt @@ -0,0 +1,21 @@ +Python_add_library(resamp_slc MODULE + bindings/resamp_slcmodule.cpp + src/resamp_slc.f90 + src/resamp_slcSetState.F + src/resamp_slcMethods.f + src/resamp_slcState.F + ) +target_include_directories(resamp_slc PUBLIC include) +target_link_libraries(resamp_slc PUBLIC + combinedLib + utilLib + ) +target_compile_options(resamp_slc PRIVATE + -ffree-line-length-none + ) + +InstallSameDir( + resamp_slc + __init__.py + Resamp_slc.py + ) diff --git a/components/stdproc/stdproc/topo/CMakeLists.txt b/components/stdproc/stdproc/topo/CMakeLists.txt new file mode 100644 index 0000000..450066e --- /dev/null +++ b/components/stdproc/stdproc/topo/CMakeLists.txt @@ -0,0 +1,19 @@ +Python_add_library(topo MODULE + bindings/topomodule.cpp + src/topoAllocateDeallocate.f + src/topoGetState.f + src/topoMethods.f + src/topoSetState.f + src/topoState.f + ) +target_include_directories(topo PUBLIC include) +target_link_libraries(topo PUBLIC + combinedLib + utilLib + ) + +InstallSameDir( + topo + __init__.py + Topo.py + ) diff --git a/components/zerodop/CMakeLists.txt b/components/zerodop/CMakeLists.txt new file mode 100644 index 0000000..f311321 --- /dev/null +++ b/components/zerodop/CMakeLists.txt @@ -0,0 +1,10 @@ +add_subdirectory(geo2rdr) +add_subdirectory(geozero) +add_subdirectory(topozero) + +if(CMAKE_CUDA_COMPILER) + # add_subdirectory(GPUampcor) TODO cublas_device removed from CUDA ≥ 10 + add_subdirectory(GPUgeo2rdr) +endif() + +InstallSameDir(__init__.py) diff --git a/components/zerodop/GPUampcor/CMakeLists.txt b/components/zerodop/GPUampcor/CMakeLists.txt new file mode 100644 index 0000000..302b182 --- /dev/null +++ b/components/zerodop/GPUampcor/CMakeLists.txt @@ -0,0 +1,14 @@ +cython_add_module(GPUampcor + GPUampcor.pyx + cuda/GPUamp.cu + src/Ampcor.cpp + src/AmpcorFFT.cpp + src/AmpcorMethods.cpp + ) +target_include_directories(GPUampcor PUBLIC + include + ) +target_link_libraries(GPUampcor PRIVATE + cublas + DataAccessor_static + ) diff --git a/components/zerodop/GPUgeo2rdr/CMakeLists.txt b/components/zerodop/GPUgeo2rdr/CMakeLists.txt new file mode 100644 index 0000000..78afd24 --- /dev/null +++ b/components/zerodop/GPUgeo2rdr/CMakeLists.txt @@ -0,0 +1,19 @@ +cython_add_module(GPUgeo2rdr + GPUgeo2rdr.pyx + cuda/GPUgeo.cu + src/Ellipsoid.cpp + src/Geo2rdr.cpp + src/GeoController.cpp + src/LinAlg.cpp + src/Orbit.cpp + src/Poly1d.cpp + ) +target_include_directories(GPUgeo2rdr PUBLIC + include + ) +target_link_libraries(GPUgeo2rdr PRIVATE + DataAccessor_static + ) +if(TARGET OpenMP::OpenMP_CXX) + target_link_libraries(GPUgeo2rdr PRIVATE OpenMP::OpenMP_CXX) +endif() diff --git a/components/zerodop/geo2rdr/CMakeLists.txt b/components/zerodop/geo2rdr/CMakeLists.txt new file mode 100644 index 0000000..747b0a3 --- /dev/null +++ b/components/zerodop/geo2rdr/CMakeLists.txt @@ -0,0 +1,24 @@ +Python_add_library(geo2rdr MODULE + bindings/geo2rdrmodule.cpp + src/geo2rdrSetState.F + src/geo2rdr.f90 + src/geo2rdrState.F + ) +target_include_directories(geo2rdr PUBLIC include) +target_link_libraries(geo2rdr PUBLIC + DataAccessor_static + combinedLib + utilLib + ) + +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(geo2rdr PRIVATE + OpenMP::OpenMP_Fortran + ) +endif() + +InstallSameDir( + geo2rdr + __init__.py + Geo2rdr.py + ) diff --git a/components/zerodop/geozero/CMakeLists.txt b/components/zerodop/geozero/CMakeLists.txt new file mode 100644 index 0000000..b54f763 --- /dev/null +++ b/components/zerodop/geozero/CMakeLists.txt @@ -0,0 +1,24 @@ +Python_add_library(geozero MODULE + bindings/geozeromodule.cpp + src/geozero.f90 + src/geozeroGetState.F + src/geozeroMethods.F + src/geozeroReadWrite.F + src/geozeroSetState.F + src/geozeroState.F + src/SConscript + ) +target_include_directories(geozero PUBLIC include) +target_link_libraries(geozero PUBLIC + DataAccessor_static + combinedLib + utilLib + OpenMP::OpenMP_Fortran + ) + +InstallSameDir( + geozero + __init__.py + Geozero.py + Geocodable.py + ) diff --git a/components/zerodop/topozero/CMakeLists.txt b/components/zerodop/topozero/CMakeLists.txt new file mode 100644 index 0000000..5ed4bd4 --- /dev/null +++ b/components/zerodop/topozero/CMakeLists.txt @@ -0,0 +1,26 @@ +Python_add_library(topozero MODULE + bindings/topozeromodule.cpp + src/topozero.f90 + src/topozeroGetState.f + src/topozeroMethods.f + src/topozeroSetState.f + src/topozeroState.f + ) +target_include_directories(topozero PUBLIC include) +target_link_libraries(topozero PRIVATE + combinedLib + utilLib + DataAccessor_static + ) +set_source_files_properties(src/topozero.f90 PROPERTIES COMPILE_OPTIONS -cpp) +if(TARGET OpenMP::OpenMP_Fortran) + target_link_libraries(topozero PUBLIC + OpenMP::OpenMP_Fortran + ) +endif() + +InstallSameDir( + topozero + __init__.py + Topozero.py + ) diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt new file mode 100644 index 0000000..4b8ba1e --- /dev/null +++ b/contrib/CMakeLists.txt @@ -0,0 +1,18 @@ +add_subdirectory(issi) +add_subdirectory(Snaphu) +add_subdirectory(demUtils) +add_subdirectory(frameUtils) +#add_subdirectory(unwUtils) +add_subdirectory(downsample_unwrapper) + +#add_subdirectory(PyCuAmpcor) +add_subdirectory(splitSpectrum) +add_subdirectory(alos2filter) +add_subdirectory(alos2proc) +add_subdirectory(alos2proc_f) +add_subdirectory(rfi) +add_subdirectory(mdx) + +InstallSameDir( + __init__.py + ) diff --git a/contrib/Snaphu/CMakeLists.txt b/contrib/Snaphu/CMakeLists.txt new file mode 100644 index 0000000..cd87cb1 --- /dev/null +++ b/contrib/Snaphu/CMakeLists.txt @@ -0,0 +1,20 @@ +Python_add_library(snaphu MODULE + bindings/snaphumodule.cpp + src/snaphu.c + src/snaphu_cost.c + src/snaphu_cs2.c + src/snaphu_io.c + src/snaphu_solver.c + src/snaphu_tile.c + src/snaphu_util.c + ) +target_include_directories(snaphu PUBLIC include) +target_link_libraries(snaphu PUBLIC + DataAccessor_static + ) + +InstallSameDir( + snaphu + __init__.py + Snaphu.py + ) diff --git a/contrib/UnwrapComp/CMakeLists.txt b/contrib/UnwrapComp/CMakeLists.txt new file mode 100644 index 0000000..a821300 --- /dev/null +++ b/contrib/UnwrapComp/CMakeLists.txt @@ -0,0 +1,7 @@ +# TODO check for RelaxIV + +InstallSameDir( + __init__.py + phaseUnwrap.py + unwrapComponents.py + ) diff --git a/contrib/alos2filter/CMakeLists.txt b/contrib/alos2filter/CMakeLists.txt new file mode 100644 index 0000000..c5ef36d --- /dev/null +++ b/contrib/alos2filter/CMakeLists.txt @@ -0,0 +1,12 @@ +add_library(alos2filter SHARED src/psfilt1.c) +set_target_properties(alos2filter PROPERTIES + PREFIX "" + OUTPUT_NAME libalos2filter + SUFFIX .so) +target_link_libraries(alos2filter PUBLIC FFTW::Float) + +InstallSameDir( + alos2filter + __init__.py + alos2filter.py + ) diff --git a/contrib/alos2proc/CMakeLists.txt b/contrib/alos2proc/CMakeLists.txt new file mode 100644 index 0000000..c98e1da --- /dev/null +++ b/contrib/alos2proc/CMakeLists.txt @@ -0,0 +1,23 @@ +Python_add_library(libalos2proc MODULE + src/rg_filter.c + src/lib_file.c + src/lib_cpx.c + src/mbf.c + src/lib_array.c + src/lib_func.c + src/resamp.c + src/mosaicsubswath.c + src/look.c + src/extract_burst.c + ) +target_include_directories(libalos2proc PUBLIC include) +target_link_libraries(libalos2proc PUBLIC + FFTW::Float + OpenMP::OpenMP_C + ) + +InstallSameDir( + libalos2proc + __init__.py + alos2proc.py + ) diff --git a/contrib/alos2proc_f/CMakeLists.txt b/contrib/alos2proc_f/CMakeLists.txt new file mode 100644 index 0000000..888d594 --- /dev/null +++ b/contrib/alos2proc_f/CMakeLists.txt @@ -0,0 +1,35 @@ +if(NOT CYTHON_EXECUTABLE) + return() +endif() + +cython_add_module(alos2proc_f + pyx/alos2proc_f.pyx + src/bilinear.f + src/curvature.f + src/interp.f + src/lincomb.f + src/matvec.f + src/rect.f + src/convert_sch_to_xyz.f + src/enubasis.f + src/intpcoefnorm.f + src/look_coord_conv.f + src/norm.f + src/rect_with_looks.f + src/tranmat.f + src/cross.f + src/fitoff.f + src/latlon.f + src/matmat.f + src/radar_to_xyz.f + src/schbasis.f + src/cbind.f90 + ) + +target_include_directories(alos2proc_f PUBLIC include) +target_link_libraries(alos2proc_f PUBLIC FFTW::Float OpenMP::OpenMP_Fortran) + +InstallSameDir( + alos2proc_f + __init__.py + ) diff --git a/contrib/alos2proc_f/src/cbind.f90 b/contrib/alos2proc_f/src/cbind.f90 index cf5ece2..79964b6 100644 --- a/contrib/alos2proc_f/src/cbind.f90 +++ b/contrib/alos2proc_f/src/cbind.f90 @@ -28,7 +28,8 @@ call rect(infile,outfile,ndac,nddn,nrac,nrdn,a,b,c,d,e,f,filetype,intstyle) end subroutine - subroutine c_rect_with_looks(infile,outfile,ndac,nddn,nrac,nrdn,a,b,c,d,e,f,lac,ldn,lac0,ldn0,filetype,intstyle) bind(c, name="c_rect_with_looks") + subroutine c_rect_with_looks(infile,outfile,ndac,nddn,nrac,nrdn,a,b,c,d,e,f,lac,ldn,lac0,ldn0,filetype,intstyle) & + bind(c, name="c_rect_with_looks") use iso_c_binding, only : c_double, c_char, c_int implicit none external rect_with_looks diff --git a/contrib/demUtils/CMakeLists.txt b/contrib/demUtils/CMakeLists.txt new file mode 100644 index 0000000..bc1ea64 --- /dev/null +++ b/contrib/demUtils/CMakeLists.txt @@ -0,0 +1,32 @@ +Python_add_library(correct_geoid_i2_srtm MODULE + correct_geoid_i2_srtm/bindings/correct_geoid_i2_srtmmodule.cpp + correct_geoid_i2_srtm/src/correct_geoid_i2_srtm.f + correct_geoid_i2_srtm/src/correct_geoid_i2_srtmState.f + correct_geoid_i2_srtm/src/correct_geoid_i2_srtmSetState.f + ) +target_include_directories(correct_geoid_i2_srtm PUBLIC + correct_geoid_i2_srtm/include + ) +target_link_libraries(correct_geoid_i2_srtm PUBLIC + DataAccessor_static + stdoel_static + utilLib + ) + +Python_add_library(demStitch MODULE + demstitcher/bindings/demStitch.c + ) + +InstallSameDir( + demStitch + correct_geoid_i2_srtm + __init__.py + correct_geoid_i2_srtm/Correct_geoid_i2_srtm.py + correct_geoid_i2_srtm/egm96geoid.dat + demstitcher/DemStitcher.py + demstitcher/DemStitcherV3.py + swbdstitcher/SWBDStitcher.py + upsampledem/UpsampleDem.py + watermask/test/mask.py + watermask/WaterMask.py + ) diff --git a/contrib/downsample_unwrapper/CMakeLists.txt b/contrib/downsample_unwrapper/CMakeLists.txt new file mode 100644 index 0000000..7f6e06c --- /dev/null +++ b/contrib/downsample_unwrapper/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + downsample_unwrapper.py + run_unwrap_snaphu.py + ) diff --git a/contrib/frameUtils/CMakeLists.txt b/contrib/frameUtils/CMakeLists.txt new file mode 100644 index 0000000..0b616ab --- /dev/null +++ b/contrib/frameUtils/CMakeLists.txt @@ -0,0 +1,5 @@ +InstallSameDir( + __init__.py + FrameInfoExtractor.py + FrameMetaData.py + ) diff --git a/contrib/issi/CMakeLists.txt b/contrib/issi/CMakeLists.txt new file mode 100644 index 0000000..2d61141 --- /dev/null +++ b/contrib/issi/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(applications) +add_subdirectory(components) diff --git a/contrib/issi/applications/CMakeLists.txt b/contrib/issi/applications/CMakeLists.txt new file mode 100644 index 0000000..c8c6235 --- /dev/null +++ b/contrib/issi/applications/CMakeLists.txt @@ -0,0 +1,3 @@ +install(PROGRAMS ISSI.py + DESTINATION ${ISCE2_PKG}/applications + ) diff --git a/contrib/issi/components/CMakeLists.txt b/contrib/issi/components/CMakeLists.txt new file mode 100644 index 0000000..a341361 --- /dev/null +++ b/contrib/issi/components/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(ISSI) diff --git a/contrib/issi/components/ISSI/CMakeLists.txt b/contrib/issi/components/ISSI/CMakeLists.txt new file mode 100644 index 0000000..10f2fa1 --- /dev/null +++ b/contrib/issi/components/ISSI/CMakeLists.txt @@ -0,0 +1,19 @@ +add_library(issi SHARED + src/calculateBVector.c + src/cfr.c + src/cfrToFr.c + src/frToTEC.c + src/igrf2005_sub.f + src/polarimetricCalibration.f + src/polcal.c + src/tecToPhase.c + ) +target_include_directories(issi PUBLIC include) + +add_subdirectory(src) + +InstallSameDir( + issi + __init__.py + FR.py + ) diff --git a/contrib/issi/components/ISSI/src/CMakeLists.txt b/contrib/issi/components/ISSI/src/CMakeLists.txt new file mode 100644 index 0000000..61f2d84 --- /dev/null +++ b/contrib/issi/components/ISSI/src/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(igrf_data) diff --git a/contrib/issi/components/ISSI/src/igrf_data/CMakeLists.txt b/contrib/issi/components/ISSI/src/igrf_data/CMakeLists.txt new file mode 100644 index 0000000..714613b --- /dev/null +++ b/contrib/issi/components/ISSI/src/igrf_data/CMakeLists.txt @@ -0,0 +1,18 @@ +InstallSameDir( + dgrf00.dat + dgrf45.dat + dgrf50.dat + dgrf55.dat + dgrf60.dat + dgrf65.dat + dgrf70.dat + dgrf75.dat + dgrf80.dat + dgrf85.dat + dgrf90.dat + dgrf95.dat + igrf05.dat + igrf05full.dat + igrf05s.dat + igrf10.dat + ) diff --git a/contrib/mdx/CMakeLists.txt b/contrib/mdx/CMakeLists.txt new file mode 100644 index 0000000..efacb3c --- /dev/null +++ b/contrib/mdx/CMakeLists.txt @@ -0,0 +1,25 @@ +if(TARGET Motif::Motif + AND TARGET X11::X11 + AND TARGET X11::Xau + AND TARGET X11::Xt + ) + add_executable(mdx + src/graphx_mdx.c + src/rdf_reader_subs.f + src/mdx_main.F + src/mdx.F + ) + target_compile_definitions(mdx PRIVATE SUN IO64) + if("${CMAKE_Fortran_COMPILER_ID}" STREQUAL "GNU") + target_compile_definitions(mdx PRIVATE GFORTRAN) + endif() + target_link_libraries(mdx PUBLIC + Motif::Motif + X11::X11 + X11::Xau + X11::Xt + ) + install(TARGETS mdx + RUNTIME DESTINATION bin + ) +endif() diff --git a/contrib/rfi/CMakeLists.txt b/contrib/rfi/CMakeLists.txt new file mode 100644 index 0000000..5dbf30d --- /dev/null +++ b/contrib/rfi/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + mask.py + ) diff --git a/contrib/splitSpectrum/CMakeLists.txt b/contrib/splitSpectrum/CMakeLists.txt new file mode 100644 index 0000000..fde6ae5 --- /dev/null +++ b/contrib/splitSpectrum/CMakeLists.txt @@ -0,0 +1,12 @@ +InstallSameDir(__init__.py) + +if(CYTHON_EXECUTABLE AND TARGET GDAL::GDAL) + cython_add_module(splitSpectrum + pyx/splitRangeSpectrum.pyx + src/splitRangeSpectrum.cc + ) + target_include_directories(splitSpectrum PUBLIC include) + target_link_libraries(splitSpectrum PUBLIC GDAL::GDAL FFTW::Float OpenMP::OpenMP_CXX) + + InstallSameDir(splitSpectrum) +endif() diff --git a/defaults/CMakeLists.txt b/defaults/CMakeLists.txt new file mode 100644 index 0000000..14a7ff4 --- /dev/null +++ b/defaults/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(logging) +add_subdirectory(plugins) +InstallSameDir(__init__.py) diff --git a/defaults/logging/CMakeLists.txt b/defaults/logging/CMakeLists.txt new file mode 100644 index 0000000..ffd684a --- /dev/null +++ b/defaults/logging/CMakeLists.txt @@ -0,0 +1,4 @@ +InstallSameDir( + __init__.py + logging.conf + ) diff --git a/defaults/plugins/CMakeLists.txt b/defaults/plugins/CMakeLists.txt new file mode 100644 index 0000000..7c1de7e --- /dev/null +++ b/defaults/plugins/CMakeLists.txt @@ -0,0 +1,3 @@ +InstallSameDir( + __init__.py + ) diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt new file mode 100644 index 0000000..ac6f3af --- /dev/null +++ b/library/CMakeLists.txt @@ -0,0 +1,3 @@ +add_subdirectory(isceLib) + +InstallSameDir(__init__.py) diff --git a/library/isceLib/CMakeLists.txt b/library/isceLib/CMakeLists.txt new file mode 100644 index 0000000..2e735a4 --- /dev/null +++ b/library/isceLib/CMakeLists.txt @@ -0,0 +1,16 @@ +Python_add_library(isceLib MODULE + src/Ellipsoid.cpp + src/LinAlg.cpp + src/Orbit.cpp + src/Peg.cpp + src/Pegtrans.cpp + src/Poly1d.cpp + src/Poly2d.cpp + src/Position.cpp + ) +target_include_directories(isceLib PUBLIC include) + +InstallSameDir( + isceLib + __init__.py + ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt new file mode 100644 index 0000000..3c35713 --- /dev/null +++ b/test/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(components) diff --git a/test/components/CMakeLists.txt b/test/components/CMakeLists.txt new file mode 100644 index 0000000..b4119c6 --- /dev/null +++ b/test/components/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(isceobj) +add_subdirectory(iscesys) diff --git a/test/components/isceobj/CMakeLists.txt b/test/components/isceobj/CMakeLists.txt new file mode 100644 index 0000000..854c404 --- /dev/null +++ b/test/components/isceobj/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Planet) diff --git a/test/components/isceobj/Planet/CMakeLists.txt b/test/components/isceobj/Planet/CMakeLists.txt new file mode 100644 index 0000000..4951aee --- /dev/null +++ b/test/components/isceobj/Planet/CMakeLists.txt @@ -0,0 +1,2 @@ +add_exe_test(for_ellipsoid_test.F) +# TODO add_python_test(test_ellipsoid.py) diff --git a/test/components/iscesys/CMakeLists.txt b/test/components/iscesys/CMakeLists.txt new file mode 100644 index 0000000..361aa9a --- /dev/null +++ b/test/components/iscesys/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(Component) diff --git a/test/components/iscesys/Component/CMakeLists.txt b/test/components/iscesys/Component/CMakeLists.txt new file mode 100644 index 0000000..1ccbccb --- /dev/null +++ b/test/components/iscesys/Component/CMakeLists.txt @@ -0,0 +1 @@ +# TODO add_python_test(test_traitseq.py)