mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-04 18:06:22 +03:00
0026854: Use -Wextra with GCC
Added option -Wextra for GCC compilation
This commit is contained in:
parent
6fab2d4f64
commit
7dc2c1656a
@ -75,7 +75,7 @@ endif()
|
||||
# generate a single response file which enlist all of the object files
|
||||
SET(CMAKE_C_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
SET(CMAKE_CXX_USE_RESPONSE_FILE_FOR_OBJECTS 1)
|
||||
# increase compiler warnings level (-W4 for MSVC, -Wall for GCC)
|
||||
# increase compiler warnings level (-W4 for MSVC, -Wextra for GCC)
|
||||
if (MSVC)
|
||||
if (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
string (REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
|
||||
@ -83,7 +83,7 @@ if (MSVC)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
|
||||
endif()
|
||||
|
||||
if (DEFINED CMAKE_COMPILER_IS_GNUCXX OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang")
|
||||
|
Loading…
x
Reference in New Issue
Block a user