Skip to content

Commit

Permalink
Fix: #575
Browse files Browse the repository at this point in the history
  • Loading branch information
clanmills committed Dec 4, 2018
1 parent 2e4447f commit 97c25fc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 9 deletions.
15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,8 @@ $ cd <exiv2dir>/build
$ bin/unit_tests
```
There is a discussion on the web about installing GTest: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
[TOC](#TOC)
<name id="5">
## 5 Platform Notes
Expand All @@ -631,11 +633,12 @@ There are many ways to set up and configure your platform. The following notes
<name id="5-1">
### 5.1 Linux
Update your system and install the build tools.
Update your system and install the build tools and dependencies (zlib, expat, gtest and others)
```bash
sudo apt --yes update
sudo apt install --yes build-essential git libxml2-utils cmake python3 libexpat1-dev libz-dev
$ cd <exiv2dir>/ci
$ sudo ./install_dependencies.sh
$ ./install.sh # include conan
```
Get the code from GitHub and build
Expand Down Expand Up @@ -668,6 +671,8 @@ We provide support for both 64bit and 32bit builds using MinGW/msys2. [https://w
Support for MinGW/msys1.0 32 bit build was provided for Exiv2 v0.26. MinGW/msys1.0 is not supported by Team Exiv2 for Exiv2 v0.27 and later.
There is a discussion on the web about installing GTest on MinGW: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
#### MinGW/msys2 64 bit
Install: [http://repo.msys2.org/distrib/x86\_64/msys2-x86\_64-20180531.exe](http://repo.msys2.org/distrib/x86_64/msys2-x86_64-20180531.exe)
Expand Down Expand Up @@ -748,6 +753,8 @@ make, cmake, gcc, gettext-devel pkg-config, dos2unix, zlib-devel, libexpat1-deve
Download and build libiconv-1.15: [https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz](https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.15.tar.gz)
There is a discussion on the web about installing GTest on Cygwin: [https://github.com/Exiv2/exiv2/issues/575](https://github.com/Exiv2/exiv2/issues/575)
Download and build cmake from source because I can't get the cygwin installed cmake 3.6.2 to work.
To build cmake from source, you need libncurses. [https://cmake.org/download/](https://cmake.org/download/)
Expand Down Expand Up @@ -789,4 +796,4 @@ cmd
[TOC](#TOC)
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2018-11-28
Written by Robin Mills<br>robin@clanmills.com<br>Updated: 2018-12-01
12 changes: 11 additions & 1 deletion ci/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,24 @@ pip install conan==1.9.0
pip install codecov
conan --version
conan config set storage.path=~/conanData
conan remote add conan-bincrafters https://api.bintray.com/conan/bincrafters/public-conan
! conan remote add conan-bincrafters https://api.bintray.com/conan/bincrafters/public-conan

mkdir -p ~/.conan/profiles

if [ -z $CC ]; then
CC=$(which gcc)
fi

if [[ "$(uname -s)" == 'Linux' ]]; then
CC_VER=$(${CC} --version | head -1 | awk '{print $3}'| awk -F'.' '{ print $1"."$2 }')
printf "[settings]\nos=Linux\narch=x86_64\ncompiler=$CC\ncompiler.version=$CC_VER\ncompiler.libcxx=libstdc++\nbuild_type=Release\n" > ~/.conan/profiles/release
else
printf "[settings]\nos=Macos\narch=x86_64\ncompiler=apple-clang\ncompiler.version=9.0\ncompiler.libcxx=libc++\nbuild_type=Release\n" > ~/.conan/profiles/release
fi

# put conan on the path and clean up
sudo cp -R conan/bin/conan /usr/local/bin/conan
# rm -rf conan



4 changes: 3 additions & 1 deletion cmake/compilerFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ if ( MINGW OR UNIX OR MSYS ) # MINGW, Linux, APPLE, CYGWIN
set(SANITIZER_FLAGS "-fno-omit-frame-pointer -fsanitize=address")
endif()
elseif( COMPILER_IS_CLANG )
if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3 )
if ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.9 )
set(SANITIZER_FLAGS "-fno-omit-frame-pointer -fsanitize=address,undefined -fno-sanitize-recover=all")
elseif ( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.4 )
set(SANITIZER_FLAGS "-fno-omit-frame-pointer -fsanitize=address,undefined")
elseif( CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.1 )
set(SANITIZER_FLAGS "-fno-omit-frame-pointer -fsanitize=address")
endif()
Expand Down
17 changes: 14 additions & 3 deletions contrib/vms/utils.source
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,20 @@ function get_distro_id() {
function debian_build_gtest() {
pushd .
[ -d gtest_build ] || mkdir gtest_build
cd gtest_build
cmake -DBUILD_SHARED_LIBS=1 /usr/src/googletest/googletest
cd gtest_build

wget https://github.com/google/googletest/archive/release-1.8.0.tar.gz
tar xzf release-1.8.0.tar.gz
cd googletest-release-1.8.0
mkdir -p build
cd build
cmake .. -DBUILD_SHARED_LIBS=1
make
cp libgtest* /usr/lib/
sudo make install

# clean up
popd
if [ -e gtest_build ]; then
rm -rf gtest_build
fi
}

0 comments on commit 97c25fc

Please sign in to comment.