Skip to content

Commit bf25dde

Browse files
committed
[CMake] Enable -Wdocumentation for the CMake build.
Swift SVN r7406
1 parent 323b9d9 commit bf25dde

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,14 @@ else ()
169169
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -stdlib=libc++")
170170
endif ()
171171

172+
# Compile with -Wdocumentation.
173+
check_cxx_compiler_flag("-Werror -Wdocumentation" CXX_SUPPORTS_DOCUMENTATION_FLAG)
174+
if( CXX_SUPPORTS_DOCUMENTATION_FLAG )
175+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wdocumentation" )
176+
endif()
177+
178+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ -fno-rtti -fno-exceptions")
179+
172180
# Compile a swift file into an object file (as a library).
173181
#
174182
# Usage:

0 commit comments

Comments
 (0)