Skip to content

Commit e6efc89

Browse files
committed
Ast visitor function for using declarations.
Added two enviroment variable definitions to the dev Dockerfile. This way we don't need to add them when compiling a code to test.
1 parent 2d10c7d commit e6efc89

53 files changed

Lines changed: 1316 additions & 554 deletions

Some content is hidden

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

.gitlab/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
How to use
2+
==========
3+
4+
Configure environment
5+
---------------------
6+
Source the `cc-env.sh` file.
7+
8+
Now the important binaries are available on the `PATH` environment variable:
9+
`CodeCompass_parser`, `CodeCompass_webserver`, `CodeCompass_logger`, `ccdb-tool`.
10+
11+
12+
Start a database
13+
----------------
14+
The tarball contains a CodeCompass instance linked against PostgreSQL, therefore two options are available.
15+
- Use the PostgreSQL database server on your machine.
16+
- The extracted tarball contains a PostgreSQL installation in the `runtime-deps/postgresql-install/bin` folder.
17+
Use the `initdb` and `postgres` binaries to create and start a new PostgreSQL database cluster.

.gitlab/build-codecompass.sh

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
#!/bin/bash
2+
set -x
3+
set -e
4+
5+
#####################
6+
# Build CodeCompass #
7+
#####################
8+
9+
export PATH=$DEPS_INSTALL_BUILD_DIR/gcc-install/bin\
10+
:$DEPS_INSTALL_BUILD_DIR/cmake-install/bin\
11+
:$DEPS_INSTALL_RUNTIME_DIR/libmagic-install/bin\
12+
:$DEPS_INSTALL_RUNTIME_DIR/odb-install/bin\
13+
:$DEPS_INSTALL_RUNTIME_DIR/thrift-install/bin\
14+
:$DEPS_INSTALL_RUNTIME_DIR/jdk-install/bin\
15+
:$DEPS_INSTALL_RUNTIME_DIR/python-install/bin\
16+
:$DEPS_INSTALL_RUNTIME_DIR/node-install/bin\
17+
:$PATH
18+
19+
export CPLUS_INCLUDE_PATH=$DEPS_INSTALL_BUILD_DIR/gtest-install/include\
20+
:$DEPS_INSTALL_RUNTIME_DIR/libgit2-install/include\
21+
:$DEPS_INSTALL_RUNTIME_DIR/libmagic-install/include\
22+
:$DEPS_INSTALL_RUNTIME_DIR/graphviz-install/include\
23+
:$DEPS_INSTALL_RUNTIME_DIR/boost-install/include\
24+
:$DEPS_INSTALL_RUNTIME_DIR/openssl-install/include
25+
26+
export C_INCLUDE_PATH=$DEPS_INSTALL_BUILD_DIR/gtest-install/include\
27+
:$DEPS_INSTALL_RUNTIME_DIR/libgit2-install/include\
28+
:$DEPS_INSTALL_RUNTIME_DIR/libmagic-install/include\
29+
:$DEPS_INSTALL_RUNTIME_DIR/graphviz-install/include\
30+
:$DEPS_INSTALL_RUNTIME_DIR/boost-install/include\
31+
:$DEPS_INSTALL_RUNTIME_DIR/openssl-install/include
32+
33+
export LIBRARY_PATH=$DEPS_INSTALL_RUNTIME_DIR/graphviz-install/lib\
34+
:$DEPS_INSTALL_RUNTIME_DIR/libmagic-install/lib\
35+
:$DEPS_INSTALL_RUNTIME_DIR/libgit2-install/lib\
36+
:$DEPS_INSTALL_RUNTIME_DIR/libgit2-install/lib64\
37+
:$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib
38+
# Note: libgit2-install/lib required on Ubuntu; libgit2-install/lib64 on SUSE
39+
40+
export LDFLAGS="-Wl,-rpath-link,$DEPS_INSTALL_RUNTIME_DIR/openssl-install/lib "\
41+
"-Wl,-rpath-link,$DEPS_INSTALL_RUNTIME_DIR/postgresql-install/lib"
42+
43+
export LD_LIBRARY_PATH=$DEPS_INSTALL_RUNTIME_DIR/odb-install/lib\
44+
:$LD_LIBRARY_PATH
45+
46+
export CMAKE_PREFIX_PATH=$DEPS_INSTALL_RUNTIME_DIR/libgit2-install\
47+
:$DEPS_INSTALL_RUNTIME_DIR/odb-install\
48+
:$DEPS_INSTALL_RUNTIME_DIR/thrift-install\
49+
:$DEPS_INSTALL_RUNTIME_DIR/boost-install\
50+
:$DEPS_INSTALL_RUNTIME_DIR/llvm-install
51+
52+
export GTEST_ROOT=$DEPS_INSTALL_BUILD_DIR/gtest-install
53+
54+
export CXX=$DEPS_INSTALL_BUILD_DIR/gcc-install/bin/g++
55+
export CC=$DEPS_INSTALL_BUILD_DIR/gcc-install/bin/gcc
56+
57+
mkdir $CC_BUILD_DIR
58+
cd $CC_BUILD_DIR
59+
cmake $CC_SRC_DIR \
60+
-DCMAKE_INSTALL_PREFIX=$CC_INSTALL_DIR \
61+
-DDATABASE=pgsql \
62+
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
63+
-DLLVM_DIR=$DEPS_INSTALL_RUNTIME_DIR/llvm/lib/cmake/llvm/ \
64+
-DClang_DIR=$DEPS_INSTALL_RUNTIME_DIR/llvm/lib/cmake/clang/
65+
make install --quiet --jobs $(nproc)

0 commit comments

Comments
 (0)