Skip to content

Commit

Permalink
CMake: No Deprecation Warnings
Browse files Browse the repository at this point in the history
Setting a `cmake_policy` to `OLD` is deprecated by definition and
will raise a verbose warning.
  • Loading branch information
ax3l committed May 20, 2024
1 parent 1b795c2 commit 0beef85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ endif()

# CMake policies ##############################################################
#
# Setting a cmake_policy to OLD is deprecated by definition and will raise a
# verbose warning
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE)
endif()

# CMake 3.18+: CMAKE_CUDA_ARCHITECTURES
# https://cmake.org/cmake/help/latest/policy/CMP0104.html
if(POLICY CMP0104)
Expand Down

0 comments on commit 0beef85

Please sign in to comment.