Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cmake/CPM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#
# SPDX-FileCopyrightText: Copyright (c) 2019-2023 Lars Melchior and contributors

set (CPM_DOWNLOAD_VERSION 0.42.0)
set (CPM_HASH_SUM "2020b4fc42dba44817983e06342e682ecfc3d2f484a581f11cc5731fbe4dce8a")
set (CPM_DOWNLOAD_VERSION 0.42.1)
set (CPM_HASH_SUM "f3a6dcc6a04ce9e7f51a127307fa4f699fb2bade357a8eb4c5b45df76e1dc6a5")

if (CPM_SOURCE_CACHE)
set (CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake")
Expand Down
19 changes: 15 additions & 4 deletions cmake/package-lock.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,47 @@
# Ideally, both are the same, which might not always be possible: https://github.com/cpm-cmake/CPM.cmake/issues/603
# This is needed to support CPM_USE_LOCAL_PACKAGES

# Each package has a (project-prefixed) version variable, which allows changing the version of a package without
# changing the package lock file.
# This is useful for packaging, where there might only be an older version, e.g. of googletest, available.
# Note that the variable has to be a cache variable to work properly, but not a forced cache variable.
# A clean reconfigure, i.e. deleting CMakeCache.txt, is needed to update the default version in an existing
# build directory.

# cmake-format: off

# TDL
set (SHARG_TDL_VERSION 1.0.1)
set (SHARG_TDL_VERSION 1.1.0 CACHE STRING "")
CPMDeclarePackage (tdl
NAME tdl
VERSION ${SHARG_TDL_VERSION}
GITHUB_REPOSITORY deNBI-cibi/tool_description_lib
SYSTEM TRUE
OPTIONS "INSTALL_TDL OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING")
# googletest
set (SHARG_GOOGLETEST_VERSION 1.17.0)
set (SHARG_GOOGLETEST_VERSION 1.17.0 CACHE STRING "")
CPMDeclarePackage (googletest
NAME GTest
VERSION ${SHARG_GOOGLETEST_VERSION}
GITHUB_REPOSITORY google/googletest
SYSTEM TRUE
OPTIONS "BUILD_GMOCK OFF" "INSTALL_GTEST OFF" "CMAKE_MESSAGE_LOG_LEVEL WARNING")
# doxygen-awesome
set (SHARG_DOXYGEN_AWESOME_VERSION 2.4.1)
set (SHARG_DOXYGEN_AWESOME_VERSION 2.4.1 CACHE STRING "")
CPMDeclarePackage (doxygen_awesome
NAME doxygen_awesome
VERSION ${SHARG_DOXYGEN_AWESOME_VERSION}
GITHUB_REPOSITORY jothepro/doxygen-awesome-css
DOWNLOAD_ONLY TRUE
QUIET YES)
# use_ccache
set (SHARG_USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37)
set (SHARG_USE_CCACHE_VERSION d2a54ef555b6fc2d496a4c9506dbeb7cf899ce37 CACHE STRING "")
CPMDeclarePackage (use_ccache
NAME use_ccache
GIT_TAG ${SHARG_USE_CCACHE_VERSION} # main
GITHUB_REPOSITORY seqan/cmake-scripts
SOURCE_SUBDIR ccache
SYSTEM TRUE
EXCLUDE_FROM_ALL TRUE)

# cmake-format: on
1 change: 1 addition & 0 deletions test/api_stability/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ macro (sharg_api_stability_test test_suite git_apply)
-DCMAKE_CXX_FLAGS=${SHARG_API_STABILITY_CXX_FLAGS}
-DCMAKE_CXX_COMPILER_LAUNCHER=${CMAKE_CXX_COMPILER_LAUNCHER}
-DCMAKE_PREFIX_PATH=${CMAKE_CURRENT_LIST_DIR}/../../cmake # use current build system
-DSHARG_TEST_CPM_DIR=${CMAKE_CURRENT_LIST_DIR}/../../cmake
-DSHARG_VERBOSE_TESTS=OFF
PATCH_COMMAND ${CMAKE_COMMAND} -E echo "<SOURCE_DIR>"
COMMAND ${CMAKE_COMMAND} -E remove_directory "<SOURCE_DIR>/include"
Expand Down
69 changes: 38 additions & 31 deletions test/unit/detail/format_cwl_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ TEST_F(format_cwl_test, full_information)
" type: string[]?\n"
" int:\n"
" doc: \"this is a int option. Default: 5\"\n"
" default: 5\n"
" type: long?\n"
" inputBinding:\n"
" prefix: --int\n"
Expand All @@ -97,9 +98,11 @@ TEST_F(format_cwl_test, full_information)
" prefix: --jint\n"
" flag:\n"
" doc: this is a flag.\n"
" default: false\n"
" type: boolean?\n"
" kflag:\n"
" doc: this is a flag.\n"
" default: false\n"
" type: boolean?\n"
"outputs:\n"
" []\n"
Expand Down Expand Up @@ -209,6 +212,7 @@ TEST_F(format_cwl_test, subparser)
" type: string[]?\n"
" int:\n"
" doc: \"this is a int option. Default: 5\"\n"
" default: 5\n"
" type: long?\n"
" inputBinding:\n"
" prefix: --int\n"
Expand All @@ -224,6 +228,7 @@ TEST_F(format_cwl_test, subparser)
" prefix: --percent\n"
" string:\n"
" doc: \"this is a string option (advanced). Default: \\\"\\\"\"\n"
" default: \"\"\n"
" type: string?\n"
" inputBinding:\n"
" prefix: --string\n"
Expand Down Expand Up @@ -257,9 +262,11 @@ TEST_F(format_cwl_test, subparser)
" prefix: --path05\n"
" flag:\n"
" doc: this is a flag.\n"
" default: false\n"
" type: boolean?\n"
" kflag:\n"
" doc: this is a flag.\n"
" default: false\n"
" type: boolean?\n"
"outputs:\n"
" path04:\n"
Expand Down Expand Up @@ -314,37 +321,37 @@ TEST_F(format_cwl_test, subsubparser)
.description = "a output file.",
.validator = sharg::output_file_validator{}});

