Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tools
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-02-02 15:36:58 +0100
committerMartin Hořeňovský2022-02-18 11:15:08 +0100
commit33ffc3b6fc1cdb2815a87476b06ff9afb2f2a6bd (patch)
tree5fbc42361fbe0ea8b847dfdfd7eb954dbfdaf777 /tools
parentfc5552d27b57628f8faf6064ca6b305e2d3bf458 (diff)
downloadcatch3-33ffc3b6fc1cdb2815a87476b06ff9afb2f2a6bd.tar.gz
Allow passing compile-time configuration options through CMake
Diffstat (limited to 'tools')
-rwxr-xr-xtools/scripts/generateAmalgamatedFiles.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/scripts/generateAmalgamatedFiles.py b/tools/scripts/generateAmalgamatedFiles.py
index 9fc63a8f..812712a3 100755
--- a/tools/scripts/generateAmalgamatedFiles.py
+++ b/tools/scripts/generateAmalgamatedFiles.py
@@ -79,6 +79,15 @@ def concatenate_file(out, filename: str, expand_headers: bool) -> int:
# hundred thousands lines (~300k as of preview3 :-) )
if next_header in concatenated_headers:
continue
+
+ # Skip including the auto-generated user config file,
+ # because it has not been generated yet at this point.
+ # The code around it should be written so that just not including
+ # it is equivalent with all-default user configuration.
+ if next_header == 'catch2/catch_user_config.hpp':
+ concatenated_headers.add(next_header)
+ continue
+
concatenated_headers.add(next_header)
concatenated += concatenate_file(out, os.path.join(root_path, next_header), expand_headers)