fixup_bundle issue with msys2 because compiler test executables not deleted
I'm having an issue with a sample application and fixup_bundle using msys2 and the "MSYS Makefiles" generator. When runnning fixup_bundle it seems to say that some dependencies were not copied, and somehow tries to fixup executables that are not in my cmakelists.txt (nor in the fixup_bundle arguments)
From what I'm seeing in BundleUtilities.cmake, it tries to list all the executables of the bundle, and detects the compiler ID executables (which used to be removed after generation ? Not sure). I'm using the fixup_bundle on an executable still in the build directory (mainly to fix the visual studio missing dlls when debugging). If I delete CMakeFiles/3.9.0/CompilerIdC/a.exe a,d CMakeFiles/3.9.0/CompilerIdCXX/a.exe it works perfectly fine.
A quick fix would perhaps be to add "a.exe" to the IGNORE_ITEM parameter but I'm not sure if it's the proper way to do it
The log :
-- fixup_bundle
-- app='D:/Perso/boilerplate/buildmsys/BoilerPlate.exe'
-- libs=''
-- dirs=''
-- ignoreItems=''
-- fixup_bundle: preparing...
-- fixup_bundle: copying...
-- 1/10: *NOT* copying 'D:/Perso/boilerplate/buildmsys/BoilerPlate.exe'
-- 2/10: copying 'D:/Perso/boilerplate/buildmsys/msys-2.0.dll'
-- warning: resolved_item == resolved_embedded_item - not copying...
-- 3/10: copying 'D:/Perso/boilerplate/buildmsys/msys-gcc_s-seh-1.dll'
-- warning: resolved_item == resolved_embedded_item - not copying...
-- 4/10: copying 'D:/Perso/boilerplate/buildmsys/msys-stdc++-6.dll'
-- warning: resolved_item == resolved_embedded_item - not copying...
-- 5/10: *NOT* copying 'D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdC/a.exe'
-- fixup_bundle: fixing...
-- 6/10: fix-up not required on this platform 'D:/Perso/boilerplate/buildmsys/BoilerPlate.exe'
-- 7/10: fix-up not required on this platform 'D:/Perso/boilerplate/buildmsys/msys-2.0.dll'
-- 8/10: fix-up not required on this platform 'D:/Perso/boilerplate/buildmsys/msys-gcc_s-seh-1.dll'
-- 9/10: fix-up not required on this platform 'D:/Perso/boilerplate/buildmsys/msys-stdc++-6.dll'
-- 10/10: fix-up not required on this platform 'D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdC/a.exe'
-- fixup_bundle: cleaning up...
-- fixup_bundle: verifying...
-- ===========================================================================
-- Analyzing app='D:/Perso/boilerplate/buildmsys/BoilerPlate.exe'
-- bundle='D:/Perso/boilerplate/buildmsys'
-- executable='D:/Perso/boilerplate/buildmsys/BoilerPlate.exe'
-- valid='1'
-- executable file 1: D:/Perso/boilerplate/buildmsys/BoilerPlate.exe
-- executable file 2: D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdC/a.exe
-- executable file 3: D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdCXX/a.exe
-- verified='0'
-- info='external prerequisites found:
f='D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdC/a.exe'
external_prereqs='msys-2.0.dll'
;external prerequisites found:
f='D:/Perso/boilerplate/buildmsys/CMakeFiles/3.9.0/CompilerIdCXX/a.exe'
external_prereqs='msys-2.0.dll'
'
--
CMake Error at C:/Program Files/CMake/share/cmake-3.9/Modules/BundleUtilities.cmake:1106 (message):
error: verify_app failed
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.9/Modules/BundleUtilities.cmake:964 (verify_app)
D:/Perso/boilerplate/cmake/RunFixupBundle.cmake:13 (fixup_bundle)
Test project is available here :
https://github.com/Lectem/cpp-boilerplate
Configured with :
cmake -G"MinGW Makefiles" -DENABLE_LTO=FALSE ..
CMake version
cmake version 3.9.0 Thanks