From e82d6e041bf3450e8804797213169c9d5a4b6607 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Tue, 23 Jun 2020 21:57:26 +0200 Subject: [PATCH] Rename generated Version.cpp to version.cpp The convention is to use capitalized filenames for source files that implement classes and namespaces and lowercase filenames for source files that do not. --- .gitignore | 5 +++-- cmake/GenerateVersionFile.cmake | 6 ++++-- cmake/{Version.cpp.in => version.cpp.in} | 0 src/CMakeLists.txt | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) rename cmake/{Version.cpp.in => version.cpp.in} (100%) diff --git a/.gitignore b/.gitignore index 9c760f94dc..2601d2dc85 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,9 @@ ccache-*.tar.* perfdir.* testdir.* -# Version is generated into src, because it should be included into src packages -/src/Version.cpp +# version.cpp is generated in src because it should be included into source +# packages +/src/version.cpp # Typical build directories /build* diff --git a/cmake/GenerateVersionFile.cmake b/cmake/GenerateVersionFile.cmake index 6348ab1fc6..83b9558e50 100644 --- a/cmake/GenerateVersionFile.cmake +++ b/cmake/GenerateVersionFile.cmake @@ -51,6 +51,8 @@ get_version_from_git() if(VERSION_ERROR) message(STATUS "Not within git repository") else() - configure_file(${CMAKE_SOURCE_DIR}/cmake/Version.cpp.in - ${CMAKE_SOURCE_DIR}/src/Version.cpp @ONLY) + configure_file( + ${CMAKE_SOURCE_DIR}/cmake/version.cpp.in + ${CMAKE_SOURCE_DIR}/src/version.cpp + @ONLY) endif() diff --git a/cmake/Version.cpp.in b/cmake/version.cpp.in similarity index 100% rename from cmake/Version.cpp.in rename to cmake/version.cpp.in diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 207513c1a5..5e1ece5089 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -36,7 +36,7 @@ set( manifest.cpp result.cpp stats.cpp - Version.cpp) + version.cpp) if(INODE_CACHE_SUPPORTED) list(APPEND source_files InodeCache.cpp)