Skip to content

Commit

Permalink
Hack to avoid setting CMake policy CMP0054 on CMakes older than 3.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
juj committed Sep 8, 2015
1 parent cca3fd0 commit 240fdc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
@@ -1,5 +1,8 @@
cmake_minimum_required(VERSION 2.8)
cmake_policy(SET CMP0054 NEW) # Don't expand vars inside quotes, i.e. don't expand a line of form: ''if ("MSVC")'', but require ''if ("${MSVC}")''

if (CMAKE_VERSION VERSION_GREATER 3.0.99999) # Want to say "version >= 3.1", but no idea how to achieve that otherwise.
cmake_policy(SET CMP0054 NEW) # Don't expand vars inside quotes, i.e. don't expand a line of form: ''if ("MSVC")'', but require ''if ("${MSVC}")''
endif()

project(MathGeoLib)

Expand Down

0 comments on commit 240fdc4

Please sign in to comment.