From 119c8e053d1b35c9fa375592c9bf392b2c6c4bed Mon Sep 17 00:00:00 2001 From: Oleg Alexandrov Date: Fri, 8 Dec 2023 19:29:59 -0800 Subject: [PATCH] Fall back to c++14, adjust the workflow scripts --- .github/workflows/build_test.sh | 12 +++++++----- .github/workflows/build_test.yml | 9 +++++---- CMakeLists.txt | 2 +- src/asp/CMakeLists.txt | 4 +--- src/asp/PclIO/CMakeLists.txt | 3 ++- 5 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build_test.sh b/.github/workflows/build_test.sh index 51e9d637c..96688dfe1 100755 --- a/.github/workflows/build_test.sh +++ b/.github/workflows/build_test.sh @@ -27,6 +27,9 @@ source ~/.bash_profile conda activate $envName conda install -c conda-forge -y parallel +# These ineed installing for now +conda install -c nasa-ames-stereo-pipeline -c usgs-astrogeology -c conda-forge geoid=1.0_isis7 htdp=1.0_isis7 -y + baseDir=$(dirname $aspRepoDir) # one level up installDir=$baseDir/install @@ -53,11 +56,10 @@ fi # if [ ! -d "$envPath" ]; then # envPath=$HOME/miniconda3/envs/${envName} # fi - -if [ ! -d "$envPath" ]; then - echo "Error: Directory: $envPath does not exist" - exit 1 -fi +# if [ ! -d "$envPath" ]; then +# echo "Error: Directory: $envPath does not exist" +# exit 1 +# fi # packageDir will later be uploaded, as set in the yml file packageDir=$baseDir/packages diff --git a/.github/workflows/build_test.yml b/.github/workflows/build_test.yml index 9c06db48c..0df558fa9 100644 --- a/.github/workflows/build_test.yml +++ b/.github/workflows/build_test.yml @@ -12,7 +12,6 @@ on: jobs: build: - runs-on: macos-latest steps: - uses: actions/checkout@v3 @@ -23,7 +22,8 @@ jobs: cache-name: cache-conda with: # Use cached ASP dependencies. They will be created manually - # after starting a session with ssh.yml. + # after starting a session with ssh.yml. The cache must be wiped + # from the web interface if desired to recreate it. path: | /usr/local/miniconda/envs key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/miniconda.json') }} @@ -32,8 +32,9 @@ jobs: ${{ runner.os }}-build- ${{ runner.os }}- - name: build_test - ##run: ./.github/workflows/build_test.sh - run: ./.github/workflows/build_isis.sh + run: ./.github/workflows/build_test.sh + ## The script below builds ISIS and other ASP dependencies. + ##run: ./.github/workflows/build_isis.sh - name: Upload artifacts uses: actions/upload-artifact@v2 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index b60bd242a..a2efc554f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_CXX_FLAGS "" CACHE STRING "") set(CMAKE_C_FLAGS "" CACHE STRING "") # cmake fails without the -L flag in CMAKE_CXX_FLAGS, oddly enough. -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++17 -DNDEBUG") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -std=c++14 -DNDEBUG") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") set(CMAKE_EXE_LINKER_FLAGS "-pthread -lpthread") diff --git a/src/asp/CMakeLists.txt b/src/asp/CMakeLists.txt index 2be8954d4..21743f8a4 100644 --- a/src/asp/CMakeLists.txt +++ b/src/asp/CMakeLists.txt @@ -98,7 +98,6 @@ if (UNIX AND NOT APPLE) endif() endif() - # Find dependencies set(REQUIRED True ) @@ -350,8 +349,6 @@ add_subdirectory(Core) add_subdirectory(SpiceIO) if(ASP_HAVE_PKG_ISISIO) add_subdirectory(IsisIO) - # PCL is imported via ISIS as ISIS depends on it - add_subdirectory(PclIO) endif() add_subdirectory(Camera) @@ -365,3 +362,4 @@ add_subdirectory(Tools) add_subdirectory(WVCorrect) add_subdirectory(IceBridge) +add_subdirectory(PclIO) diff --git a/src/asp/PclIO/CMakeLists.txt b/src/asp/PclIO/CMakeLists.txt index 1164919c4..6f5646145 100644 --- a/src/asp/PclIO/CMakeLists.txt +++ b/src/asp/PclIO/CMakeLists.txt @@ -1,2 +1,3 @@ # Use wrapper function at this level to avoid code duplication -add_library_wrapper(AspPclIO "${ASP_PCLIO_SRC_FILES}" "${ASP_PCLIO_TEST_FILES}" "${ASP_PCLIO_LIB_DEPENDENCIES}") +add_library_wrapper(AspPclIO "${ASP_PCLIO_SRC_FILES}" "${ASP_PCLIO_TEST_FILES}" + "${ASP_PCLIO_LIB_DEPENDENCIES}")