[cppad] test installed, instead of local, version of include files
Bradley M. Bell
bradbell at fedoraproject.org
Sat Jan 5 01:19:27 UTC 2013
commit 45c401c2204b4e1ce3cfaf3a3090f39e3c971a25
Author: Brad Bell <bradbell at seanet.com>
Date: Fri Jan 4 18:19:01 2013 -0700
test installed, instead of local, version of include files
cppad.spec | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/cppad.spec b/cppad.spec
index 32e5603..5492a87 100644
--- a/cppad.spec
+++ b/cppad.spec
@@ -65,8 +65,15 @@ as a single web page, in both HTML and XML, can be found at that web site.
%setup -q
includedir=%{buildroot}%{_includedir}
+# Replace cppad_SOURCE_DIR by the system include directory so that
+# installed files, instead of local files, are used for testing.
+sed \
+-e "s|\(INCLUDE_DIRECTORIES(\).*{cppad_SOURCE_DIR}|\1 SYSTEM $includedir|" \
+ -i.stamp CMakeLists.txt
+
# This patch should not longer be necessary when %%{version} >= 20130000.2
-sed -e '/TARGET_LINK_LIBRARIES/d' -i.stamp speed/example/CMakeLists.txt
+sed -e '/TARGET_LINK_LIBRARIES/d' \
+ -i.stamp speed/example/CMakeLists.txt
# change example/example.cpp to print out machine epsilon
cat << EOF > example.sed
@@ -92,9 +99,12 @@ make %{?_smp_mflags}
%install
rm -rf %{buildroot}
-make check
make install DESTDIR=%{buildroot}
+# use the installed include files to compile and run the tests
+%check
+make check
+
%clean
# cleanup
rm -rf %{buildroot}
More information about the scm-commits
mailing list