mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-08 07:10:12 -05:00
b696f78073
Since one depender has multiple dependees, depend makefile generated same depender line by line, to reduce file size and refine make file parse speed, merge same dependers to one. And add a testcase for large depend.make which generated source file includes 20000 header files and run build and incremental build Signed-off-by: Wangkai <wangkai86@huawei.com> Signed-off-by: Zhaoyingdong <zhaoyingdong@huawei.com>
19 lines
540 B
CMake
19 lines
540 B
CMake
file(TOUCH "${RunCMake_TEST_BINARY_DIR}/main.c")
|
|
foreach(i RANGE 1 20000)
|
|
file(WRITE "${RunCMake_TEST_BINARY_DIR}/temp_header_file_${i}.h"
|
|
"#define HEADER_${i} ${i}\n"
|
|
)
|
|
file(APPEND "${RunCMake_TEST_BINARY_DIR}/main.c"
|
|
"#include \"temp_header_file_${i}.h\"\n"
|
|
)
|
|
endforeach()
|
|
file(APPEND "${RunCMake_TEST_BINARY_DIR}/main.c"
|
|
"#include \"main.h\"\n"
|
|
)
|
|
file(APPEND "${RunCMake_TEST_BINARY_DIR}/main.c"
|
|
"int main(void) { return COUNT; }\n"
|
|
)
|
|
file(WRITE "${RunCMake_TEST_BINARY_DIR}/main.h"
|
|
"#define COUNT 1\n"
|
|
)
|