diff --git a/.github/workflows/ci_cmake.yml b/.github/workflows/ci_cmake.yml index 937e8460..c11cfcb1 100644 --- a/.github/workflows/ci_cmake.yml +++ b/.github/workflows/ci_cmake.yml @@ -27,10 +27,15 @@ defaults: jobs: build: - name: "External project" + name: "External project ${{ contains(matrix.SHARG_NO_TDL, 'OFF') && 'with TDL' || 'without TDL' }}" runs-on: ubuntu-22.04 timeout-minutes: 120 if: github.repository_owner == 'seqan' || github.event_name == 'workflow_dispatch' || github.event.label.name == 'lint' + strategy: + fail-fast: false + matrix: + SHARG_NO_TDL: [ON, OFF] + steps: - name: Checkout uses: actions/checkout@v4 @@ -48,13 +53,16 @@ jobs: uses: seqan/actions/setup-toolchain@main with: compiler: gcc-13 - use_actions_cache: false + + - name: Install dependencies + if: matrix.SHARG_NO_TDL == 'OFF' + run: install libyaml-cpp-dev - name: Configure tests run: | mkdir sharg-build cd sharg-build - cmake ../sharg-parser/test/external_project -DCMAKE_BUILD_TYPE=Debug + cmake ../sharg-parser/test/external_project -DCMAKE_BUILD_TYPE=Debug -DSHARG_NO_TDL=${{ matrix.SHARG_NO_TDL }} make -j2 sharg_test_prerequisite - name: Build tests diff --git a/build_system/sharg-config.cmake b/build_system/sharg-config.cmake index 0bcaa3fc..2fb51073 100644 --- a/build_system/sharg-config.cmake +++ b/build_system/sharg-config.cmake @@ -206,7 +206,19 @@ endif () set (SHARG_USE_TDL FALSE) if (NOT SHARG_NO_TDL) - find_package (TDL QUIET HINTS ${SHARG_SUBMODULES_DIR}/submodules/tool_description_lib ${SHARG_HINT_TDL}) + find_package (TDL QUIET HINTS ${SHARG_HINT_TDL}) + + if (NOT TDL_FOUND) + if (EXISTS ${SHARG_SUBMODULES_DIR}/submodules/tool_description_lib) + include (FetchContent) + FetchContent_Declare (tdl SOURCE_DIR ${SHARG_SUBMODULES_DIR}/submodules/tool_description_lib) + set (SHARG_LOG_LEVEL ${CMAKE_MESSAGE_LOG_LEVEL}) + set (CMAKE_MESSAGE_LOG_LEVEL "ERROR") + FetchContent_MakeAvailable (tdl) + set (CMAKE_MESSAGE_LOG_LEVEL ${SHARG_LOG_LEVEL}) + set (TDL_FOUND TRUE) + endif () + endif () if (TDL_FOUND) sharg_config_print ("Optional dependency: TDL found.") diff --git a/submodules/tool_description_lib b/submodules/tool_description_lib index 7caf3c5b..77fc560c 160000 --- a/submodules/tool_description_lib +++ b/submodules/tool_description_lib @@ -1 +1 @@ -Subproject commit 7caf3c5bd117cbb3db07eddaa3a8bd43dcd2f3b3 +Subproject commit 77fc560cab0bfdd0cc66efbc3e3bc59702230a5c diff --git a/test/snippet/CMakeLists.txt b/test/snippet/CMakeLists.txt index fc0c7f78..af71509c 100644 --- a/test/snippet/CMakeLists.txt +++ b/test/snippet/CMakeLists.txt @@ -48,7 +48,6 @@ endmacro () macro (sharg_snippets test_name_prefix snippet_base_path_) get_filename_component (snippet_base_path "${snippet_base_path_}" ABSOLUTE BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../..") - message (STATUS "${snippet_base_path}") sharg_test_files (snippet_files "${snippet_base_path}" "*.cpp") foreach (snippet ${snippet_files}) sharg_snippet ("${test_name_prefix}" "${snippet}" "${snippet_base_path}")