Skip to content

Commit

Permalink
Actually, this is better, especially since we will want 0 extra steps…
Browse files Browse the repository at this point in the history
… to get test_bmi_cpp for example realization config purposes.
  • Loading branch information
mattw-nws committed Aug 1, 2023
1 parent cda4b42 commit 2e3eb35
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/test_and_validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,6 @@ jobs:
- name: Checkout the commit
uses: actions/checkout@v2

- uses: ./.github/actions/ngen-submod-build
with:
mod-dir: "extern/bmi-cxx/"

- name: Build test_bmi_cpp
id: submod_build_test_bmi_cpp
uses: ./.github/actions/ngen-submod-build
with:
mod-dir: "extern/test_bmi_cpp/"
targets: "testbmicppmodel"

- name: Build Unit Tests
uses: ./.github/actions/ngen-build
with:
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@ add_executable(ngen
src/NGen.cpp
)

# Natively support BMI C++ modules and pre-compile in the test_bmi_cpp mock/example.
set(TEST_BMI_CPP_DIR ${PROJECT_SOURCE_DIR}/extern/test_bmi_cpp)
git_update_submodule(${PROJECT_SOURCE_DIR}/extern/bmi-cxx)
add_subdirectory(${TEST_BMI_CPP_DIR} ${TEST_BMI_CPP_DIR}/cmake_build)
add_dependencies(ngen testbmicppmodel) # because our demo realizations will use it

# Handle several steps for BMI C library logic and dependencies, at top level, if functionality is turned on
if(BMI_C_LIB_ACTIVE)
# Define associated preprocessor directive
Expand Down
3 changes: 3 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ add_test(test_realization_config
NGen::core_mediator
NGen::forcing
libudunits2
testbmicppmodel
${NETCDF_LIBRARIES}
)

Expand Down Expand Up @@ -301,6 +302,7 @@ add_test(
NGen::geojson
NGen::realizations_catchment
libudunits2
testbmicppmodel
${NETCDF_LIBRARIES}
)

Expand Down Expand Up @@ -328,5 +330,6 @@ add_test(
NGen::geojson
NGen::realizations_catchment
libudunits2
testbmicppmodel
${NETCDF_LIBRARIES}
)

0 comments on commit 2e3eb35

Please sign in to comment.