From a0a6e9e57ad71dd982db6bdddc37ad28bbd1f2f3 Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Tue, 7 Oct 2014 23:00:27 +0900 Subject: [PATCH 1/2] Add CMake Policy settings. I set version 2.6 as the baseline since cmake_minimum_required does so. CMP0037 denies target names reserved by generators, e.g. test. Signed-off-by: OGINO Masanori --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a46c0557..b0ad2da0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 2.6) +cmake_policy(VERSION 2.6) +cmake_policy(SET CMP0037 OLD) PROJECT(picrin) From dda6200877ff3a2d8387a564f1d0f782d55cca96 Mon Sep 17 00:00:00 2001 From: OGINO Masanori Date: Wed, 8 Oct 2014 09:50:59 +0900 Subject: [PATCH 2/2] Check whether CMP0037 is available or not. Signed-off-by: OGINO Masanori --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b0ad2da0..a3dfda58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ cmake_minimum_required(VERSION 2.6) cmake_policy(VERSION 2.6) -cmake_policy(SET CMP0037 OLD) +if(POLICY CMP0037) + cmake_policy(SET CMP0037 OLD) +endif() PROJECT(picrin)