Skip to content

Commit

Permalink
Enable warnings and add detection support for CPPCheck to -DANALYZE=t…
Browse files Browse the repository at this point in the history
…rue for ngscopeclient#180.
  • Loading branch information
tarunik committed Oct 7, 2020
1 parent 6aad56b commit 826926d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ if(BUILD_DOCS)
endif()

if(ANALYZE)
set(CMAKE_CXX_CPPCHECK "/usr/bin/cppcheck;-DFT_USE_AUTOCONF_SIZEOF_TYPES")
find_program(CPPCHECK_PATH cppcheck DOC "Path to cppcheck when ANALYZE is enabled" REQUIRED)
set(CMAKE_CXX_CPPCHECK "${CPPCHECK_PATH};-DFT_USE_AUTOCONF_SIZEOF_TYPES;--enable=warning,performance,portability")
endif()

add_subdirectory("${PROJECT_SOURCE_DIR}/lib/graphwidget")
Expand Down

0 comments on commit 826926d

Please sign in to comment.