Use C++11 for tests during CMake configuration if necessary

Enable CMake policy CMP0067 to ensure that the tests are done using the
same C++ dialect that is actually used for compiling the library.
This commit is contained in:
Vadim Zeitlin 2018-01-24 16:25:28 +01:00
parent 9567adb8cc
commit 746bbd08cc

View File

@ -48,3 +48,8 @@ if(POLICY CMP0054)
# only interpret if() arguments as variables or keywords when unquoted # only interpret if() arguments as variables or keywords when unquoted
cmake_policy(SET CMP0054 NEW) cmake_policy(SET CMP0054 NEW)
endif() endif()
if(POLICY CMP0067)
# Honor language standard in try_compile() source-file signature.
cmake_policy(SET CMP0067 NEW)
endif()