Skip to content

Commit

Permalink
prints a message if versions differ
Browse files Browse the repository at this point in the history
  • Loading branch information
ypujante committed Jul 2, 2023
1 parent 42d4dba commit b2220b6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,7 @@ Release notes

- Handles RE SDK 4.4.0: on macOS/arm64 platform, generate an arm64 binary (with proper name)
- Fixed options (removed `FORCE` since the rack extension can define it first thus can override it!)
- Prints a message when re-cmake detects a mismatch in version

#### 1.6.1 - 2023/04/28

Expand Down
16 changes: 13 additions & 3 deletions cmake/RECMakeOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ elseif(WIN32)
endif()
endif()

#------------------------------------------------------------------------
# re_cmake_test_and_set_git_tag (issue warning if differs)
#------------------------------------------------------------------------
macro(re_cmake_test_and_set_git_tag name tag)
set("${name}_GIT_TAG" "${tag}" CACHE STRING "${name} git tag")
if(NOT "${${name}_GIT_TAG}" STREQUAL "${tag}")
message(STATUS "[INFO] This project uses a different (potentially older) version of ${name} (${tag} != ${${name}_GIT_TAG})")
endif()
endmacro()

#------------------------------------------------------------------------
# Option to enable/disable testing (includes GoogleTest)
# Simply set to OFF if you want to use your own testing methodology
Expand All @@ -84,7 +94,7 @@ set(googletest_GIT_REPO "https://github.com/google/googletest" CACHE STRING "goo
#------------------------------------------------------------------------
# The git tag for googletest
#------------------------------------------------------------------------
set(googletest_GIT_TAG "v1.13.0" CACHE STRING "googletest git tag")
re_cmake_test_and_set_git_tag(googletest "v1.13.0")

#------------------------------------------------------------------------
# The download URL for googletest
Expand All @@ -107,14 +117,14 @@ set(RE_CMAKE_RE_2D_RENDER_HI_RES_OPTION "hi-res-only" CACHE STRING "Option for i
# Git repo/tag for re-logging
#------------------------------------------------------------------------
set(re-logging_GIT_REPO "https://github.com/pongasoft/re-logging" CACHE STRING "re-logging git repository url")
set(re-logging_GIT_TAG "v1.0.1" CACHE STRING "re-logging git tag")
re_cmake_test_and_set_git_tag(re-logging "v1.0.1")
set(re-logging_DOWNLOAD_URL "${re-logging_GIT_REPO}/archive/refs/tags/${re-logging_GIT_TAG}.zip" CACHE STRING "re-logging download url")
set(re-logging_DOWNLOAD_URL_HASH "SHA256=e71898bfb4234505e5714a726139ad21ac0bd17d63f41af80d7cc9b5760dd57f" CACHE STRING "re-logging download url hash")

#------------------------------------------------------------------------
# Git repo/tag for re-mock
#------------------------------------------------------------------------
set(re-mock_GIT_REPO "https://github.com/pongasoft/re-mock" CACHE STRING "re-mock git repository url")
set(re-mock_GIT_TAG "v1.5.0" CACHE STRING "re-mock git tag")
re_cmake_test_and_set_git_tag(re-mock "v1.5.0")
set(re-mock_DOWNLOAD_URL "${re-mock_GIT_REPO}/archive/refs/tags/${re-mock_GIT_TAG}.zip" CACHE STRING "re-mock download url")
set(re-mock_DOWNLOAD_URL_HASH "SHA256=d0eab4271e148037fda68534a085c9ac453f30c7ceb97f7117a5b7501136bd40" CACHE STRING "re-mock download url hash")

0 comments on commit b2220b6

Please sign in to comment.