Add patches

This commit is contained in:
Nicolas Chauvet 2020-11-10 11:40:54 +01:00
parent 6307c3af8b
commit 599247ef07
6 changed files with 162 additions and 0 deletions

11
bcd-cuda.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.cuda bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.cuda 2020-11-07 09:54:42.794266240 +0100
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt 2020-11-07 09:55:28.803832009 +0100
@@ -79,7 +79,6 @@ SET(header_implementation_files
IF(CUDA_FOUND)
MESSAGE(STATUS "Using cuda's nvcc for generating ${target_name}")
- list(APPEND CUDA_NVCC_FLAGS "-arch=sm_20")
SET(src_files ${src_files} CudaHistogramDistance.cu)
SET(header_files
${header_files}

14
bcd-eigen3.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/include/bcd/core/DenoisingUnit.h.includes bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/include/bcd/core/DenoisingUnit.h
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/include/bcd/core/DenoisingUnit.h.includes 2018-06-10 17:18:29.000000000 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/include/bcd/core/DenoisingUnit.h 2020-10-22 19:12:47.365101082 +0200
@@ -18,8 +18,8 @@
#include "Chronometer.h"
#endif
-#include "Eigen/Eigenvalues"
-#include "Eigen/Dense"
+#include <Eigen/Eigenvalues>
+#include <Eigen/Dense>
#include <vector>
#include <array>

45
bcd-gcc.patch Normal file
View File

@ -0,0 +1,45 @@
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SpikeRemovalFilter.cpp.gcc bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SpikeRemovalFilter.cpp
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SpikeRemovalFilter.cpp.gcc 2018-06-10 17:18:29.000000000 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SpikeRemovalFilter.cpp 2020-10-22 19:10:56.427193789 +0200
@@ -6,6 +6,8 @@
// All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE.txt file.
+#include <math.h>
+
#include "SpikeRemovalFilter.h"
#include "DeepImage.h"
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp.gcc bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp.gcc 2018-06-10 17:18:29.000000000 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp 2020-10-22 19:20:26.824525139 +0200
@@ -9,6 +9,7 @@
#include "SamplesAccumulator.h"
#include "CovarianceMatrix.h"
+#include <math.h>
#include <cassert>
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp.gcc bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp.gcc 2020-10-22 19:21:45.980735052 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/SamplesAccumulator.cpp 2020-10-22 19:24:18.627211457 +0200
@@ -12,6 +12,7 @@
#include <math.h>
#include <cassert>
+#include <iomanip>
using namespace std;
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp.gcc bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp.gcc 2018-06-10 17:18:29.000000000 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp 2020-10-22 19:26:19.823001758 +0200
@@ -13,6 +13,7 @@
#include "json.hpp"
#include <iostream>
+#include <iomanip>
#include <fstream>
using namespace std;

12
bcd-json.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp.json bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp.json 2020-11-07 09:56:06.600477009 +0100
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/ParametersIO.cpp 2020-11-07 10:15:20.274749142 +0100
@@ -10,7 +10,7 @@
#include "Utils.h"
-#include "json.hpp"
+#include <json.hpp>
#include <iostream>
#include <iomanip>

67
bcd-links.patch Normal file
View File

@ -0,0 +1,67 @@
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.links bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.links 2020-10-22 20:25:28.604816544 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt 2020-10-22 20:25:56.806537995 +0200
@@ -87,10 +87,12 @@ IF(CUDA_FOUND)
${bcd_core_include_folder}/CudaUtils.h
)
CUDA_INCLUDE_DIRECTORIES(${bcd_core_include_folder}) # sadly, the TARGET_INCLUDE_DIRECTORIES a few lines below does not work with CUDA, see https://cmake.org/Bug/view.php?id=14201
- CUDA_ADD_LIBRARY(${target_name} ${src_files} ${header_files} ${header_implementation_files} STATIC)
+ CUDA_ADD_LIBRARY(${target_name} ${src_files} ${header_files} ${header_implementation_files} SHARED)
TARGET_COMPILE_DEFINITIONS(${target_name} PRIVATE FOUND_CUDA)
ELSE(CUDA_FOUND)
- ADD_LIBRARY(${target_name} STATIC ${src_files} ${header_files} ${header_implementation_files})
+ ADD_LIBRARY(${target_name} SHARED ${src_files} ${header_files} ${header_implementation_files})
+ set_property(TARGET ${target_name} PROPERTY VERSION "0.0.0")
+ set_property(TARGET ${target_name} PROPERTY SOVERSION 0 )
ENDIF(CUDA_FOUND)
diff -uNr bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b-orig/src/core/CMakeLists.txt
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt 2020-10-22 20:29:00.141727229 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b-orig/src/core/CMakeLists.txt 2020-10-22 20:25:56.806537995 +0200
@@ -100,7 +100,7 @@
if (OPENMP_FOUND)
TARGET_LINK_LIBRARIES(${target_name} PUBLIC OpenMP)
endif (OPENMP_FOUND)
-TARGET_LINK_LIBRARIES(${target_name} PRIVATE eigen)
+#TARGET_LINK_LIBRARIES(${target_name} PRIVATE eigen3)
INSTALL(TARGETS ${target_name} ARCHIVE DESTINATION lib)
diff -uNr bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/CMakeLists.txt bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b-orig/src/io/CMakeLists.txt
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/io/CMakeLists.txt 2018-06-10 17:18:29.000000000 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b-orig/src/io/CMakeLists.txt 2020-10-22 20:24:37.680319508 +0200
@@ -63,7 +63,10 @@
SET(header_implementation_files
)
-ADD_LIBRARY(${target_name} STATIC ${src_files} ${header_files} ${header_implementation_files})
+ADD_LIBRARY(${target_name} SHARED ${src_files} ${header_files} ${header_implementation_files})
+TARGET_LINK_LIBRARIES(${target_name} PRIVATE ${OPENEXR_LDFLAGS} -lIlmImf -lImath -lHalf -lIex -lIexMath -lIlmThread )
+set_property(TARGET ${target_name} PROPERTY VERSION "0.0.0")
+set_property(TARGET ${target_name} PROPERTY SOVERSION 0 )
TARGET_INCLUDE_DIRECTORIES(${target_name} PUBLIC "${bcd_include_folder}/io")
@@ -72,8 +72,8 @@
SET_TARGET_PROPERTIES(${target_name} PROPERTIES CXX_STANDARD 11)
TARGET_LINK_LIBRARIES(${target_name} PUBLIC ${lib_bcd_core})
-TARGET_LINK_LIBRARIES(${target_name} PRIVATE OpenExr)
-TARGET_LINK_LIBRARIES(${target_name} PRIVATE Json)
+TARGET_LINK_LIBRARIES(${target_name} PRIVATE ${OPENEXR_LDFLAGS})
+TARGET_LINK_LIBRARIES(${target_name} PRIVATE ${JSONCPP_LDFLAGS})
INSTALL(TARGETS ${target_name} ARCHIVE DESTINATION lib)
diff -up bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.links bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt
--- bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt.links 2020-10-22 21:40:35.896688115 +0200
+++ bcd-d94c9fa77c11afe7d04670d92b3930c417e19f4b/src/core/CMakeLists.txt 2020-10-22 21:43:26.791883540 +0200
@@ -104,6 +104,6 @@ TARGET_LINK_LIBRARIES(${target_name} PUB
endif (OPENMP_FOUND)
#TARGET_LINK_LIBRARIES(${target_name} PRIVATE eigen3)
-INSTALL(TARGETS ${target_name} ARCHIVE DESTINATION lib)
+INSTALL(TARGETS ${target_name} ARCHIVE DESTINATION lib${LIB_SUFFIX})

13
bcd-nodeps.patch Normal file
View File

@ -0,0 +1,13 @@
diff -up bcd/CMakeLists.txt.nodeps bcd/CMakeLists.txt
--- bcd/CMakeLists.txt.nodeps 2020-07-01 14:18:24.846606789 +0200
+++ bcd/CMakeLists.txt 2020-07-06 10:30:19.701861866 +0200
@@ -111,9 +111,6 @@ ENDIF(BCD_USE_CUDA)
SET(bcd_include_folder "${CMAKE_SOURCE_DIR}/include/bcd")
-#MESSAGE(STATUS "Entering subdirectory 'ext'")
-ADD_SUBDIRECTORY(ext)
-
#MESSAGE(STATUS "Entering subdirectory 'src'")
ADD_SUBDIRECTORY(src)