std::string expected_short =
"label: test_parser-index-show\n"
"doc: \"\"\n"
"inputs:\n"
" jint:\n"
" doc: this is a required int option.\n"
" type: long\n"
" inputBinding:\n"
" prefix: --jint\n"
" string:\n"
" doc: \"this is a string option (advanced). Default: \\\"\\\"\"\n"
" type: string?\n"
" inputBinding:\n"
" prefix: --string\n"
" path04:\n"
" doc: \"a output file. Default: \\\"\\\". The output file must not exist already and write permissions "
"must be granted.\"\n"
" type: string?\n"
" inputBinding:\n"
" prefix: --path04\n"
"outputs:\n"
" path04:\n"
" type: File?\n"
" outputBinding:\n"
" glob: $(inputs.path04)\n"
"cwlVersion: v1.2\n"
"class: CommandLineTool\n"
"baseCommand:\n"
" - test_parser\n"
" - index\n"
" - show\n";
std::string expected_short = "label: test_parser-index-show\n"
"doc: \"\"\n"
"inputs:\n"
" jint:\n"
" doc: this is a required int option.\n"
" type: long\n"
" inputBinding:\n"
" prefix: --jint\n"
" string:\n"
" doc: \"this is a string option (advanced). Default: \\\"\\\"\"\n"
" default: \"\"\n"
" type: string?\n"
" inputBinding:\n"
" prefix: --string\n"
" path04:\n"
" doc: \"a output file. Default: \\\"\\\". The output file must not exist already "
"and write permissions must be granted.\"\n"
" type: string?\n"
" inputBinding:\n"
" prefix: --path04\n"
"outputs:\n"
" path04:\n"
" type: File?\n"
" outputBinding:\n"
" glob: $(inputs.path04)\n"
"cwlVersion: v1.2\n"
"class: CommandLineTool\n"
"baseCommand:\n"
" - test_parser\n"
" - index\n"
" - show\n";
EXPECT_EQ(get_parse_cout_on_exit(sub_sub_parser), expected_short);
}
#endif