Skip to content
This repository was archived by the owner on Jun 25, 2020. It is now read-only.

Commit 4896322

Browse files
committed
Merge branch 'master' of github.com:eidheim/jucipp into python-refactor
2 parents 5c2a322 + c3f4a1c commit 4896322

Some content is hidden

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

73 files changed

+4727
-1037
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@
88
!*.h
99
!CMakeLists.txt
1010
!config.json
11+
!debian/*
1112

1213
build

.gitmodules

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
[submodule "tiny-process-library"]
2-
path = tiny-process-library
3-
url = https://github.com/eidheim/tiny-process-library
4-
branch = v1.0.3
51
[submodule "libclangmm"]
62
path = libclangmm
73
url = https://github.com/cppit/libclangmm
8-
branch = v0.9.5
4+
[submodule "tiny-process-library"]
5+
path = tiny-process-library
6+
url = https://github.com/eidheim/tiny-process-library
97
[submodule "pybind11"]
108
path = pybind11
11-
url = https://github.com/pybind/pybind11.git
9+
url = https://github.com/pybind/pybind11.git

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sudo: required
2+
3+
env:
4+
- distribution: ubuntu
5+
- distribution: fedora
6+
- distribution: arch
7+
- distribution: debian-testing
8+
- distribution: debian
9+
10+
services:
11+
- docker
12+
13+
before_install:
14+
- ./ci/update_travis.sh
15+
16+
script:
17+
- script=compile CXX=clang++ CC=clang ./ci/execute.sh
18+
- script=clean ./ci/execute.sh
19+
- script=compile ./ci/execute.sh
20+
- script=static_analysis ./ci/execute.sh
21+
- script=compile make_command="broadwayd & make test" ./ci/execute.sh

CMakeLists.txt

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,55 @@
1-
cmake_minimum_required (VERSION 2.8.4)
1+
cmake_minimum_required (VERSION 2.8.8)
22

33
set(project_name juci)
44
project (${project_name})
55

6+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wall -Wextra -Wno-unused-parameter -Wno-reorder")
7+
if(CMAKE_BUILD_TYPE STREQUAL "")
8+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
9+
endif()
10+
11+
if(APPLE)
12+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup") #TODO: fix this
13+
link_directories(/usr/local/lib /usr/local/opt/gettext/lib)
14+
include_directories(/usr/local/opt/gettext/include)
15+
set(CMAKE_MACOSX_RPATH 1)
16+
set(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig")
17+
endif()
18+
19+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake_modules/")
20+
find_package(LibClang REQUIRED)
21+
22+
#Find liblldb with the same version as the version of libclang found
23+
string(REPLACE libclang liblldb LIBLLDB_LIBRARIES "${LIBCLANG_LIBRARIES}")
24+
if(EXISTS "${LIBLLDB_LIBRARIES}")
25+
set(LIBLLDB_FOUND TRUE)
26+
elseif(EXISTS "${LIBLLDB_LIBRARIES}.1")
27+
set(LIBLLDB_LIBRARIES "${LIBLLDB_LIBRARIES}.1")
28+
set(LIBLLDB_FOUND TRUE)
29+
endif()
30+
if(LIBLLDB_FOUND)
31+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DJUCI_ENABLE_DEBUG")
32+
else()
33+
set(LIBLLDB_LIBRARIES "")
34+
message("liblldb not found. Building juCi++ without debugging support")
35+
endif()
36+
37+
find_package(Boost 1.54 COMPONENTS regex system filesystem REQUIRED)
38+
find_package(ASPELL REQUIRED)
39+
include(FindPkgConfig)
40+
pkg_check_modules(GTKMM gtkmm-3.0 REQUIRED)
41+
pkg_check_modules(GTKSVMM gtksourceviewmm-3.0 REQUIRED)
42+
643
add_subdirectory("src")
744

45+
#TODO: instead of the if-expression below, disable tests on Travis CI for clang++ builds
46+
if(NOT (("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") AND (NOT $ENV{distribution} STREQUAL "")))
47+
if(ENABLE_TESTING)
48+
enable_testing()
49+
add_subdirectory(tests)
50+
endif()
51+
endif()
52+
853
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux|FreeBSD|OpenBSD|NetBSD")
954
install(FILES "${CMAKE_SOURCE_DIR}/share/juci.desktop"
1055
DESTINATION "${CMAKE_INSTALL_PREFIX}/share/applications")

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# juCi++
1+
# juCi++ [![Build Status](https://travis-ci.org/cppit/jucipp.svg?branch=master)](https://travis-ci.org/cppit/jucipp)
22
###### a lightweight, platform independent C++-IDE with support for C++11, C++14, and experimental C++17 features depending on libclang version.
33
<!--<img src="https://github.com/cppit/jucipp/blob/master/docs/images/screenshot3.png"/>-->
44
## About
@@ -13,14 +13,14 @@ towards libclang with speed and ease of use in mind.
1313
* C++ warnings and errors on the fly
1414
* C++ Fix-its
1515
* Debug integration through lldb
16-
* Automated CMake processing
16+
* Automated CMake processing, including support for external libraries
1717
* Fast C++ autocompletion
1818
* Keyword and buffer autocompletion for other file types
1919
* Tooltips showing type information and doxygen documentation (C++)
2020
* Rename refactoring across files (C++)
2121
* Highlighting of similar types (C++)
2222
* Automated documentation search (C++)
23-
* Go to methods and usages (C++)
23+
* Go to declaration, implementation, methods and usages (C++)
2424
* Spell checking depending on file context
2525
* Run shell commands within JuCi++
2626
* Regex search and replace
@@ -39,9 +39,6 @@ See [enhancements](https://github.com/cppit/jucipp/labels/enhancement) for plann
3939

4040
## Dependencies
4141
* boost-filesystem
42-
* boost-log
43-
* boost-thread
44-
* boost-system
4542
* boost-regex
4643
* gtkmm-3.0
4744
* gtksourceviewmm-3.0
@@ -52,4 +49,7 @@ See [enhancements](https://github.com/cppit/jucipp/labels/enhancement) for plann
5249
* [tiny-process-library](http://github.com/eidheim/tiny-process-library/) (downloaded directly with git --recursive, no need to install)
5350

5451
## Installation
55-
See [installation guide](http://github.com/cppit/jucipp/blob/master/docs/install.md).
52+
See [installation guide](docs/install.md).
53+
54+
## Documentation
55+
See [how to build the API doc](docs/api.md).

ci/compile.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
if [ "${cmake_command}" == "" ]; then
4+
cmake_command="cmake -DENABLE_TESTING=1 -DCMAKE_CXX_FLAGS=-Werror .."
5+
fi
6+
7+
if [ "${make_command}" == "" ]; then
8+
make_command="make -j 2"
9+
fi
10+
11+
cd jucipp || exit
12+
mkdir -p build && cd build || exit
13+
sh -c "${cmake_command}" || exit
14+
exec sh -c "${make_command}"

ci/execute.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
function linux () {
4+
cd ci || exit
5+
if [ "${script}" == "clean" ]; then
6+
sudo rm ../build -rf
7+
return 0
8+
fi
9+
sudo docker run -it \
10+
-e "CXX=$CXX" \
11+
-e "CC=$CC" \
12+
-e "make_command=$make_command" \
13+
-e "cmake_command=$cmake_command" \
14+
-e "distribution=$distribution" \
15+
-v "$PWD/../:/jucipp" \
16+
--entrypoint="/jucipp/ci/${script}.sh" \
17+
"cppit/jucipp:$distribution"
18+
}
19+
20+
#TODO Should run compile/install instructions for osx
21+
function osx () {
22+
true
23+
}
24+
25+
$TRAVIS_OS_NAME

ci/static_analysis.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
if [ "${make_command}" == "" ]; then
4+
make_command="make -j 2"
5+
fi
6+
7+
cd jucipp/build || exit
8+
exec sh -c "scan-build -o ../html_${distribution} --status-bugs ${make_command}"

ci/update_travis.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
function linux () {
4+
sudo apt-get update
5+
sudo apt-get purge lxc-docker
6+
sudo apt-get install --yes --force-yes -o Dpkg::Options::="--force-confnew" linux-image-extra-$(uname -r) docker-engine
7+
sudo service docker stop || exit
8+
sudo rm -rf /var/lib/docker || exit
9+
sudo service docker start || exit
10+
}
11+
12+
# TODO method should update osx, brew, packages etc needed for juCi++
13+
function osx () {
14+
brew update
15+
brew rm llvm
16+
brew doctor
17+
brew upgrade
18+
brew install --with-clang --with-lldb llvm
19+
brew install cmake pkg-config boost homebrew/x11/gtksourceviewmm3 aspell clang-format
20+
}
21+
22+
$TRAVIS_OS_NAME

src/cmake/Modules/FindLibClang.cmake renamed to cmake_modules/FindLibClang.cmake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
# Known LLVM release numbers.
1515

1616
# most recent versions come first
17-
set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.8
17+
set(LIBCLANG_KNOWN_LLVM_VERSIONS 3.9
18+
3.8.1
19+
3.8
1820
3.7.1
1921
3.7
2022
3.6.2

0 commit comments

Comments
 (0)