diff --git a/CMakeLists.txt b/CMakeLists.txt index 6b7880e..5a55068 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -162,7 +162,19 @@ add_subdirectory(src/tag) #Tests if (BUILD_TESTING) + set(TMP_PROJECT_VERSION "${PROJECT_VERSION}") + set(TMP_PROJECT_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}") + set(TMP_PROJECT_VERSION_MINOR "${PROJECT_VERSION_MINOR}") + set(TMP_PROJECT_VERSION_PATCH "${PROJECT_VERSION_PATCH}") + unset(PROJECT_VERSION) + unset(PROJECT_VERSION_MAJOR) + unset(PROJECT_VERSION_MINOR) + unset(PROJECT_VERSION_PATCH) add_shared_git_project(test/gtest) + set(PROJECT_VERSION "${TMP_PROJECT_VERSION}") + set(PROJECT_VERSION_MAJOR "${TMP_PROJECT_VERSION_MAJOR}") + set(PROJECT_VERSION_MINOR "${TMP_PROJECT_VERSION_MINOR}") + set(PROJECT_VERSION_PATCH "${TMP_PROJECT_VERSION_PATCH}") add_subdirectory(test/unit) add_subdirectory(test/unit_cli) endif()