Skip to content

Commit

Permalink
- Apparently cmake_policy doesn't ignore unknown policies (which seem…
Browse files Browse the repository at this point in the history
…s to defeat the purpose to me) so we must wrap them in code to detect if the policy is known.
  • Loading branch information
Blzut3 committed Mar 24, 2015
1 parent 7b6d245 commit 890fb39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Expand Up @@ -2,8 +2,12 @@ cmake_minimum_required( VERSION 2.4 )
project(ZDoom)

if( COMMAND cmake_policy )
cmake_policy( SET CMP0011 NEW )
cmake_policy( SET CMP0054 NEW )
if( POLICY CMP0011 )
cmake_policy( SET CMP0011 NEW )
endif( POLICY CMP0011 )
if( POLICY CMP0054 )
cmake_policy( SET CMP0054 NEW )
endif( POLICY CMP0054 )
endif( COMMAND cmake_policy )

list( APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} )
Expand Down
4 changes: 3 additions & 1 deletion CreateLaunchers.cmake
Expand Up @@ -44,7 +44,9 @@ if(__create_launchers)
endif()
set(__create_launchers YES)

cmake_policy( SET CMP0026 OLD )
if( POLICY CMP0026 )
cmake_policy( SET CMP0026 OLD )
endif( POLICY CMP0026 )

include(CleanDirectoryList)

Expand Down

0 comments on commit 890fb39

Please sign in to comment.