File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed
Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ INCLUDE(FindThreads)
3434INCLUDE (FindStatNsec)
3535INCLUDE (IdeSplitSources)
3636INCLUDE (FeatureSummary)
37+ INCLUDE (EnableWarnings)
3738
3839# Build options
3940#
@@ -191,21 +192,6 @@ ELSE ()
191192
192193 SET (CMAKE_C_FLAGS "-D_GNU_SOURCE ${CMAKE_C_FLAGS} " )
193194
194- MACRO (ENABLE_WARNINGS flag)
195- IF (ENABLE_WERROR)
196- ADD_C_FLAG_IF_SUPPORTED(-Werror=${flag} )
197- ELSE ()
198- ADD_C_FLAG_IF_SUPPORTED(-W${flag} )
199- ENDIF ()
200- ENDMACRO ()
201-
202- MACRO (DISABLE_WARNINGS flag)
203- ADD_C_FLAG_IF_SUPPORTED(-Wno-${flag} )
204- IF (ENABLE_WERROR)
205- ADD_C_FLAG_IF_SUPPORTED(-Wno-error=${flag} )
206- ENDIF ()
207- ENDMACRO ()
208-
209195 ENABLE_WARNINGS(all )
210196 ENABLE_WARNINGS(extra)
211197
Original file line number Diff line number Diff line change 1+ MACRO (ENABLE_WARNINGS flag)
2+ IF (ENABLE_WERROR)
3+ ADD_C_FLAG_IF_SUPPORTED(-Werror=${flag} )
4+ ELSE ()
5+ ADD_C_FLAG_IF_SUPPORTED(-W${flag} )
6+ ENDIF ()
7+ ENDMACRO ()
8+
9+ MACRO (DISABLE_WARNINGS flag)
10+ ADD_C_FLAG_IF_SUPPORTED(-Wno-${flag} )
11+ IF (ENABLE_WERROR)
12+ ADD_C_FLAG_IF_SUPPORTED(-Wno-error=${flag} )
13+ ENDIF ()
14+ ENDMACRO ()
You can’t perform that action at this time.
0 commit comments