cmake: Discard excess warnings for e2k
parent
ad1978a31f
commit
006443b8c3
|
@ -214,6 +214,21 @@ elseif(UNIX)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(LOWERCASE_CMAKE_SYSTEM_PROCESSOR MATCHES "e2k")
|
||||
foreach(TEST_C_FLAG "-Wno-unused-parameter" "-Wno-ignored-qualifiers" "-Wno-pointer-sign" "-Wno-unused-variable" "-Wno-sign-compare" "-Wno-bad-return-value-type" "-Wno-maybe-uninitialized")
|
||||
CHECK_C_COMPILER_FLAG(${TEST_C_FLAG} C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG})
|
||||
if(C_COMPILER_SUPPORTS_FLAG_${TEST_C_FLAG})
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${TEST_C_FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
foreach(TEST_CXX_FLAG "-Wno-invalid-offsetof" "-Wno-maybe-uninitialized")
|
||||
CHECK_CXX_COMPILER_FLAG(${TEST_CXX_FLAG} CXX_COMPILER_SUPPORTS_FLAG_${TEST_CXX_FLAG})
|
||||
if(CXX_COMPILER_SUPPORTS_FLAG_${TEST_CXX_FLAG})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TEST_CXX_FLAG}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
option(BUILD_TESTS "Build test directory (includes test sources and possibly a platform test executable)" FALSE)
|
||||
mark_as_advanced(BUILD_TESTS)
|
||||
|
||||
|
|
Loading…
Reference in New Issue