diff options
author | Stephen McDowell <svenevs@users.noreply.github.com> | 2018-09-14 17:01:58 -0700 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2018-09-14 17:01:58 -0700 |
commit | 4c414135504d4ad24b55a1af3a6e80d3732e1c6d (patch) | |
tree | 3848151678ee19ebf3ea886248398253178c63ae | |
parent | 055b0a442c5775d460dba8fdfb0f22b1375f7ea4 (diff) | |
download | spack-4c414135504d4ad24b55a1af3a6e80d3732e1c6d.tar.gz spack-4c414135504d4ad24b55a1af3a6e80d3732e1c6d.tar.bz2 spack-4c414135504d4ad24b55a1af3a6e80d3732e1c6d.tar.xz spack-4c414135504d4ad24b55a1af3a6e80d3732e1c6d.zip |
patch flann // gcc // cmake@3.11+ (#9214)
See: https://github.com/mariusmuja/flann/issues/369
-rw-r--r-- | var/spack/repos/builtin/packages/flann/linux-gcc-cmakev3.11-plus.patch | 24 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/flann/package.py | 3 |
2 files changed, 27 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/flann/linux-gcc-cmakev3.11-plus.patch b/var/spack/repos/builtin/packages/flann/linux-gcc-cmakev3.11-plus.patch new file mode 100644 index 0000000000..d8a7dbd0d2 --- /dev/null +++ b/var/spack/repos/builtin/packages/flann/linux-gcc-cmakev3.11-plus.patch @@ -0,0 +1,24 @@ +--- a/src/cpp/CMakeLists.txt ++++ b/src/cpp/CMakeLists.txt +@@ -29,7 +29,7 @@ if (BUILD_CUDA_LIB) + endif() + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann_cpp SHARED "") ++ add_library(flann_cpp SHARED "empty.cpp") + set_target_properties(flann_cpp PROPERTIES LINKER_LANGUAGE CXX) + target_link_libraries(flann_cpp -Wl,-whole-archive flann_cpp_s -Wl,-no-whole-archive) + +@@ -83,7 +83,7 @@ if (BUILD_C_BINDINGS) + set_property(TARGET flann_s PROPERTY COMPILE_DEFINITIONS FLANN_STATIC) + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_COMPILER_IS_GNUCC) +- add_library(flann SHARED "") ++ add_library(flann SHARED "empty.cpp") + set_target_properties(flann PROPERTIES LINKER_LANGUAGE CXX) + target_link_libraries(flann -Wl,-whole-archive flann_s -Wl,-no-whole-archive) + else() +--- /dev/null ++++ b/src/cpp/empty.cpp +@@ -0,0 +1 @@ ++/* empty */ diff --git a/var/spack/repos/builtin/packages/flann/package.py b/var/spack/repos/builtin/packages/flann/package.py index 4e817b109b..52441401fc 100644 --- a/var/spack/repos/builtin/packages/flann/package.py +++ b/var/spack/repos/builtin/packages/flann/package.py @@ -95,6 +95,9 @@ class Flann(CMakePackage): depends_on('hdf5', type='test') depends_on('gtest', type='test') + # See: https://github.com/mariusmuja/flann/issues/369 + patch('linux-gcc-cmakev3.11-plus.patch', when='%gcc^cmake@3.11:') + def patch(self): # Fix up the python setup.py call inside the install(CODE filter_file("setup.py install", |