Skip to content

Commit

Permalink
refactor: move input file for single include (#1036)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
henryiii and pre-commit-ci[bot] authored May 1, 2024
1 parent bd6462f commit 74a3c0d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/MakeSingleHeader.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def make_header(output, main_header, files, tag, namespace, macro=None, version=
parser.add_argument("--output", default=None, help="Single header file output")
parser.add_argument(
"--main",
default="CLI11.hpp.in",
default="single-include/CLI11.hpp.in",
help="The main include file that defines the other files",
)
parser.add_argument("files", nargs="+", help="The header files")
Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions single-include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ if(CLI11_SINGLE_FILE)
OUTPUT "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp"
COMMAND
Python::Interpreter "${PROJECT_SOURCE_DIR}/scripts/MakeSingleHeader.py" ${CLI11_headers}
${CLI11_impl_headers} --main "${PROJECT_SOURCE_DIR}/CLI11.hpp.in" --output
${CLI11_impl_headers} --main "${CMAKE_CURRENT_SOURCE_DIR}/CLI11.hpp.in" --output
"${PROJECT_BINARY_DIR}/single-include/CLI11.hpp" --version "${CLI11_VERSION}"
DEPENDS "${PROJECT_SOURCE_DIR}/include/CLI/CLI.hpp" ${CLI11_headers} ${CLI11_impl_headers})
DEPENDS "${PROJECT_SOURCE_DIR}/include/CLI/CLI.hpp" CLI11.hpp.in ${CLI11_headers}
${CLI11_impl_headers})
add_custom_target(CLI11-generate-single-file ALL
DEPENDS "${PROJECT_BINARY_DIR}/single-include/CLI11.hpp")
set_property(TARGET CLI11-generate-single-file PROPERTY FOLDER "Scripts")
Expand Down

0 comments on commit 74a3c0d

Please sign in to comment.