From 45c401c2204b4e1ce3cfaf3a3090f39e3c971a25 Mon Sep 17 00:00:00 2001 From: Brad Bell Date: Fri, 4 Jan 2013 18:19:01 -0700 Subject: [PATCH] test installed, instead of local, version of include files --- cppad.spec | 14 ++++++++++++-- 1 file 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}