Skip to content

Commit

Permalink
Merge pull request #195 from K-os/unify_werror_flag
Browse files Browse the repository at this point in the history
unfiy -Werror CMake & Makefile parameter between VVenC & VVdeC
  • Loading branch information
adamjw24 authored Sep 27, 2024
2 parents 4d7e388 + 0611212 commit 7eeb48e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ set( VVDEC_ENABLE_BUILD_TYPE_POSTFIX OFF CACHE BOOL "Enable or disable

set( VVDEC_ENABLE_LINK_TIME_OPT ON CACHE BOOL "Enable link time optimization for release and profile builds" )

set( VVDEC_ENABLE_WARNINGS_AS_WERROR ON CACHE BOOL "Treat warnings as errors (-Werror or /WX)" )
set( VVDEC_ENABLE_WERROR ON CACHE BOOL "Treat warnings as errors (-Werror or /WX)" )

if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR
CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
Expand Down Expand Up @@ -291,7 +291,7 @@ if( VVDEC_USE_THREAD_SANITIZER )
add_link_options( "-fsanitize=thread" )
endif()

if( VVDEC_ENABLE_WARNINGS_AS_WERROR )
if( VVDEC_ENABLE_WERROR )
add_compile_options( "$<$<OR:$<CXX_COMPILER_ID:GNU>,$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Werror>" )
add_compile_options( "$<$<CXX_COMPILER_ID:MSVC>:/WX>" )
endif()
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ CONFIG_OPTIONS += -DVVDEC_ENABLE_LINK_TIME_OPT=OFF
endif

ifneq ($(enable-werror),)
CONFIG_OPTIONS += -DVVDEC_ENABLE_WARNINGS_AS_WERROR=$(enable-werror)
CONFIG_OPTIONS += -DVVDEC_ENABLE_WERROR=$(enable-werror)
endif

ifneq ($(osx-arch),)
Expand Down
3 changes: 0 additions & 3 deletions source/App/vvdecapp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ if( VVDEC_INSTALL_RPATH )
set_target_properties( ${EXE_NAME} PROPERTIES INSTALL_RPATH "${VVDEC_INSTALL_RPATH}" )
endif()

target_compile_options( ${EXE_NAME} PRIVATE $<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-Wall -Werror>
$<$<CXX_COMPILER_ID:GNU>:-Wall -Werror>
$<$<CXX_COMPILER_ID:MSVC>:/W4 /WX /wd4244 /wd4456 >)
target_link_libraries( ${EXE_NAME} Threads::Threads vvdec )
target_include_directories( ${EXE_NAME} PRIVATE ../../Lib/libmd5 )

Expand Down

0 comments on commit 7eeb48e

Please sign in to comment.