From c4262bc600dc01d3ddbacc7811132b29ea46ad3b Mon Sep 17 00:00:00 2001 From: Daniel Scharrer Date: Thu, 24 Mar 2016 22:47:44 +0100 Subject: [PATCH] CMake: Disable variable expansion for quoted strings in if() This makes the build system more robust against stray variables coming from included CMake scripts provided by the system. Fixes build with CMake 3.5. This has been fixed in master with commit 60e43c. --- CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93f1ee3..8347544 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,11 @@ else() cmake_minimum_required(VERSION 2.8) endif() +if(POLICY CMP0054) + # CMake 3.1+: Only interpret if() arguments as variables or keywords when unquoted. + cmake_policy(SET CMP0054 NEW) +endif() + # Define configuration options -- 2.7.4