Date: Sun, 27 Jun 2021 22:44:43 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 256783] Mk/Uses/cmake.mk: Some cmake ports builds twice Message-ID: <bug-256783-7788-xYmAbKls0S@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-256783-7788@https.bugs.freebsd.org/bugzilla/> References: <bug-256783-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256783 Adriaan de Groot <adridg@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adridg@freebsd.org Status|Open |In Progress --- Comment #2 from Adriaan de Groot <adridg@freebsd.org> --- To some extent this is expected: CMake (re-)links executables while install= ing. You can see that with these four files (CMakeLists.txt, main.c, tu.c, tv.c): ``` [adridg@beastie /tmp]$ cat CMakeLists.txt=20 cmake_minimum_required(VERSION 3.16 FATAL_ERROR) project(derp LANGUAGES C) add_executable(derp1 tu.c main.c) add_executable(derp2 tv.c main.c) install(TARGETS derp1 derp2 DESTINATION /tmp) [adridg@beastie /tmp]$ cat main.c extern int x; int main(int argc, char** argv) { return x * argc; } [adridg@beastie /tmp]$ cat tu.c int x =3D 0; [adridg@beastie /tmp]$ cat tv.c int x =3D 1; ``` With `make`, the objects are built, and the executables linked: ``` [adridg@beastie /tmp]$ make [ 16%] Building C object CMakeFiles/derp1.dir/tu.c.o [ 33%] Building C object CMakeFiles/derp1.dir/main.c.o [ 50%] Linking C executable derp1 [ 50%] Built target derp1 [ 66%] Building C object CMakeFiles/derp2.dir/tv.c.o [ 83%] Building C object CMakeFiles/derp2.dir/main.c.o [100%] Linking C executable derp2 [100%] Built target derp2 ``` And then `make install` (which is what staging does) does some re-compilati= on and re-linking: ``` [adridg@beastie /tmp]$ make install Consolidate compiler generated dependencies of target derp1 [ 50%] Built target derp1 Consolidate compiler generated dependencies of target derp2 [100%] Built target derp2 Install the project... -- Install configuration: "" ``` I built comms/svxlink and devel/cpp-hocon in poudriere just now, and while there is the expected consolidation / re-linking, I don't see the kind of rebuild you show in your log. I suspect time drift, frankly. --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256783-7788-xYmAbKls0S>