Skip to content

Commit 59cb2d2

Browse files
committed
Bug #2524: Addition of CMake build files - completion of variable assignments
Some source file names were added to variable assignments in CMake scripts to update relevant dependencies. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
1 parent 265ea8e commit 59cb2d2

3 files changed

Lines changed: 57 additions & 20 deletions

File tree

cli/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ find_package(PCRE REQUIRED)
44
set(TINYXML_INCLUDE_DIR "${CPPCHECK_SOURCE_DIR}/externals/tinyxml/")
55

66
SET(CPPCHECK_CLI_SOURCES
7+
cmdlineparser.cpp
78
cppcheckexecutor.cpp
89
filelister.cpp
9-
threadexecutor.cpp
1010
main.cpp
11+
threadexecutor.cpp
1112
"${TINYXML_INCLUDE_DIR}tinystr.cpp"
1213
"${TINYXML_INCLUDE_DIR}tinyxml.cpp"
1314
"${TINYXML_INCLUDE_DIR}tinyxmlerror.cpp"
@@ -34,6 +35,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
3435
endif (CMAKE_COMPILER_IS_GNUCXX)
3536

3637
include_directories(${CPPCHECK_SOURCE_DIR}/lib
38+
"${PCRE_INCLUDE_DIR}"
3739
"${TINYXML_INCLUDE_DIR}")
3840
add_executable(cppcheck ${CPPCHECK_CLI_SOURCES} ${CPPCHECK_LIB_SOURCES})
39-
TARGET_LINK_LIBRARIES(cppcheck ${CPPCHECK_CLI_LINK_LIBRARIES})
41+
target_link_libraries(cppcheck ${CPPCHECK_CLI_LINK_LIBRARIES} ${PCRE_LIBRARIES})

gui/CMakeLists.txt

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,24 @@ SET(CPPCHECK_GUI_HEADERS
2424
aboutdialog.h
2525
applicationdialog.h
2626
applicationlist.h
27+
checkstatistics.h
2728
checkthread.h
2829
common.h
2930
csvreport.h
31+
erroritem.h
32+
filelist.h
3033
fileviewdialog.h
3134
helpwindow.h
3235
mainwindow.h
36+
logview.h
37+
project.h
3338
projectfile.h
39+
projectfiledialog.h
3440
report.h
3541
resultstree.h
3642
resultsview.h
3743
settingsdialog.h
44+
statsdialog.h
3845
threadhandler.h
3946
threadresult.h
4047
translationhandler.h
@@ -45,18 +52,26 @@ SET(CPPCHECK_GUI_HEADERS
4552
# Source files
4653
SET(CPPCHECK_GUI_SOURCES
4754
aboutdialog.cpp
48-
applicationdialog.cpp
55+
applicationdialog.cpp
4956
applicationlist.cpp
57+
checkstatistics.cpp
5058
checkthread.cpp
5159
csvreport.cpp
60+
erroritem.cpp
61+
filelist.cpp
5262
fileviewdialog.cpp
63+
helpwindow.cpp
64+
logview.cpp
5365
main.cpp
5466
mainwindow.cpp
67+
project.cpp
5568
projectfile.cpp
69+
projectfiledialog.cpp
5670
report.cpp
5771
resultstree.cpp
5872
resultsview.cpp
5973
settingsdialog.cpp
74+
statsdialog.cpp
6075
threadhandler.cpp
6176
threadresult.cpp
6277
translationhandler.cpp
@@ -69,20 +84,27 @@ SET(CPPCHECK_UIS
6984
about.ui
7085
application.ui
7186
file.ui
87+
helpwindow.ui
88+
logview.ui
7289
main.ui
90+
projectfile.ui
7391
resultsview.ui
7492
settings.ui
93+
stats.ui
7594
)
7695

7796
# Translation files
7897
SET(CPPCHECK_GUI_TRANS
7998
cppcheck_de.ts
80-
cppcheck_fi.ts
81-
cppcheck_pl.ts
82-
cppcheck_se.ts
8399
cppcheck_en.ts
100+
cppcheck_fi.ts
101+
cppcheck_fr.ts
102+
cppcheck_ja.ts
84103
cppcheck_nl.ts
104+
cppcheck_pl.ts
85105
cppcheck_ru.ts
106+
cppcheck_se.ts
107+
cppcheck_sr.ts
86108
)
87109

88110
set(CPPCHECK_LIB_DIR "${CPPCHECK_SOURCE_DIR}/lib/")

test/CMakeLists.txt

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,44 @@ find_package(PCRE REQUIRED)
44
set(TINYXML_INCLUDE_DIR "${CPPCHECK_SOURCE_DIR}/externals/tinyxml/")
55

66
SET(CPPCHECK_TEST_SOURCES
7+
"${CPPCHECK_SOURCE_DIR}/cli/cmdlineparser.cpp"
8+
"${CPPCHECK_SOURCE_DIR}/cli/cppcheckexecutor.cpp"
79
"${CPPCHECK_SOURCE_DIR}/cli/filelister.cpp"
10+
"${CPPCHECK_SOURCE_DIR}/cli/threadexecutor.cpp"
11+
options.cpp
12+
testautovariables.cpp
13+
testbufferoverrun.cpp
14+
testcharvar.cpp
15+
testclass.cpp
16+
testcmdlineparser.cpp
17+
testconstructors.cpp
18+
testcppcheck.cpp
19+
testdivision.cpp
20+
testerrorlogger.cpp
21+
testexceptionsafety.cpp
22+
testincompletestatement.cpp
23+
testmathlib.cpp
824
testmemleak.cpp
25+
testnullpointer.cpp
26+
testobsoletefunctions.cpp
27+
testoptions.cpp
928
testother.cpp
29+
testpath.cpp
30+
testpostfixoperator.cpp
1031
testpreprocessor.cpp
11-
testautovariables.cpp
12-
testredundantif.cpp
13-
testbufferoverrun.cpp
1432
testrunner.cpp
15-
testcharvar.cpp
33+
testsettings.cpp
1634
testsimplifytokens.cpp
17-
testclass.cpp
1835
teststl.cpp
19-
testconstructors.cpp
2036
testsuite.cpp
21-
testcppcheck.cpp
22-
testdangerousfunctions.cpp
37+
testsymboldatabase.cpp
38+
testthreadexecutor.cpp
2339
testtoken.cpp
24-
testdivision.cpp
2540
testtokenize.cpp
26-
testexceptionsafety.cpp
41+
testuninitvar.cpp
2742
testunusedfunctions.cpp
28-
testfilelister.cpp
2943
testunusedprivfunc.cpp
30-
testincompletestatement.cpp
3144
testunusedvar.cpp
32-
testmathlib.cpp
3345
"${TINYXML_INCLUDE_DIR}tinystr.cpp"
3446
"${TINYXML_INCLUDE_DIR}tinyxml.cpp"
3547
"${TINYXML_INCLUDE_DIR}tinyxmlerror.cpp"
@@ -47,7 +59,7 @@ if(WIN32)
4759
set(CPPCHECK_TEST_LINK_LIBRARIES ${CPPCHECK_TEST_LINK_LIBRARIES} shlwapi)
4860
endif()
4961
else()
50-
set(CPPCHECK_TEST_SOURCES ${CPPCHECK_TEST_SOURCES}
62+
set(CPPCHECK_TEST_SOURCES ${CPPCHECK_TEST_SOURCES} testfilelister_unix.cpp
5163
"${CPPCHECK_SOURCE_DIR}/cli/filelister_unix.cpp")
5264
endif()
5365

@@ -56,6 +68,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
5668
endif (CMAKE_COMPILER_IS_GNUCXX)
5769

5870
include_directories("${CPPCHECK_SOURCE_DIR}/lib"
71+
"${CPPCHECK_SOURCE_DIR}/cli"
5972
"${PCRE_INCLUDE_DIR}"
6073
"${TINYXML_INCLUDE_DIR}")
6174
add_executable(test ${CPPCHECK_TEST_SOURCES} ${CPPCHECK_LIB_SOURCES})

0 commit comments

Comments
 (0)