mirror of
https://github.com/CLIUtils/CLI11.git
synced 2025-05-02 05:33:53 +00:00
Fix internal header include paths. (#475)
* Fix internal header include paths. The extra leading "CLI/" part of include directives prevents the inclusion of CLI.hpp from a relative directory without an extra -I or /I compiler directive. * Fix single header generation script. Files included with "" should be relative to the header file location first.
This commit is contained in:
parent
dccfb06d65
commit
2337bbf35d
@ -20,14 +20,14 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// CLI Library includes
|
// CLI Library includes
|
||||||
#include "CLI/ConfigFwd.hpp"
|
#include "ConfigFwd.hpp"
|
||||||
#include "CLI/Error.hpp"
|
#include "Error.hpp"
|
||||||
#include "CLI/FormatterFwd.hpp"
|
#include "FormatterFwd.hpp"
|
||||||
#include "CLI/Macros.hpp"
|
#include "Macros.hpp"
|
||||||
#include "CLI/Option.hpp"
|
#include "Option.hpp"
|
||||||
#include "CLI/Split.hpp"
|
#include "Split.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
#include "CLI/TypeTools.hpp"
|
#include "TypeTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -9,28 +9,28 @@
|
|||||||
// CLI Library includes
|
// CLI Library includes
|
||||||
// Order is important for combiner script
|
// Order is important for combiner script
|
||||||
|
|
||||||
#include "CLI/Version.hpp"
|
#include "Version.hpp"
|
||||||
|
|
||||||
#include "CLI/Macros.hpp"
|
#include "Macros.hpp"
|
||||||
|
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
#include "CLI/Error.hpp"
|
#include "Error.hpp"
|
||||||
|
|
||||||
#include "CLI/TypeTools.hpp"
|
#include "TypeTools.hpp"
|
||||||
|
|
||||||
#include "CLI/Split.hpp"
|
#include "Split.hpp"
|
||||||
|
|
||||||
#include "CLI/ConfigFwd.hpp"
|
#include "ConfigFwd.hpp"
|
||||||
|
|
||||||
#include "CLI/Validators.hpp"
|
#include "Validators.hpp"
|
||||||
|
|
||||||
#include "CLI/FormatterFwd.hpp"
|
#include "FormatterFwd.hpp"
|
||||||
|
|
||||||
#include "CLI/Option.hpp"
|
#include "Option.hpp"
|
||||||
|
|
||||||
#include "CLI/App.hpp"
|
#include "App.hpp"
|
||||||
|
|
||||||
#include "CLI/Config.hpp"
|
#include "Config.hpp"
|
||||||
|
|
||||||
#include "CLI/Formatter.hpp"
|
#include "Formatter.hpp"
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/App.hpp"
|
#include "App.hpp"
|
||||||
#include "CLI/ConfigFwd.hpp"
|
#include "ConfigFwd.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/Error.hpp"
|
#include "Error.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
// CLI library includes
|
// CLI library includes
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/App.hpp"
|
#include "App.hpp"
|
||||||
#include "CLI/FormatterFwd.hpp"
|
#include "FormatterFwd.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/Error.hpp"
|
#include "Error.hpp"
|
||||||
#include "CLI/Macros.hpp"
|
#include "Macros.hpp"
|
||||||
#include "CLI/Split.hpp"
|
#include "Split.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
#include "CLI/Validators.hpp"
|
#include "Validators.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "CLI/Error.hpp"
|
#include "Error.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
|
|
||||||
namespace CLI {
|
namespace CLI {
|
||||||
namespace detail {
|
namespace detail {
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CLI/Macros.hpp"
|
#include "Macros.hpp"
|
||||||
#include "CLI/StringTools.hpp"
|
#include "StringTools.hpp"
|
||||||
#include "CLI/TypeTools.hpp"
|
#include "TypeTools.hpp"
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
@ -128,6 +128,7 @@ def MakeHeader(
|
|||||||
|
|
||||||
base_dir = os.path.abspath(os.path.join(DIR, include_dir))
|
base_dir = os.path.abspath(os.path.join(DIR, include_dir))
|
||||||
main_header = os.path.join(base_dir, main_header)
|
main_header = os.path.join(base_dir, main_header)
|
||||||
|
header_dir = os.path.dirname(main_header)
|
||||||
licence_file = os.path.abspath(os.path.join(DIR, "../LICENSE"))
|
licence_file = os.path.abspath(os.path.join(DIR, "../LICENSE"))
|
||||||
|
|
||||||
with open(licence_file) as f:
|
with open(licence_file) as f:
|
||||||
@ -138,7 +139,7 @@ def MakeHeader(
|
|||||||
|
|
||||||
include_files = includes_local.findall(header)
|
include_files = includes_local.findall(header)
|
||||||
|
|
||||||
headers = [HeaderFile(base_dir, inc) for inc in include_files]
|
headers = [HeaderFile(header_dir, inc) for inc in include_files]
|
||||||
single_header = reduce(add, headers)
|
single_header = reduce(add, headers)
|
||||||
|
|
||||||
if macro is not None:
|
if macro is not None:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user