CMake/Tests/RunCMake/CompileFeatures/RequireCXX98Ext.cmake
Stephen Kelly 60a981ea8e Features: Enable compiler extensions by default.
Compilers enable their extensions by default, and disabling them
implicitly can lead to results which are surprising or non-obvious
to debug.

 http://public.kitware.com/pipermail/cmake-developers/2014-May/010575.html
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/10214
 https://www.mail-archive.com/cmake-developers@cmake.org/msg10116.html
 (Compiler feature extensions by default, 29 May 2014)
2014-05-31 12:16:12 +02:00

5 lines
139 B
CMake

add_library(foo empty.cpp)
set_property(TARGET foo PROPERTY CXX_STANDARD 98)
set_property(TARGET foo PROPERTY CXX_STANDARD_REQUIRED TRUE)