aboutsummaryrefslogtreecommitdiff
path: root/ports/ginkgo/cmake-fixes.patch
blob: dde1c46675e0997ef02d29a6816835e80bb82684 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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()