Commit c0183d1f authored by Christopher Bruns's avatar Christopher Bruns
Browse files

Yet another layer of cmake policy wrapping to avoid trouble with cmake 2.4.5 on Linux

parent 125e52ae
...@@ -17,16 +17,26 @@ ...@@ -17,16 +17,26 @@
# On Linux it appears that cmake 2.4 does not work with Cuda cmake rules # On Linux it appears that cmake 2.4 does not work with Cuda cmake rules
CMAKE_MINIMUM_REQUIRED(VERSION 2.6) CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# Does someone at Kitware actually believe that this policy crap
# might actually make cmake LESS brittle?
# (Probably the same genius who came up the endif(allthesamecrap) syntax)
# Older cmake versions do not have cmake_policy command
if(COMMAND cmake_policy) if(COMMAND cmake_policy)
if(POLICY CMP0003) # Cmake 2.4.5, the default cmake on red hat linux, has the
cmake_policy(SET CMP0003 NEW) # cmake_policy command, but it does not work
endif(POLICY CMP0003) if(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4})
if(POLICY CMP0005) # do nothing
cmake_policy(SET CMP0005 NEW) else(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4})
endif(POLICY CMP0005) if(POLICY CMP0003)
if(POLICY CMP0011) cmake_policy(SET CMP0003 NEW)
cmake_policy(SET CMP0011 NEW) endif(POLICY CMP0003)
endif(POLICY CMP0011) if(POLICY CMP0005)
cmake_policy(SET CMP0005 NEW)
endif(POLICY CMP0005)
if(POLICY CMP0011)
cmake_policy(SET CMP0011 NEW)
endif(POLICY CMP0011)
endif(${CMAKE_MAJOR_VERSION} EQUAL 2 AND ${CMAKE_MINOR_VERSION} EQUAL 4})
endif(COMMAND cmake_policy) endif(COMMAND cmake_policy)
# Don't create a new project name if this is part of a mega-build from the # Don't create a new project name if this is part of a mega-build from the
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment