blob: 3cf716c451a033c7b60cc4a92879c6dd58fbd334 [file] [log] [blame]
Dimitrij Mijoski0dbbd4f2019-03-02 17:37:34 +01001set(doctest_src_folder "${CMAKE_CURRENT_LIST_DIR}/../../doctest")
onqtamf720d432016-05-31 17:51:10 +03002
Dimitrij Mijoski0dbbd4f2019-03-02 17:37:34 +01003file(READ ${doctest_src_folder}/parts/doctest_fwd.h fwd)
4file(READ ${doctest_src_folder}/parts/doctest.cpp impl)
onqtamf720d432016-05-31 17:51:10 +03005
Dimitrij Mijoski0dbbd4f2019-03-02 17:37:34 +01006set(doctest_out_folder "${CMAKE_CURRENT_LIST_DIR}/../../single_include/doctest")
7
onqtamdf8b6d42019-03-02 17:40:39 +02008file(WRITE ${doctest_out_folder}/doctest.h "// ====================================================================== lgtm [cpp/missing-header-guard]\n")
Dimitrij Mijoski0dbbd4f2019-03-02 17:37:34 +01009file(APPEND ${doctest_out_folder}/doctest.h "// == DO NOT MODIFY THIS FILE BY HAND - IT IS AUTO GENERATED BY CMAKE! ==\n")
10file(APPEND ${doctest_out_folder}/doctest.h "// ======================================================================\n")
11file(APPEND ${doctest_out_folder}/doctest.h "${fwd}\n")
12file(APPEND ${doctest_out_folder}/doctest.h "#ifndef DOCTEST_SINGLE_HEADER\n")
13file(APPEND ${doctest_out_folder}/doctest.h "#define DOCTEST_SINGLE_HEADER\n")
14file(APPEND ${doctest_out_folder}/doctest.h "#endif // DOCTEST_SINGLE_HEADER\n")
15file(APPEND ${doctest_out_folder}/doctest.h "\n${impl}")