From 79620980ea3880f6512a35b9d688a60a02ff8b98 Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Sat, 5 Oct 2024 08:33:39 -0500 Subject: Formatting changes. Refactoring out detail::CopyMove from Result. --- cmake/CheckGit.cmake | 14 +++++++------- cmake/fud_version.hpp.in | 15 +++++++++++++++ cmake/git_version.hpp.in | 15 --------------- 3 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 cmake/fud_version.hpp.in delete mode 100644 cmake/git_version.hpp.in (limited to 'cmake') diff --git a/cmake/CheckGit.cmake b/cmake/CheckGit.cmake index bd17447..f7d8bce 100644 --- a/cmake/CheckGit.cmake +++ b/cmake/CheckGit.cmake @@ -7,8 +7,8 @@ if (NOT DEFINED post_configure_dir) set(post_configure_dir ${CMAKE_BINARY_DIR}/include) endif () -set(pre_configure_file ${pre_configure_dir}/git_version.hpp.in) -set(post_configure_file ${post_configure_dir}/git_version.hpp) +set(pre_configure_file ${pre_configure_dir}/fud_version.hpp.in) +set(post_configure_file ${post_configure_dir}/fud_version.hpp) function(CheckGitWrite git_hash) file(WRITE ${CMAKE_BINARY_DIR}/git-state.txt ${git_hash}) @@ -37,15 +37,15 @@ function(CheckGitVersion git_hash) file(MAKE_DIRECTORY ${post_configure_dir}) endif () - # if (NOT EXISTS ${post_configure_dir}/git_version.h) - # file(COPY ${pre_configure_dir}/git_version.h DESTINATION ${post_configure_dir}) + # if (NOT EXISTS ${post_configure_dir}/fud_version.h) + # file(COPY ${pre_configure_dir}/fud_version.h DESTINATION ${post_configure_dir}) # endif() if (NOT DEFINED GIT_HASH_CACHE) set(GIT_HASH_CACHE "INVALID") endif () - # Only update the git_version.cpp if the hash has changed. This will + # Only update the fud_version.cpp if the hash has changed. This will # prevent us from rebuilding the project more than we need to. if (NOT ${GIT_HASH} STREQUAL ${GIT_HASH_CACHE} OR NOT EXISTS ${post_configure_file}) # Set che GIT_HASH_CACHE variable the next build won't have @@ -70,8 +70,8 @@ function(CheckGitSetup top_git_hash) BYPRODUCTS ${post_configure_file} ) - add_library(git_version INTERFACE ${CMAKE_BINARY_DIR}/include/git_version.hpp) - add_dependencies(git_version AlwaysCheckGit) + add_library(fud_version INTERFACE ${CMAKE_BINARY_DIR}/include/fud_version.hpp) + add_dependencies(fud_version AlwaysCheckGit) CheckGitVersion(git_hash) set(${top_git_hash} ${git_hash} PARENT_SCOPE) diff --git a/cmake/fud_version.hpp.in b/cmake/fud_version.hpp.in new file mode 100644 index 0000000..5cce0e4 --- /dev/null +++ b/cmake/fud_version.hpp.in @@ -0,0 +1,15 @@ +#ifndef FUD_VERSION_HPP +#define FUD_VERSION_HPP + +#include + +namespace fud { + +constexpr uint8_t FudVersionMajor = @PROJECT_VERSION_MAJOR@; +constexpr uint8_t FudVersionMinor = @PROJECT_VERSION_MINOR@; +constexpr uint8_t FudVersionPatch = @PROJECT_VERSION_PATCH@; +constexpr const char GitHash[] = "@GIT_HASH@"; + +} // namespace fud + +#endif diff --git a/cmake/git_version.hpp.in b/cmake/git_version.hpp.in deleted file mode 100644 index ede9623..0000000 --- a/cmake/git_version.hpp.in +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef GIT_VERSION_HPP -#define GIT_VERSION_HPP - -#include - -namespace fud { - -constexpr uint8_t FudVersionMajor = @PROJECT_VERSION_MAJOR@; -constexpr uint8_t FudVersionMinor = @PROJECT_VERSION_MINOR@; -constexpr uint8_t FudVersionPatch = @PROJECT_VERSION_PATCH@; -constexpr const char GitHash[] = "@GIT_HASH@"; - -} // namespace fud - -#endif -- cgit v1.2.3