|
|
@@ -0,0 +1,67 @@ |
|
|
|
If ( __PEDANTIC_INCLUDED ) |
|
|
|
Return ( ) |
|
|
|
EndIf ( ) |
|
|
|
set ( __PEDANTIC_INCLUDED TRUE ) |
|
|
|
|
|
|
|
Include (CheckCCompilerFlag) |
|
|
|
Include (CheckCXXCompilerFlag) |
|
|
|
|
|
|
|
Macro (__PEDANTIC_CHECK_AND_ADD_C_FLAG FLAG) |
|
|
|
CHECK_C_COMPILER_FLAG(${FLAG} TMP) |
|
|
|
If (TMP) |
|
|
|
Set (PEDANTIC_C_FLAGS "${PEDANTIC_C_FLAGS} ${FLAG}") |
|
|
|
EndIf ( ) |
|
|
|
EndMacro() |
|
|
|
|
|
|
|
Macro (__PEDANTIC_CHECK_AND_ADD_CXX_FLAG FLAG) |
|
|
|
CHECK_CXX_COMPILER_FLAG(${FLAG} TMP) |
|
|
|
If (TMP) |
|
|
|
Set (PEDANTIC_CXX_FLAGS "${PEDANTIC_CXX_FLAGS} ${FLAG}") |
|
|
|
EndIf ( ) |
|
|
|
EndMacro() |
|
|
|
|
|
|
|
Set (PEDANTIC_C_FLAGS "") |
|
|
|
Set (PEDANTIC_CXX_FLAGS "") |
|
|
|
|
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-g) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wall) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wextra) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wconversion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Werror) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wno-unused-parameter) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wbad-function-cast) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wcast-align) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wcast-qual) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wconversion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wdouble-promotion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wfloat-equal) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wnested-externs) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wno-attributes) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wno-builtin-macro-redefined) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wno-vla) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wno-pragmas) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wold-style-definition) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Woverlength-strings) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wshadow) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_C_FLAG(-Wwrite-strings) |
|
|
|
|
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-ftemplate-depth=2000) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-g) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wall) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wextra) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wconversion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Werror) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-reorder) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-unused-parameter) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wcast-align) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wcast-qual) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wconversion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wdouble-promotion) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wfloat-equal) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-attributes) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-builtin-macro-redefined) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-vla) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wno-pragmas) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Woverlength-strings) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wshadow) |
|
|
|
__PEDANTIC_CHECK_AND_ADD_CXX_FLAG(-Wwrite-strings) |