Skip to content

Commit

Permalink
Split long string CMAKE_C_CPPCHECK into a list
Browse files Browse the repository at this point in the history
Signed-off-by: Mikko Johannes Koivunalho <[email protected]>
  • Loading branch information
mikkoi committed Oct 30, 2019
1 parent b36f164 commit e6469d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -474,8 +474,11 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
if(ENABLE_TREAT_WARNINGS_AS_ERRORS)
set(cppcheck_error_exitcode "1")
endif()
set(CMAKE_C_CPPCHECK
"${Cppcheck_EXECUTABLE};--quiet;--error-exitcode=${cppcheck_error_exitcode};--std=${cppcheck_c_standard};--enable=warning,style,performance,portability")
list(APPEND CMAKE_C_CPPCHECK "${Cppcheck_EXECUTABLE}")
list(APPEND CMAKE_C_CPPCHECK "--quiet")
list(APPEND CMAKE_C_CPPCHECK "--error-exitcode=${cppcheck_error_exitcode}")
list(APPEND CMAKE_C_CPPCHECK "--std=${cppcheck_c_standard}")
list(APPEND CMAKE_C_CPPCHECK "--enable=warning,style,performance,portability")
endif(Cppcheck_FOUND)
endif(CMAKE_VERSION VERSION_GREATER_EQUAL "3.10")

Expand Down

0 comments on commit e6469d8

Please sign in to comment.