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).
This commit is contained in:
Alessandro Menti 2018-01-03 11:54:04 +01:00
parent 7547ad0391
commit e7356223bb
No known key found for this signature in database
GPG Key ID: 467AC0B4D6A6F336

View File

@ -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()