Skip to content

Commit

Permalink
Merge pull request #216 from RadWolfie/disable-xxhash-warn
Browse files Browse the repository at this point in the history
Disable xxHash project error deprecated
  • Loading branch information
RadWolfie authored Dec 1, 2024
2 parents e933f5b + d0a48a0 commit 3086717
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 3086717

Please sign in to comment.