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()