Skip to content

Commit 7687b09

Browse files
Apply suggestions from code review.
Co-authored-by: kirkrodrigues <[email protected]>
1 parent 64f3929 commit 7687b09

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.23)
22

3-
project(ystdlib VERSION "0.0.1" LANGUAGES CXX)
3+
project(ystdlib VERSION "0.1.0" LANGUAGES CXX)
44

55
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")
66
include(ystdlib-helpers)

cmake/ystdlib-config.cmake.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# gersemi: off
2-
# this file is preprocessed and should not be linted like a CMake file
2+
# This is a template file and shouldn't be linted like a CMake file
33
include(CMakeFindDependencyMacro)
44

55
@PACKAGE_INIT@
66

7-
# If no component is specified we require all libraries.
7+
# If no component is specified, we require all libraries.
88
# We guard against repeatedly including targets to support multiple find_package calls.
99
if(NOT ystdlib_FIND_COMPONENTS)
1010
set(ystdlib_LIBRARIES_LIST "@ystdlib_LIBRARIES@")

cmake/ystdlib-helpers.cmake

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function(check_if_header_only SOURCE_LIST IS_HEADER_ONLY NON_HEADER_FILE)
2626
set(${NON_HEADER_FILE} "" PARENT_SCOPE)
2727
endfunction()
2828

29-
# Adds a c++20 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
29+
# Adds a C++20 library in the subdirectory NAME with the target NAME and alias NAMESPACE::NAME.
3030
# Libraries with multiple levels of namespace nesting are currently not supported.
3131
#
3232
# @param {string} NAME
@@ -36,8 +36,7 @@ endfunction()
3636
# @param {string[]} [PUBLIC_LINK_LIBRARIES]
3737
# @param {string[]} [PRIVATE_LINK_LIBRARIES]
3838
# @param {string[]} [BUILD_INCLUDE_DIRS="${PROJECT_SOURCE_DIR}/src"] The list of include paths for
39-
# building the library and for external projects that builds `ystdlib` as a CMAKE subproject via the
40-
# add_subdirectory() function.
39+
# building the library and for external projects that use ystdlib via add_subdirectory().
4140
function(cpp_library)
4241
set(SINGLE_VALUE_ARGS
4342
NAME
@@ -56,7 +55,7 @@ function(cpp_library)
5655
PUBLIC_HEADERS
5756
)
5857
cmake_parse_arguments(arg "" "${SINGLE_VALUE_ARGS}" "${MULTI_VALUE_ARGS}" ${ARGN})
59-
require_argument_values(REQUIRED_ARGS arg_KEYWORDS_MISSING_VALUES)
58+
require_argument_values("${REQUIRED_ARGS}" "${arg_KEYWORDS_MISSING_VALUES}")
6059

6160
if(NOT DEFINED arg_BUILD_INCLUDE_DIRS)
6261
set(arg_BUILD_INCLUDE_DIRS "${PROJECT_SOURCE_DIR}/src")
@@ -115,14 +114,15 @@ function(cpp_library)
115114
)
116115
endfunction()
117116

118-
# Builds a C++ 20 test executable named unit-test-NAME linking it with Catch2.
119-
# The test SOURCES and any LINK_LIBRARIES are also added to the UNIFIED_TEST_TARGET if it is set.
117+
# Adds a C++ 20 test executable named unit-test-NAME that will be built with SOURCES and linked with
118+
# LINK_LIBRARIES, in addition to Catch2.
120119
#
121120
# @param {string} NAME
122121
# @param {string} NAMESPACE
123122
# @param {string[]} SOURCES
124123
# @param {string[]} [LINK_LIBRARIES]
125-
# @param {string} [UNIFIED_TEST_TARGET] If set the tests are also added to this unified target.
124+
# @param {string} [UNIFIED_TEST_TARGET] If set, SOURCES and LINK_LIBRARIES are also added to
125+
# UNIFIED_TEST_TARGET.
126126
function(catch2_tests)
127127
set(SINGLE_VALUE_ARGS
128128
NAME
@@ -173,17 +173,16 @@ function(catch2_tests)
173173
endif()
174174
endfunction()
175175

176-
# Installs library targets and generated configuration files.
177-
# Target, input config, and output config files are named NAME-target.cmake, NAME-config.cmake.in,
178-
# and NAME-config.cmake respectively.
176+
# Creates installation rules for library targets and generated configuration files.
179177
#
180178
# @param {string} NAME
181179
# @param {string} NAMESPACE
182-
# @param {string} [CONFIG_DEST_PATH] Destination to install generated config file
180+
# Seems like the bottom 3 are dirs? Can we name them with a _DIR suffix?
181+
# @param {string} [CONFIG_DEST_PATH] Destination to install the generated config file
183182
# (NAME-config.cmake).
184-
# @param {string} [CONFIG_INPUT_PATH] Path to read configure_package_config_file input file
183+
# @param {string} [CONFIG_INPUT_PATH] configure_package_config_file input file
185184
# (NAME-config.cmake.in).
186-
# @param {string} [CONFIG_OUTPUT_PATH] Path to write configure_package_config_file output file
185+
# @param {string} [CONFIG_OUTPUT_PATH] configure_package_config_file output file
187186
# (NAME-config.cmake).
188187
function(install_library)
189188
set(SINGLE_VALUE_ARGS

0 commit comments

Comments
 (0)