View | Details | Raw Unified | Return to bug 253381
Collapse All | Expand All

(-)devel/cmake/Makefile (+1 lines)
Lines 4-9 Link Here
4
PORTNAME=	cmake
4
PORTNAME=	cmake
5
# Remember to update devel/cmake-doc and devel/cmake-gui as well.
5
# Remember to update devel/cmake-doc and devel/cmake-gui as well.
6
DISTVERSION=	3.19.4
6
DISTVERSION=	3.19.4
7
PORTREVISION=	1
7
CATEGORIES=	devel
8
CATEGORIES=	devel
8
MASTER_SITES=	https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \
9
MASTER_SITES=	https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \
9
		https://www.cmake.org/files/v${PORTVERSION}/
10
		https://www.cmake.org/files/v${PORTVERSION}/
(-)devel/cmake/files/patch-cmake-issue#21408 (+59 lines)
Line 0 Link Here
1
- Backport https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5483/diffs?commit_id=15e77fbd40e324fd0be394a73ed94800bb47ad2e that is schedueled for 3.20
2
3
diff --git Modules/FortranCInterface.cmake Modules/FortranCInterface.cmake
4
index 547346ba90782d765cac860f755641cfb55b6dcf..733c7232c737e1c9a721124fc8a5465eaf872d91 100644
5
--- Modules/FortranCInterface.cmake
6
+++ Modules/FortranCInterface.cmake
7
@@ -343,6 +343,13 @@ function(FortranCInterface_VERIFY)
8
     set(_desc "Verifying Fortran/${lang} Compiler Compatibility")
9
     message(CHECK_START "${_desc}")
10
 
11
+    cmake_policy(GET CMP0056 _FortranCInterface_CMP0056)
12
+    if(_FortranCInterface_CMP0056 STREQUAL "NEW")
13
+      set(_FortranCInterface_EXE_LINKER_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}")
14
+    else()
15
+      set(_FortranCInterface_EXE_LINKER_FLAGS "")
16
+    endif()
17
+
18
     # Build a sample project which reports symbols.
19
     set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
20
     try_compile(FortranCInterface_VERIFY_${lang}_COMPILED
21
@@ -358,6 +365,7 @@ function(FortranCInterface_VERIFY)
22
                  "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}"
23
                  "-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}"
24
                  "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}"
25
+                 ${_FortranCInterface_EXE_LINKER_FLAGS}
26
       OUTPUT_VARIABLE _output)
27
     file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}")
28
 
29
diff --git Modules/FortranCInterface/Detect.cmake Modules/FortranCInterface/Detect.cmake
30
index c75067b32e4b7eeba1edf7d6bc6acc3798032dd7..998faf1eccf92f654f78ea66f2a34a8b05b5f991 100644
31
--- Modules/FortranCInterface/Detect.cmake
32
+++ Modules/FortranCInterface/Detect.cmake
33
@@ -26,6 +26,14 @@ unset(FortranCInterface_VERIFIED_CXX CACHE)
34
 
35
 set(_result)
36
 
37
+cmake_policy(GET CMP0056 _FortranCInterface_CMP0056)
38
+if(_FortranCInterface_CMP0056 STREQUAL "NEW")
39
+  set(_FortranCInterface_EXE_LINKER_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}")
40
+else()
41
+  set(_FortranCInterface_EXE_LINKER_FLAGS "")
42
+endif()
43
+unset(_FortranCInterface_CMP0056)
44
+
45
 # Build a sample project which reports symbols.
46
 set(CMAKE_TRY_COMPILE_CONFIGURATION Release)
47
 try_compile(FortranCInterface_COMPILED
48
@@ -38,9 +46,11 @@ try_compile(FortranCInterface_COMPILED
49
     "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}"
50
     "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}"
51
     "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}"
52
+    ${_FortranCInterface_EXE_LINKER_FLAGS}
53
   OUTPUT_VARIABLE FortranCInterface_OUTPUT)
54
 set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED})
55
 unset(FortranCInterface_COMPILED CACHE)
56
+unset(_FortranCInterface_EXE_LINKER_FLAGS)
57
 
58
 # Locate the sample project executable.
59
 set(FortranCInterface_EXE)

Return to bug 253381