Skip to contentSkip to conversation

cmake: Try and improve cleaning of builds when B==S

PATCH In review Richard Purdie 2 participants 2 messages Oct 24, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmake: Try and improve cleaning of builds when B==S

Currently if B==S for a cmake recipe, the build will not reconfigure. This patch adds code to remove the generated cmake files, meaning cmake will then be forced to regenerate them. This forces cmake to see configuration changes it may not otherwise see.

meta/classes/cmake.bbclass +2 -0
index 995ddf1..10f8f98 100644
@@ -79,6 +79,8 @@ cmake_do_configure() {
 		rm -rf ${B}
 		mkdir -p ${B}
 		cd ${B}
+	else
+		find ${B} -name CMakeFiles -or -name Makefile -or -name cmake_install.cmake -or -name CMakeCache.txt -delete	
 	fi
 
 	# Just like autotools cmake can use a site file to cache result that need generated binaries to run
#1 lore raw

Just a note it should be sufficient to delete the CMakeCache.txt file to force CMake to reconfigure. But deleting the rest doesn't hurt.

Pascal

Quoted 40 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Richard Purdie
Sent: Freitag, 24. Oktober 2014 16:20
To: openembedded-core
Subject: [OE-core] [PATCH] cmake: Try and improve cleaning of builds when B==S

Currently if B==S for a cmake recipe, the build will not reconfigure. This patch adds
code to remove the generated cmake files, meaning cmake will then be forced to regenerate
them. This forces cmake to see configuration changes it may not otherwise see.

meta/classes/cmake.bbclass +2 -0
index 995ddf1..10f8f98 100644
@@ -79,6 +79,8 @@ cmake_do_configure() {
 		rm -rf ${B}
 		mkdir -p ${B}
 		cd ${B}
+	else
+		find ${B} -name CMakeFiles -or -name Makefile -or -name

cmake_install.cmake -or -name CMakeCache.txt -delete

meta/classes/cmake.bbclass +0 -0
 	fi
 
 	# Just like autotools cmake can use a site file to cache result that

need generated binaries to run

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core