aboutsummaryrefslogtreecommitdiff
path: root/ports/ginkgo/cmake-fixes.patch
diff options
context:
space:
mode:
authorTobias Ribizel <ribizel@kit.edu>2021-03-29 18:52:37 +0200
committerGitHub <noreply@github.com>2021-03-29 09:52:37 -0700
commit286fa50cbdc2854e4a6c626e811cbb701833765d (patch)
treef48101faa498d992283d3da0a2813f5756032dc0 /ports/ginkgo/cmake-fixes.patch
parent2980294114179299de1794e230187e98785d858d (diff)
downloadvcpkg-286fa50cbdc2854e4a6c626e811cbb701833765d.tar.gz
vcpkg-286fa50cbdc2854e4a6c626e811cbb701833765d.zip
[ginkgo] Create new port (#16536)
* [ginkgo] create new port * [ginkgo] add description for feature requirements * Update baseline version * [ginkgo] Minimize patches Co-authored-by: PhoebeHui <20694052+PhoebeHui@users.noreply.github.com> Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Diffstat (limited to 'ports/ginkgo/cmake-fixes.patch')
-rw-r--r--ports/ginkgo/cmake-fixes.patch86
1 files changed, 86 insertions, 0 deletions
diff --git a/ports/ginkgo/cmake-fixes.patch b/ports/ginkgo/cmake-fixes.patch
new file mode 100644
index 000000000..dde1c4667
--- /dev/null
+++ b/ports/ginkgo/cmake-fixes.patch
@@ -0,0 +1,86 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e75f7d6..63685f2 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -20,6 +20,12 @@ include(cmake/hip_path.cmake)
+ include(cmake/autodetect_executors.cmake)
+ include(cmake/build_type_helpers.cmake)
+
++if (MSVC)
++ add_compile_options(/bigobj)
++elseif (MINGW OR CYGWIN)
++ add_compile_options("-Wa,-mbig-obj")
++endif()
++
+ # Ginkgo configuration options
+ option(GINKGO_DEVEL_TOOLS "Add development tools to the build system" OFF)
+ option(GINKGO_BUILD_TESTS "Generate build files for unit tests" ON)
+diff --git a/cmake/GinkgoConfig.cmake.in b/cmake/GinkgoConfig.cmake.in
+index 0348f95..3b8be0f 100644
+--- a/cmake/GinkgoConfig.cmake.in
++++ b/cmake/GinkgoConfig.cmake.in
+@@ -129,8 +129,6 @@ set(GINKGO_OPENMP_LIBRARIES @OpenMP_CXX_LIBRARIES@)
+ set(GINKGO_OPENMP_FLAGS "@OpenMP_CXX_FLAGS@")
+
+ # Provide useful HIP helper functions
+-include(${CMAKE_CURRENT_LIST_DIR}/hip_helpers.cmake)
+-include(${CMAKE_CURRENT_LIST_DIR}/windows_helpers.cmake)
+
+ # NOTE: we do not export benchmarks, examples, tests or devel tools
+ # so `third_party` libraries are currently unneeded.
+diff --git a/cmake/install_helpers.cmake b/cmake/install_helpers.cmake
+index ba7ea3f..7cc3ba8 100644
+--- a/cmake/install_helpers.cmake
++++ b/cmake/install_helpers.cmake
+@@ -14,16 +14,11 @@ function(ginkgo_install_library name subdir)
+ # dll is considered as runtime
+ install(TARGETS "${name}"
+ EXPORT Ginkgo
+- LIBRARY DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
+- ARCHIVE DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
+- RUNTIME DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
+ )
+ else ()
+ # install .so and .a files
+ install(TARGETS "${name}"
+ EXPORT Ginkgo
+- LIBRARY DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
+- ARCHIVE DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
+ )
+ endif ()
+ endfunction()
+@@ -37,9 +32,8 @@ function(ginkgo_install)
+ DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}"
+ FILES_MATCHING PATTERN "*.hpp"
+ )
+- install(DIRECTORY "${Ginkgo_BINARY_DIR}/include/"
+- DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}"
+- FILES_MATCHING PATTERN "*.hpp"
++ install(FILES "${Ginkgo_BINARY_DIR}/include/ginkgo/config.hpp"
++ DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}/ginkgo"
+ )
+ if (GINKGO_HAVE_PAPI_SDE)
+ install(FILES "${Ginkgo_SOURCE_DIR}/third_party/papi_sde/papi_sde_interface.h"
+@@ -70,8 +64,6 @@ function(ginkgo_install)
+ install(FILES
+ "${Ginkgo_BINARY_DIR}/GinkgoConfig.cmake"
+ "${Ginkgo_BINARY_DIR}/GinkgoConfigVersion.cmake"
+- "${Ginkgo_SOURCE_DIR}/cmake/hip_helpers.cmake"
+- "${Ginkgo_SOURCE_DIR}/cmake/windows_helpers.cmake"
+ DESTINATION "${GINKGO_INSTALL_CONFIG_DIR}"
+ )
+ install(EXPORT Ginkgo
+diff --git a/cmake/windows_helpers.cmake b/cmake/windows_helpers.cmake
+index 5f517a5..46d31ba 100644
+--- a/cmake/windows_helpers.cmake
++++ b/cmake/windows_helpers.cmake
+@@ -14,9 +14,7 @@ function(ginkgo_switch_windows_link lang from to)
+ endfunction()
+
+ macro(ginkgo_switch_to_windows_static lang)
+- ginkgo_switch_windows_link(${lang} "MD" "MT")
+ endmacro()
+
+ macro(ginkgo_switch_to_windows_dynamic lang)
+- ginkgo_switch_windows_link(${lang} "MT" "MD")
+ endmacro()