Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't expose header windows.h in catch_all.hpp #2526

Merged
merged 2 commits into from Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion src/catch2/catch_all.hpp
Expand Up @@ -114,7 +114,6 @@
#include <catch2/internal/catch_unique_ptr.hpp>
#include <catch2/internal/catch_void_type.hpp>
#include <catch2/internal/catch_wildcard_pattern.hpp>
#include <catch2/internal/catch_windows_h_proxy.hpp>
#include <catch2/internal/catch_xmlwriter.hpp>
#include <catch2/matchers/catch_matchers_all.hpp>
#include <catch2/reporters/catch_reporters_all.hpp>
Expand Down
4 changes: 0 additions & 4 deletions src/catch2/internal/catch_windows_h_proxy.hpp
Expand Up @@ -21,11 +21,7 @@
# define WIN32_LEAN_AND_MEAN
#endif

#ifdef __AFXDLL
#include <AfxWin.h>
#else
#include <windows.h>
#endif

#endif // defined(CATCH_PLATFORM_WINDOWS)

Expand Down
3 changes: 2 additions & 1 deletion tools/scripts/checkConvenienceHeaders.py
Expand Up @@ -120,7 +120,8 @@ def verify_convenience_header(folder):
# 4) Are all required headers present?
file_incs_set = set(file_incs)
for include in target_includes:
if include not in file_incs_set:
if (include not in file_incs_set and
include != 'catch2/internal/catch_windows_h_proxy.hpp'):
errors_found = True
print("'{}': missing include '{}'".format(header_name, include))

Expand Down
1 change: 1 addition & 0 deletions tools/scripts/generateAmalgamatedFiles.py
Expand Up @@ -108,6 +108,7 @@ def generate_cpp():
with open(output_cpp, mode='w', encoding='utf-8') as cpp:
cpp.write(formatted_file_header(Version()))
cpp.write('\n#include "catch_amalgamated.hpp"\n')
concatenate_file(cpp, os.path.join(root_path, 'catch2/internal/catch_windows_h_proxy.hpp'), False)
for file in cpp_files:
concatenate_file(cpp, file, False)
print('Concatenated {} cpp files'.format(len(cpp_files)))
Expand Down