Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Bård Skaflestad 2013-08-01 18:37:21 +02:00
commit 4f11987bb7
9 changed files with 42 additions and 12 deletions

View File

@ -326,9 +326,12 @@ if (NOT HAVE_TUPLE)
endif()
if(CXX_FEATURES_MISSING)
message(FATAL_ERROR
"Your C++ compiler does not support the minimum set of C++-2011 features required. "
"Make sure to use a compiler which implements all C++-2011 features provided by GCC 4.4. "
"Your compiler does not seem to implement the following features:\n"
"${CXX_FEATURES_MISSING}")
set (CXX11FEATURES_FOUND FALSE)
if (CXX11Features_FIND_REQUIRED)
message(FATAL_ERROR
"Your C++ compiler does not support the minimum set of C++-2011 features required. "
"Make sure to use a compiler which implements all C++-2011 features provided by GCC 4.4. "
"Your compiler does not seem to implement the following features:\n"
"${CXX_FEATURES_MISSING}")
endif()
endif()

View File

@ -16,7 +16,7 @@ find_opm_package (
"dune-common"
# dependencies
"CXX11Features;
"CXX11Features REQUIRED;
BLAS REQUIRED;
LAPACK REQUIRED;
MPI

View File

@ -19,7 +19,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features;
"CXX11Features REQUIRED;
dune-common REQUIRED
"
# header to search for

View File

@ -19,7 +19,7 @@ find_opm_package (
# TODO: we should probe for all the HAVE_* values listed below;
# however, we don't actually use them in our implementation, so
# we just include them to forward here in case anyone else does
"CXX11Features;
"CXX11Features REQUIRED;
dune-common REQUIRED;
dune-geometry REQUIRED
"

View File

@ -1,8 +1,24 @@
# - Default settings for the build
include (UseCompVer)
include(TestCXXAcceptsFlag)
macro (opm_defaults opm)
# if we are installing a development version (default when checking out of
# VCS), then remember which directories were used when configuring. package
# distribution should disable this option.
option (USE_RUNPATH "Embed original dependency paths in installed library" ON)
if (USE_RUNPATH)
if (CMAKE_COMPILER_IS_GNUCXX)
check_cxx_accepts_flag ("-Wl,--enable-new-dtags" HAVE_RUNPATH)
if (HAVE_RUNPATH)
list (APPEND ${opm}_LINKER_FLAGS "-Wl,--enable-new-dtags")
endif (HAVE_RUNPATH)
endif (CMAKE_COMPILER_IS_GNUCXX)
# set this to avoid CMake stripping it off again
set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
endif (USE_RUNPATH)
# build release by default
if (NOT CMAKE_CONFIGURATION_TYPES AND NOT CMAKE_BUILD_TYPE)
set (CMAKE_BUILD_TYPE "Release")

View File

@ -17,7 +17,7 @@ set (opm-core_DEPS
# compile with C99 support if available
"C99"
# compile with C++0x/11 support if available
"CXX11Features"
"CXX11Features REQUIRED"
# various runtime library enhancements
"Boost 1.39.0
COMPONENTS date_time filesystem system unit_test_framework signals REQUIRED"

View File

@ -19,6 +19,7 @@ Optional Features:
of the options shared and static may be built.
--enable-debug build a non-optimized version of the library
[default=no]
--disable-runpath do not use RUNPATH in installed library [default=yes]
--enable-lto use whole program optimization [default=no]
--disable-tests do not compile and enable unit tests [default=yes]
--disable-examples do not compile example programs [default=yes]
@ -108,6 +109,8 @@ silent_rules=
debug_loc=
#use_lto=" -DWHOLE_PROG_OPTIM=OFF"
use_lto=
#use_runpath=" -DUSE_RUNPATH=OFF"
use_runpath=
#use_tests=" -DBUILD_TESTING=ON"
use_tests=
#use_samples=" -DBUILD_EXAMPLES=ON"
@ -235,6 +238,10 @@ for OPT in "$@"; do
pch_use=" -DPRECOMPILE_HEADERS:BOOL=OFF"
pkgname=""
;;
runpath)
use_runpath=" -DUSE_RUNPATH=OFF"
pkgname=""
;;
silent-rules)
silent_rules=" -DCMAKE_VERBOSE_MAKEFILE=ON"
pkgname=""
@ -313,6 +320,10 @@ for OPT in "$@"; do
pch_use=" -DPRECOMPILE_HEADERS:BOOL=ON"
shared=""
;;
runpath)
use_runpath=" -DUSE_RUNPATH=ON"
shared=""
;;
lto)
use_lto=" -DWHOLE_PROG_OPTIM=ON"
shared=""
@ -373,7 +384,7 @@ for a in "${VARS[@]}"; do
done
# pass everything on to CMake
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\"${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi}${use_lto}${use_tests}${use_samples} ${FEATURES}"
CMDLINE="env ${ENVVARS} ${CMAKE_COMMAND} \"${srcdir}\" \"-DCMAKE_INSTALL_PREFIX=$prefix\"${buildtype}${pch_use}${silent_rules}${debug_loc}${use_openmp}${use_mpi}${use_lto}${use_runpath}${use_tests}${use_samples} ${FEATURES}"
echo --- calling CMake ---
echo ${CMDLINE}
eval exec ${CMDLINE}

2
debian/rules vendored
View File

@ -19,7 +19,7 @@ override_dh_auto_build:
dh_auto_build --buildsystem=cmake
override_dh_auto_configure:
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-core1 -DWHOLE_PROG_OPTIM=ON
dh_auto_configure --buildsystem=cmake -- -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=1 -DCMAKE_INSTALL_DOCDIR=share/doc/libopm-core1 -DWHOLE_PROG_OPTIM=ON -DUSE_RUNPATH=OFF
override_dh_auto_install:
dh_auto_install -- install-html

View File

@ -59,7 +59,7 @@ This package contains the applications for opm-core
%setup -q
%build
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DWHOLE_PROG_OPTIM=ON
cmake28 -DBUILD_SHARED_LIBS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_INSTALL_DOCDIR=share/doc/%{name}-%{version} -DWHOLE_PROG_OPTIM=ON -DUSE_RUNPATH=OFF
make
%install