Used check_c_compiler_flag to check availability of pedantic compiler option. This closes
@@ -127,7 +127,11 @@ include_directories(
if (NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
add_compile_options(-Werror)
add_compile_options(-Wall)
+ include(CheckCCompilerFlag)
+ check_c_compiler_flag(-Wpedantic HAS_PEDANTIC_FLAG)
+ if (HAS_PEDANTIC_FLAG)
add_compile_options(-Wpedantic)
+ endif(HAS_PEDANTIC_FLAG)
add_compile_options(-std=gnu99)
add_compile_options(-pthread)
else (NOT CMAKE_SYSTEM_NAME STREQUAL SunOS)
