mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Configure build to work with case fallthrough GCC7 warning. Refs #671
This commit is contained in:
@@ -181,6 +181,12 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
-Wno-reorder)
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
list(APPEND warning_flags -Wno-unused-but-set-variable)
|
||||
|
||||
# We keep the implicit fallthrough warning for now, but allow more
|
||||
# comments to silence it.
|
||||
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 7.0)
|
||||
list(APPEND warning_flags -Wimplicit-fallthrough=2)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||
|
||||
@@ -114,6 +114,11 @@ file(WRITE
|
||||
"OSX_ICONFILE=${CMAKE_CURRENT_BINARY_DIR}/RenderDoc.icns\n")
|
||||
|
||||
# propagate build version info. Lots of escaping needed here to pass ""s into the define value
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
|
||||
"QMAKE_CXXFLAGS+=-Wno-unknown-warning -Wno-implicit-fallthrough\n")
|
||||
endif()
|
||||
|
||||
file(APPEND
|
||||
${CMAKE_BINARY_DIR}/qrenderdoc/qrenderdoc_cmake.pri
|
||||
|
||||
@@ -201,6 +201,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR APPLE)
|
||||
# -Wno-shift-negative-value available
|
||||
set_source_files_properties(3rdparty/jpeg-compressor/jpgd.cpp
|
||||
PROPERTIES COMPILE_FLAGS "-Wno-unknown-warning-option -Wno-shift-negative-value")
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set_property(SOURCE 3rdparty/jpeg-compressor/jpgd.cpp
|
||||
APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-unknown-warning -Wno-implicit-fallthrough")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_library(rdoc OBJECT ${sources})
|
||||
|
||||
Reference in New Issue
Block a user