Skip to content

Commit

Permalink
Fall back to c++14, adjust the workflow scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-alexandrov committed Dec 9, 2023
1 parent 95fb4d0 commit 119c8e0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/build_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ on:

jobs:
build:

runs-on: macos-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -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') }}
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down
4 changes: 1 addition & 3 deletions src/asp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ if (UNIX AND NOT APPLE)
endif()
endif()


# Find dependencies

set(REQUIRED True )
Expand Down Expand Up @@ -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)

Expand All @@ -365,3 +362,4 @@ add_subdirectory(Tools)
add_subdirectory(WVCorrect)
add_subdirectory(IceBridge)

add_subdirectory(PclIO)
3 changes: 2 additions & 1 deletion src/asp/PclIO/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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}")

0 comments on commit 119c8e0

Please sign in to comment.