From owner-svn-ports-head@freebsd.org Wed Feb 10 11:21:32 2021 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 13D9D5437DE; Wed, 10 Feb 2021 11:21:32 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DbHQN06cCz3qSy; Wed, 10 Feb 2021 11:21:32 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EB0831D1C2; Wed, 10 Feb 2021 11:21:31 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 11ABLVts030462; Wed, 10 Feb 2021 11:21:31 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 11ABLVNe030460; Wed, 10 Feb 2021 11:21:31 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <202102101121.11ABLVNe030460@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Wed, 10 Feb 2021 11:21:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r564851 - in head/devel/cmake: . files X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: in head/devel/cmake: . files X-SVN-Commit-Revision: 564851 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Feb 2021 11:21:32 -0000 Author: adridg Date: Wed Feb 10 11:21:31 2021 New Revision: 564851 URL: https://svnweb.freebsd.org/changeset/ports/564851 Log: Backport a Fortran-with-CMake patch from CMake 3.20 This is already merged upstream and slated for 3.20, but is convenient to have in ports now (with CMake 3.19.4). It allows propagating CMAKE_EXE_LINKER_FLAGS into fortran-compatibility-tests in the face of post-CMake-3.10 policy settings. Patch from yuri@, only massaged to avoid having an octothorpe in a filename. PR: 253381 Submitted by: yuri@ Obtained from: upstream Added: head/devel/cmake/files/patch-cmake-issue-21408 (contents, props changed) Modified: head/devel/cmake/Makefile Modified: head/devel/cmake/Makefile ============================================================================== --- head/devel/cmake/Makefile Wed Feb 10 11:07:31 2021 (r564850) +++ head/devel/cmake/Makefile Wed Feb 10 11:21:31 2021 (r564851) @@ -4,6 +4,7 @@ PORTNAME= cmake # Remember to update devel/cmake-doc and devel/cmake-gui as well. DISTVERSION= 3.19.4 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= https://github.com/Kitware/CMake/releases/download/v${DISTVERSION}/ \ https://www.cmake.org/files/v${PORTVERSION}/ Added: head/devel/cmake/files/patch-cmake-issue-21408 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/cmake/files/patch-cmake-issue-21408 Wed Feb 10 11:21:31 2021 (r564851) @@ -0,0 +1,59 @@ +- Backport https://gitlab.kitware.com/cmake/cmake/-/merge_requests/5483/diffs?commit_id=15e77fbd40e324fd0be394a73ed94800bb47ad2e that is schedueled for 3.20 + +diff --git Modules/FortranCInterface.cmake Modules/FortranCInterface.cmake +index 547346ba90782d765cac860f755641cfb55b6dcf..733c7232c737e1c9a721124fc8a5465eaf872d91 100644 +--- Modules/FortranCInterface.cmake ++++ Modules/FortranCInterface.cmake +@@ -343,6 +343,13 @@ function(FortranCInterface_VERIFY) + set(_desc "Verifying Fortran/${lang} Compiler Compatibility") + message(CHECK_START "${_desc}") + ++ cmake_policy(GET CMP0056 _FortranCInterface_CMP0056) ++ if(_FortranCInterface_CMP0056 STREQUAL "NEW") ++ set(_FortranCInterface_EXE_LINKER_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}") ++ else() ++ set(_FortranCInterface_EXE_LINKER_FLAGS "") ++ endif() ++ + # Build a sample project which reports symbols. + set(CMAKE_TRY_COMPILE_CONFIGURATION Release) + try_compile(FortranCInterface_VERIFY_${lang}_COMPILED +@@ -358,6 +365,7 @@ function(FortranCInterface_VERIFY) + "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}" + "-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}" + "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}" ++ ${_FortranCInterface_EXE_LINKER_FLAGS} + OUTPUT_VARIABLE _output) + file(WRITE "${FortranCInterface_BINARY_DIR}/Verify${lang}/output.txt" "${_output}") + +diff --git Modules/FortranCInterface/Detect.cmake Modules/FortranCInterface/Detect.cmake +index c75067b32e4b7eeba1edf7d6bc6acc3798032dd7..998faf1eccf92f654f78ea66f2a34a8b05b5f991 100644 +--- Modules/FortranCInterface/Detect.cmake ++++ Modules/FortranCInterface/Detect.cmake +@@ -26,6 +26,14 @@ unset(FortranCInterface_VERIFIED_CXX CACHE) + + set(_result) + ++cmake_policy(GET CMP0056 _FortranCInterface_CMP0056) ++if(_FortranCInterface_CMP0056 STREQUAL "NEW") ++ set(_FortranCInterface_EXE_LINKER_FLAGS "-DCMAKE_EXE_LINKER_FLAGS:STRING=${CMAKE_EXE_LINKER_FLAGS}") ++else() ++ set(_FortranCInterface_EXE_LINKER_FLAGS "") ++endif() ++unset(_FortranCInterface_CMP0056) ++ + # Build a sample project which reports symbols. + set(CMAKE_TRY_COMPILE_CONFIGURATION Release) + try_compile(FortranCInterface_COMPILED +@@ -38,9 +46,11 @@ try_compile(FortranCInterface_COMPILED + "-DCMAKE_Fortran_FLAGS:STRING=${CMAKE_Fortran_FLAGS}" + "-DCMAKE_C_FLAGS_RELEASE:STRING=${CMAKE_C_FLAGS_RELEASE}" + "-DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE}" ++ ${_FortranCInterface_EXE_LINKER_FLAGS} + OUTPUT_VARIABLE FortranCInterface_OUTPUT) + set(FortranCInterface_COMPILED ${FortranCInterface_COMPILED}) + unset(FortranCInterface_COMPILED CACHE) ++unset(_FortranCInterface_EXE_LINKER_FLAGS) + + # Locate the sample project executable. + set(FortranCInterface_EXE)