Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move single header to a separate folder (#187)
* Move single header to a separate folder It is much better for tests and examples to directly depend on the original sources as errors and warnings are properly reported. Previously, errors are warnings were reported against the single include, but had to be fixed in doctest_fwd.h and doctest.cpp. * Fix cmake target "playground"
- Loading branch information
Showing
11 changed files
with
5,348 additions
and
5,346 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
set(doctest_include_folder "${CMAKE_CURRENT_LIST_DIR}/../../doctest/") | ||
set(doctest_src_folder "${CMAKE_CURRENT_LIST_DIR}/../../doctest") | ||
|
||
file(READ ${doctest_include_folder}/parts/doctest_fwd.h fwd) | ||
file(READ ${doctest_include_folder}/parts/doctest.cpp impl) | ||
file(READ ${doctest_src_folder}/parts/doctest_fwd.h fwd) | ||
file(READ ${doctest_src_folder}/parts/doctest.cpp impl) | ||
|
||
file(WRITE ${doctest_include_folder}/doctest.h "// ======================================================================\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "// ======================================================================\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "${fwd}\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "#ifndef DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "#define DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "#endif // DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_include_folder}/doctest.h "\n${impl}") | ||
set(doctest_out_folder "${CMAKE_CURRENT_LIST_DIR}/../../single_include/doctest") | ||
|
||
file(WRITE ${doctest_out_folder}/doctest.h "// ======================================================================\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "// ======================================================================\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "${fwd}\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "#ifndef DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "#define DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "#endif // DOCTEST_SINGLE_HEADER\n") | ||
file(APPEND ${doctest_out_folder}/doctest.h "\n${impl}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.