convert from using auto-tools to cmake28
This commit is contained in:
parent
d1aec32358
commit
bb0f6f5002
1 changed files with 18 additions and 18 deletions
36
cppad.spec
36
cppad.spec
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
Name: cppad
|
||||
Version: 20140000.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: C++ Algorithmic Differentiation (AD), %{name}-devel and %{name}-doc
|
||||
|
||||
# Only noarch.rpms provided.
|
||||
|
|
@ -21,6 +21,7 @@ License: GPLv3
|
|||
URL: http://www.coin-or.org/CppAD/
|
||||
Source: http://www.coin-or.org/download/source/CppAD/%{name}-%{version}.gpl.tgz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildRequires: cmake28
|
||||
|
||||
%description
|
||||
C++ Algorithmic Differentiation (AD), see %{name}-devel, %{name}-doc.
|
||||
|
|
@ -62,17 +63,13 @@ as a single web page, in both HTML and XML, can be found at that web site.
|
|||
|
||||
%setup -q
|
||||
|
||||
# We will replace top_srcdir by the system include directory so that
|
||||
# Replace cppad_SOURCE_DIR by the system include directory so that
|
||||
# installed files, instead of local files, are used for testing.
|
||||
# (Note next line generates rpm-buildroot-usage warning from rpmlint.)
|
||||
includedir=%{buildroot}%{_includedir}
|
||||
for file in `find . -name 'makefile.in'`
|
||||
do
|
||||
if ! (echo $file | grep 'speed/src/makefile.in' > /dev/null)
|
||||
then
|
||||
sed -e "s|-I\$(top_srcdir)\([^/]\)|-I$includedir\1|" -i "$file"
|
||||
fi
|
||||
done
|
||||
sed \
|
||||
-e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \
|
||||
-i.stamp CMakeLists.txt
|
||||
|
||||
# change example/example.cpp to print out machine epsilon
|
||||
cat << EOF > example.sed
|
||||
|
|
@ -86,15 +83,14 @@ int main(void)\\
|
|||
EOF
|
||||
sed -i.stamp example/example.cpp -f example.sed
|
||||
|
||||
# See https://bugzilla.redhat.com/show_bug.cgi?id=896116
|
||||
# for why we are using auto-tools instead of cmake.
|
||||
# See https://fedoraproject.org/wiki/Packaging:Cmake?rd=Packaging/cmake
|
||||
# for suggestions on using cmake.
|
||||
%build
|
||||
./configure \
|
||||
--prefix='/usr' \
|
||||
CXX_FLAGS='-Wall -ansi -pedantic-errors -std=c++98' \
|
||||
OPENMP_FLAGS='-fopenmp' \
|
||||
--with-sparse_list \
|
||||
--with-Documentation
|
||||
%cmake28 \
|
||||
-D CMAKE_VERBOSE_MAKEFILE=0 \
|
||||
-D cppad_documentation=YES \
|
||||
-D cppad_cxx_flags='-Wall -ansi -pedantic-errors -std=c++98 -Wshadow' \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
|
|
@ -104,7 +100,7 @@ make install DESTDIR=%{buildroot}
|
|||
|
||||
# use the installed include files to compile and run the tests
|
||||
%check
|
||||
make test
|
||||
make check
|
||||
|
||||
%clean
|
||||
# cleanup
|
||||
|
|
@ -122,6 +118,10 @@ rm -rf %{buildroot}
|
|||
|
||||
# ----------------------------------------------------------------------------
|
||||
%changelog
|
||||
* Wed Mar 05 2014 Brad Bell <bradbell at seanet dot com> - 20140000.2-2
|
||||
- Swith to using cmake28 as suggest in Comment 3 on
|
||||
- https://bugzilla.redhat.com/show_bug.cgi?id=896116#c3
|
||||
|
||||
* Fri Jan 31 2014 Brad Bell <bradbell at seanet dot com> - 20140000.2-1
|
||||
- Advance to version 2014 of cppad.
|
||||
- Add link to bug report about cmake not working on el6
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue