Skip to content

Commit

Permalink
Fixed policy setting so it works on old cmakes
Browse files Browse the repository at this point in the history
  • Loading branch information
davisking committed Dec 20, 2014
1 parent 014f1d1 commit 09d154f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion dlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
# Suppress cmake warnings about changes in new versions.
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0054 NEW)
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()
endif()


Expand Down
4 changes: 3 additions & 1 deletion dlib/cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ cmake_minimum_required(VERSION 2.6.4)


set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required
cmake_policy(SET CMP0054 NEW)
if (POLICY CMP0054)
cmake_policy(SET CMP0054 NEW)
endif()

# Don't add dlib if it's already been added to the cmake project
if (NOT TARGET dlib)
Expand Down

0 comments on commit 09d154f

Please sign in to comment.