set cmake policy 2.6 if supported

This commit is contained in:
Félix C. Morency 2008-06-24 16:45:41 -07:00 committed by Michael Gehring
parent 9b462ae4f0
commit 0c82372362
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,10 @@
cmake_minimum_required(VERSION 2.4.7)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
if(COMMAND cmake_policy)
cmake_policy(VERSION 2.6)
endif()
set(SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})