Skip to content

Commit 5de9670

Browse files
committed
src/lib: separate directory for source code of cslib.a
Closes: #93
1 parent 7e50c47 commit 5de9670

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+53
-33
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ SANITIZERS ?= OFF
2525
CMAKE_BUILD_TYPE ?= RelWithDebInfo
2626

2727
.PHONY: all check clean sanitizers distclean distcheck distcheck-sanitizers \
28-
fast install version.cc src/version.cc
28+
fast install version.cc src/lib/version.cc
2929

3030
all: version.cc
3131
mkdir -p csdiff_build
@@ -47,7 +47,7 @@ sanitizers:
4747
$(MAKE) -s all SANITIZERS=ON
4848

4949
distclean:
50-
if test -e .git; then rm -f src/version.cc; fi
50+
if test -e .git; then rm -f src/lib/version.cc; fi
5151
rm -rf csdiff_build
5252

5353
distcheck: distclean
@@ -59,9 +59,9 @@ distcheck-sanitizers:
5959
install: all
6060
$(MAKE) -C csdiff_build install
6161

62-
version.cc: src/version.cc
62+
version.cc: src/lib/version.cc
6363

64-
src/version.cc:
64+
src/lib/version.cc:
6565
@if test -e .git; then \
6666
cmd='git describe --always | sed -e "s/^csdiff-//" -e "s/-.*-/.$$(git log --pretty="%cd" --date=iso -1 | tr -d ":-" | tr " " . | cut -d. -f 1,2)./"'; \
6767
else \

src/CMakeLists.txt

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -61,35 +61,8 @@ endif()
6161
add_definitions(-DBOOST_BIND_GLOBAL_PLACEHOLDERS)
6262

6363
# cslib.a
64-
add_library(cs STATIC
65-
abstract-filter.cc
66-
color.cc
67-
csdiff-core.cc
68-
csv-parser.cc
69-
cwe-mapper.cc
70-
cwe-name-lookup.cc
71-
deflookup.cc
72-
instream.cc
73-
msg-filter.cc
74-
parser.cc
75-
parser-common.cc
76-
parser-cov.cc
77-
parser-gcc.cc
78-
parser-json.cc
79-
parser-json-cov.cc
80-
parser-json-gcc.cc
81-
parser-json-sarif.cc
82-
parser-json-shchk.cc
83-
parser-json-simple.cc
84-
parser-xml.cc
85-
parser-xml-valgrind.cc
86-
shared-string.cc
87-
version.cc
88-
writer.cc
89-
writer-cov.cc
90-
writer-html.cc
91-
writer-json.cc
92-
)
64+
add_subdirectory(lib)
65+
include_directories(lib)
9366

9467
# link cslib.a and boost libraries
9568
link_libraries(cs
File renamed without changes.

src/lib/CMakeLists.txt

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright (C) 2011 - 2022 Red Hat, Inc.
2+
#
3+
# This file is part of csdiff.
4+
#
5+
# csdiff is free software: you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation, either version 3 of the License, or
8+
# any later version.
9+
#
10+
# csdiff is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with csdiff. If not, see <http://www.gnu.org/licenses/>.
17+
18+
# cslib.a
19+
add_library(cs STATIC
20+
abstract-filter.cc
21+
color.cc
22+
csdiff-core.cc
23+
csv-parser.cc
24+
cwe-mapper.cc
25+
cwe-name-lookup.cc
26+
deflookup.cc
27+
instream.cc
28+
msg-filter.cc
29+
parser.cc
30+
parser-common.cc
31+
parser-cov.cc
32+
parser-gcc.cc
33+
parser-json.cc
34+
parser-json-cov.cc
35+
parser-json-gcc.cc
36+
parser-json-sarif.cc
37+
parser-json-shchk.cc
38+
parser-json-simple.cc
39+
parser-xml.cc
40+
parser-xml-valgrind.cc
41+
shared-string.cc
42+
version.cc
43+
writer.cc
44+
writer-cov.cc
45+
writer-html.cc
46+
writer-json.cc
47+
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)