diff --git a/programs/keeper/CMakeLists.txt b/programs/keeper/CMakeLists.txt
index ac8f3b667f6..ce176ccade5 100644
--- a/programs/keeper/CMakeLists.txt
+++ b/programs/keeper/CMakeLists.txt
@@ -33,7 +33,7 @@ install(FILES keeper_config.xml DESTINATION "${CLICKHOUSE_ETC_DIR}/clickhouse-ke
add_dependencies(clickhouse-keeper-lib clickhouse_keeper_configs)
if (BUILD_STANDALONE_KEEPER)
- # Sraight list of all required sources
+ # Straight list of all required sources
set(CLICKHOUSE_KEEPER_STANDALONE_SOURCES
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Coordination/ACLMap.cpp
${CMAKE_CURRENT_SOURCE_DIR}/../../src/Coordination/Changelog.cpp
diff --git a/src/Daemon/CMakeLists.txt b/src/Daemon/CMakeLists.txt
index 7499d75d514..f02fd69aa79 100644
--- a/src/Daemon/CMakeLists.txt
+++ b/src/Daemon/CMakeLists.txt
@@ -1,11 +1,10 @@
-set (GENERATED_GIT_HASH_CPP "${CMAKE_CURRENT_BINARY_DIR}/GitHash.generated.cpp")
-configure_file(GitHash.generated.cpp.in ${GENERATED_GIT_HASH_CPP})
+configure_file(GitHash.cpp.in GitHash.generated.cpp)
add_library (daemon
BaseDaemon.cpp
GraphiteWriter.cpp
SentryWriter.cpp
- ${GENERATED_GIT_HASH_CPP}
+ GitHash.generated.cpp
)
if (OS_DARWIN AND NOT USE_STATIC_LIBRARIES)
diff --git a/src/Daemon/GitHash.cpp.in b/src/Daemon/GitHash.cpp.in
new file mode 100644
index 00000000000..4a2da793fc2
--- /dev/null
+++ b/src/Daemon/GitHash.cpp.in
@@ -0,0 +1,8 @@
+// File was generated by CMake
+
+#include
+
+String getGitHash()
+{
+ return "@GIT_HASH@";
+}
diff --git a/src/Daemon/GitHash.generated.cpp.in b/src/Daemon/GitHash.generated.cpp.in
deleted file mode 100644
index 833e9304b29..00000000000
--- a/src/Daemon/GitHash.generated.cpp.in
+++ /dev/null
@@ -1,10 +0,0 @@
-// .cpp autogenerated by cmake
-
-#include
-
-static const String GIT_HASH = "@GIT_HASH@";
-
-String getGitHash()
-{
- return GIT_HASH;
-}
diff --git a/src/Storages/System/CMakeLists.txt b/src/Storages/System/CMakeLists.txt
index d2f7a5426db..6bc080045f8 100644
--- a/src/Storages/System/CMakeLists.txt
+++ b/src/Storages/System/CMakeLists.txt
@@ -2,8 +2,6 @@
# You can also regenerate it manually this way:
# execute_process(COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/StorageSystemContributors.sh")
-set (CONFIG_BUILD "${CMAKE_CURRENT_BINARY_DIR}/StorageSystemBuildOptions.generated.cpp")
-
get_property (BUILD_COMPILE_DEFINITIONS DIRECTORY ${ClickHouse_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
get_property(TZDATA_VERSION GLOBAL PROPERTY TZDATA_VERSION_PROP)
@@ -11,14 +9,14 @@ function(generate_system_build_options)
include(${ClickHouse_SOURCE_DIR}/src/configure_config.cmake)
include(${ClickHouse_SOURCE_DIR}/src/Functions/configure_config.cmake)
include(${ClickHouse_SOURCE_DIR}/src/Formats/configure_config.cmake)
- configure_file(StorageSystemBuildOptions.generated.cpp.in ${CONFIG_BUILD})
+ configure_file(StorageSystemBuildOptions.cpp.in StorageSystemBuildOptions.generated.cpp)
endfunction()
generate_system_build_options()
include("${ClickHouse_SOURCE_DIR}/cmake/dbms_glob_sources.cmake")
add_headers_and_sources(storages_system .)
-list (APPEND storages_system_sources ${CONFIG_BUILD})
+list (APPEND storages_system_sources StorageSystemBuildOptions.generated.cpp)
add_custom_target(generate-contributors
./StorageSystemContributors.sh
diff --git a/src/Storages/System/StorageSystemBuildOptions.generated.cpp.in b/src/Storages/System/StorageSystemBuildOptions.cpp.in
similarity index 98%
rename from src/Storages/System/StorageSystemBuildOptions.generated.cpp.in
rename to src/Storages/System/StorageSystemBuildOptions.cpp.in
index dde90ce459a..117d97d2cfd 100644
--- a/src/Storages/System/StorageSystemBuildOptions.generated.cpp.in
+++ b/src/Storages/System/StorageSystemBuildOptions.cpp.in
@@ -1,4 +1,4 @@
-// .cpp autogenerated by cmake
+// File was generated by CMake
const char * auto_config_build[]
{