test installed, instead of local, version of include files
This commit is contained in:
parent
b98f8a6ed7
commit
45c401c220
1 changed files with 12 additions and 2 deletions
14
cppad.spec
14
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}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue