[SCM] ViennaCL packaging branch, master, updated. debian/1.2.0-1-23-gcc71e86
Michael Wild
themiwi at users.sourceforge.net
Wed May 30 06:53:54 UTC 2012
The following commit has been merged in the master branch:
commit 3456f0e24e83fec3fc78f7d6bd16ef4b8eff6e4f
Author: Michael Wild <themiwi at users.sourceforge.net>
Date: Tue May 29 16:53:22 2012 +0200
Add 0003-Generate-kernel-sources-in-build-tree.patch
Signed-off-by: Michael Wild <themiwi at users.sourceforge.net>
diff --git a/debian/patches/0003-Generate-kernel-sources-in-build-tree.patch b/debian/patches/0003-Generate-kernel-sources-in-build-tree.patch
new file mode 100644
index 0000000..279d7bc
--- /dev/null
+++ b/debian/patches/0003-Generate-kernel-sources-in-build-tree.patch
@@ -0,0 +1,81 @@
+From: Michael Wild <themiwi at users.sourceforge.net>
+Date: Tue, 29 May 2012 16:50:26 +0200
+Subject: Generate kernel sources in build tree
+
+To avoid polluting the source tree. Might need further changes for the
+generation of the "pre-compiled" package, but this is not required for
+the packaging in Debian.
+
+Bug: https://sourceforge.net/tracker/?func=detail&aid=3530554&group_id=322140&atid=1353702
+Forwarded: https://sourceforge.net/tracker/download.php?group_id=322140&atid=1353702&file_id=444794&aid=3530554
+Signed-off-by: Michael Wild <themiwi at users.sourceforge.net>
+---
+ CMakeLists.txt | 2 +-
+ auxiliary/CMakeLists.txt | 7 ++++---
+ auxiliary/converter.cpp | 4 ++--
+ 3 files changed, 7 insertions(+), 6 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 6011ec2..12277ec 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -88,6 +88,6 @@ add_subdirectory(doc)
+ # Install
+ #########
+
+-install(DIRECTORY viennacl
++install(DIRECTORY viennacl ${CMAKE_CURRENT_BINARY_DIR}/viennacl
+ DESTINATION ${INSTALL_INCLUDE_DIR} COMPONENT dev
+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
+diff --git a/auxiliary/CMakeLists.txt b/auxiliary/CMakeLists.txt
+index 662eb98..230a490 100644
+--- a/auxiliary/CMakeLists.txt
++++ b/auxiliary/CMakeLists.txt
+@@ -296,7 +296,8 @@ foreach(f IN LISTS COMPRESSED_MATRIX_SRCS COORDINATE_MATRIX_SRCS ELL_MATRIX_SRCS
+ endforeach()
+ list(APPEND CL_SRCS ${MATRIX_PROD_SRCS} ${MATRIX_SOLVE_SRCS})
+
+-add_executable(converter converter.cpp)
++configure_file(converter.cpp ${CMAKE_CURRENT_BINARY_DIR}/converter.cpp @ONLY)
++add_executable(converter ${CMAKE_CURRENT_BINARY_DIR}/converter.cpp)
+ target_link_libraries(converter ${Boost_LIBRARIES})
+
+ set(KERNEL_HDRS)
+@@ -327,12 +328,12 @@ foreach(d
+ spai
+ nmf
+ )
+- set(f "${PROJECT_SOURCE_DIR}/viennacl/linalg/kernels/${d}")
++ set(f "${PROJECT_BINARY_DIR}/viennacl/linalg/kernels/${d}")
+ list(APPEND KERNEL_HDRS "${f}_kernels.h")
+ list(APPEND KERNEL_SRCS "${f}_source.h")
+ endforeach()
+
+-file(MAKE_DIRECTORY "${PROJECT_SOURCE_DIR}/viennacl/linalg/kernels")
++file(MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/viennacl/linalg/kernels")
+
+ add_custom_command(OUTPUT ${KERNEL_HDRS} ${KERNEL_SRCS}
+ COMMAND converter
+diff --git a/auxiliary/converter.cpp b/auxiliary/converter.cpp
+index 03f624c..feab31f 100644
+--- a/auxiliary/converter.cpp
++++ b/auxiliary/converter.cpp
+@@ -53,7 +53,7 @@ void createSourceFile(const char * dirname)
+ {
+ //Step 1: Open source file
+ std::string header_name(dirname);
+- std::ofstream source_file(("../../viennacl/linalg/kernels/" + header_name + "_source.h").c_str());
++ std::ofstream source_file(("@PROJECT_BINARY_DIR@/viennacl/linalg/kernels/" + header_name + "_source.h").c_str());
+
+ //Step 2: Write source header file preamble
+ std::string dirname_uppercase(dirname);
+@@ -261,7 +261,7 @@ void createKernelFile(const char * dirname)
+ {
+ //Step 1: Open kernel file
+ std::string header_name(dirname);
+- std::ofstream kernel_file(("../../viennacl/linalg/kernels/" + header_name + "_kernels.h").c_str());
++ std::ofstream kernel_file(("@PROJECT_BINARY_DIR@/viennacl/linalg/kernels/" + header_name + "_kernels.h").c_str());
+
+ //Step 2: Write kernel header file preamble
+ std::string dirname_uppercase(dirname);
+--
diff --git a/debian/patches/series b/debian/patches/series
index 5157109..f1539c7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-Add-virtual-dtor-to-abstract-result_of-class.patch
0002-Fix-declaration-order-of-prod_impl-trans_prod_impl.patch
+0003-Generate-kernel-sources-in-build-tree.patch
--
ViennaCL packaging
More information about the debian-science-commits
mailing list