Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable xxHash project error deprecated #216

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions projects/UnitTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ if(NOT TARGET simpleini)
endif()

if(NOT TARGET xxhash)
# Require to set CMAKE_ERROR_DEPRECATED as false for skip imported project using older minimal CMake version.
set(_CMAKE_ERROR_DEPRECATED ${CMAKE_ERROR_DEPRECATED})
set(CMAKE_ERROR_DEPRECATED FALSE CACHE BOOL "" FORCE)
FetchContent_Populate(
xxhash
GIT_REPOSITORY https://github.com/Cyan4973/xxhash.git
Expand All @@ -46,6 +49,9 @@ if(NOT TARGET xxhash)
set_target_properties(xxhash PROPERTIES
FOLDER util
)
# Then restore the previously set value for CMAKE_ERROR_DEPRECATED variable.
set(CMAKE_ERROR_DEPRECATED ${_CMAKE_ERROR_DEPRECATED} CACHE BOOL "" FORCE)
unset(_CMAKE_ERROR_DEPRECATED)
endif()

# Add source to this project's executable.
Expand Down