From a9505620711220dda21298d9de829b1318dcd6ef Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Mon, 6 Jan 2025 15:27:29 +0800 Subject: [PATCH] Enfore cmake configure file newline style (#11129) --- CMakeLists.txt | 3 ++- cmake/Version.cmake | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0abe69821d14..761aef49d4dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -497,7 +497,8 @@ if(GOOGLE_TEST) configure_file( ${xgboost_SOURCE_DIR}/tests/cli/machine.conf.in ${xgboost_BINARY_DIR}/tests/cli/machine.conf - @ONLY) + @ONLY + NEWLINE_STYLE UNIX) if(BUILD_DEPRECATED_CLI) add_test( NAME TestXGBoostCLI diff --git a/cmake/Version.cmake b/cmake/Version.cmake index 4af6b27d6720..1a7fae3d7645 100644 --- a/cmake/Version.cmake +++ b/cmake/Version.cmake @@ -2,5 +2,7 @@ function(write_version) message(STATUS "xgboost VERSION: ${xgboost_VERSION}") configure_file( ${xgboost_SOURCE_DIR}/cmake/version_config.h.in - ${xgboost_SOURCE_DIR}/include/xgboost/version_config.h @ONLY) + ${xgboost_SOURCE_DIR}/include/xgboost/version_config.h + @ONLY + NEWLINE_STYLE UNIX) endfunction()