From e7356223bbc3aaba7e605252f1104fc41329ff65 Mon Sep 17 00:00:00 2001 From: Alessandro Menti Date: Wed, 3 Jan 2018 11:54:04 +0100 Subject: [PATCH] CMakeLists.txt: explicitly enable the CMP0067 (C/C++ standard flags) policy Explicitly enable the CMP0067 policy to have try_compile use the correct C/C++ standard flags; otherwise, CMake will default to not honoring those, causing the C/C++ checks to be compiled with no standard flags and SimGear to be compiled with them. This causes errors if we try to detect a new prototype which is only present in C++14 and above). --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index da7fb268..8d2e049b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,6 +7,9 @@ if(COMMAND cmake_policy) if(POLICY CMP0042) cmake_policy(SET CMP0042 NEW) endif() + if(POLICY CMP0067) + cmake_policy(SET CMP0067 NEW) + endif() endif()