Tests: Add trailing newlines to generated sources in RunCMake.CPack_* tests

This avoids compiler warnings on stderr while building them.
This commit is contained in:
Brad King 2015-10-01 09:27:02 -04:00
parent 5c50b39686
commit e8954d0b3b
1 changed files with 3 additions and 3 deletions

View File

@ -1,11 +1,11 @@
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.hpp"
"int test_lib();")
"int test_lib();\n")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp"
"#include \"test_lib.hpp\"\nint test_lib() {return 0;}")
"#include \"test_lib.hpp\"\nint test_lib() {return 0;}\n")
add_library(test_lib SHARED "${CMAKE_CURRENT_BINARY_DIR}/test_lib.cpp")
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/main.cpp"
"#include \"test_lib.hpp\"\nint main() {return test_lib();}")
"#include \"test_lib.hpp\"\nint main() {return test_lib();}\n")
add_executable(test_prog "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
target_link_libraries(test_prog test_lib)