Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
rizsotto committed Aug 29, 2019
2 parents e97ad03 + f743454 commit c3c3537
Show file tree
Hide file tree
Showing 14 changed files with 423 additions and 78 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ cmake-build*/
Output/
Cargo.lock
target/
.DS_Store
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ addons:
packages:
- cmake
- scons
- gfortran
- qt4-qmake

before_install:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8)

project(bear C)
set(BEAR_VERSION "2.4.1")
set(BEAR_VERSION "2.4.2")

include(GNUInstallDirs)
install(FILES COPYING README.md ChangeLog.md
Expand Down
11 changes: 11 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 2.4.2 (2019.08.29)

Features:
- Support `output` field in the output. (#254, @bofeng17)
- Support Fortran compiler (#201, #241, #253, @rubyzhou2014, @chunhualiao)
- Support filter options (#261, #252, @liugang)

Bugfixes:
- Fix Cpack problem to create RPM. (#191, @antmak, @reverendhomer)


## 2.4.1 (2019.07.30)

Features:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ With this, it is easy to re-run the compilation with alternate
programs.

One way to get a compilation database is to use `cmake` as the build
tool. Passing `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to cmake generates
tool. Passing `-DCMAKE_EXPORT_COMPILE_COMMANDS=ON` to cmake generates
the `compile_commands.json` file into the current directory.

For non-cmake projects, Bear generates the JSON file during the build process.
Expand All @@ -37,7 +37,7 @@ writes the output file.
How to install
--------------

Bear is packaged for many distribution. Check out your package manager.
Bear is packaged for many distributions. Check out your package manager.
Or build it from source.


Expand All @@ -51,7 +51,7 @@ tested on FreeBSD, GNU/Linux and OS X.

1. an ANSI **C compiler**, to compile the sources.
2. **cmake**, to configure the build process.
3. **make**, to run the build. The makefiles are generated by `cmake`.
3. **make**, to run the build. The makefiles are generated by `cmake`.
4. **python** is a runtime dependency. The `bear` command is written in
Python. (version >= 2.7)
5. **lit** is an optional dependency to run the functional tests
Expand All @@ -75,12 +75,12 @@ After installation the usage is like this:

bear <your-build-command>

The output file called `compile_commands.json` found in current directory.
The output file called `compile_commands.json` is saved in the current directory.

For more options you can check the man page or pass `--help` parameter.

Side note: Since `bear` is executing the build command only those commands
will be recorded which were actually executed. Which means if you were already
will be recorded which were actually executed. Which means if you have already
built your project and you re-run the build command with Bear you probably end
up to have an empty output. (Practically it means you need to run `make clean`
before you run `bear make`.)
Expand All @@ -106,7 +106,7 @@ For OSX this is not an issue. The build commands from previous section will
work, Bear will intercept compiler calls for 32-bit and 64-bit applications.

For Linux, a small tune is needed at build time. Need to compile `libear.so`
libray for 32-bit and for 64-bit too. Then install these libraries to the OS
library for 32-bit and for 64-bit too. Then install these libraries to the OS
preferred multilib directories. And replace the `libear.so` path default
value with a single path, which matches both. (The match can be achieved by
the `$LIB` token expansion from the dynamic loader. See `man ld.so` for more.)
Expand All @@ -130,7 +130,7 @@ To check you installation, install `lit` and run the test suite.
### Empty compilation database on OS X / macOS or Fedora

Security extension/modes on different operating systems might disable library
preloads. This case Bear behaves normally, but the result compilation database
preloads. In this case Bear behaves normally, but the result compilation database
will be empty. (Please make sure it's not the case when reporting bugs.)
Notable examples for enabled security modes are: OS X 10.11 (check with
`csrutil status | grep 'System Integrity Protection'`), and Fedora, CentOS, RHEL
Expand Down
7 changes: 7 additions & 0 deletions bear/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
include(FindPythonInterp)
if (PYTHONINTERP_FOUND)
set(BEAR_PYTHON_EXECUTABLE "python${PYTHON_VERSION_MAJOR}")
else()
message(FATAL_ERROR "Have not found python interpreter")
endif()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.py.in ${CMAKE_CURRENT_BINARY_DIR}/bear)

include(GNUInstallDirs)
Expand Down
Loading

0 comments on commit c3c3537

Please sign in to comment.