Skip to content

Commit

Permalink
CMake: No Deprecation Warnings (#321)
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 authored May 29, 2024
1 parent b3cf010 commit c4d5dfd
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 c4d5dfd

Please sign in to comment.