Skip to content

Commit 74a3c0d

Browse files
refactor: move input file for single include (#1036)
Followup to #1030 --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent bd6462f commit 74a3c0d

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

scripts/MakeSingleHeader.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def make_header(output, main_header, files, tag, namespace, macro=None, version=
137137
parser.add_argument("--output", default=None, help="Single header file output")
138138
parser.add_argument(
139139
"--main",
140-
default="CLI11.hpp.in",
140+
default="single-include/CLI11.hpp.in",
141141
help="The main include file that defines the other files",
142142
)
143143
parser.add_argument("files", nargs="+", help="The header files")
File renamed without changes.

single-include/CMakeLists.txt

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@ if(CLI11_SINGLE_FILE)
1717
OUTPUT "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp"
1818
COMMAND
1919
Python::Interpreter "${PROJECT_SOURCE_DIR}/scripts/MakeSingleHeader.py" ${CLI11_headers}
20-
${CLI11_impl_headers} --main "${PROJECT_SOURCE_DIR}/CLI11.hpp.in" --output
20+
${CLI11_impl_headers} --main "${CMAKE_CURRENT_SOURCE_DIR}/CLI11.hpp.in" --output
2121
"${PROJECT_BINARY_DIR}/single-include/CLI11.hpp" --version "${CLI11_VERSION}"
22-
DEPENDS "${PROJECT_SOURCE_DIR}/include/CLI/CLI.hpp" ${CLI11_headers} ${CLI11_impl_headers})
22+
DEPENDS "${PROJECT_SOURCE_DIR}/include/CLI/CLI.hpp" CLI11.hpp.in ${CLI11_headers}
23+
${CLI11_impl_headers})
2324
add_custom_target(CLI11-generate-single-file ALL
2425
DEPENDS "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp")
2526
set_property(TARGET CLI11-generate-single-file PROPERTY FOLDER "Scripts")

0 commit comments

Comments
 (0)