Date: Thu, 24 Nov 2022 18:24:40 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 267971] devel/cmake-core: cmake doesn't respect PATH when it resolves CMAKE_CXX_COMPILER for g++11 Message-ID: <bug-267971-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D267971 Bug ID: 267971 Summary: devel/cmake-core: cmake doesn't respect PATH when it resolves CMAKE_CXX_COMPILER for g++11 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: kde@FreeBSD.org Reporter: yuri@freebsd.org Assignee: kde@FreeBSD.org Flags: maintainer-feedback?(kde@FreeBSD.org) Created attachment 238311 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D238311&action= =3Dedit cmake-PATH.shar Please consider that both c++ and g++11 are not in /usr/local/bin, but inst= ead they are in /usr/local/libexec/ccache, which is placed first in PATH. When cmake is called with -DCMAKE_CXX_COMPILER=3Dg++11 and the CMAKE_PREFIX_PATH=3D"/usr/local" environment variable is set - CMAKE_CXX_CO= MPILER ends up being /usr/local/bin/g++11 regardless of PATH. But if in the above invocation g++11 is replaced with c++ - CMAKE_CXX_COMPI= LER is resolved through PATH as it should be. The attached program demonstrates this problem. Execute run.sh from the attached shar archive. It has 2 sections, GOOD and = BAD. BAD section has CMAKE_PREFIX_PATH=3D"/usr/local" and it shows that CMAKE_CXX_COMPILER=3D/usr/local/bin/g++11 If you would replaces g++11 with c++ - this problem would go away. This problem prevents CCACHE from working for projects that use GCC. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-267971-7788>