-
-
Notifications
You must be signed in to change notification settings - Fork 979
Closed
Description
When I have all the dependencies ready, and I run cmake the first time, it works, but then running it again breaks, because the patches are attempted to be applied again. I debugged this a little, but couldn't figure it all out. CPM and FetchContent are somewhere the blame. I found that:
- The patches are successfully applied, and the file
_deps/imgui-subbuild/imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patchis successfully touched. - Running again runs the patching command again (no idea why)
- The patch command does not use
-Nto allow for skipping already-applied patches. - Attempting to add
-Ndoesn't work becausepatchstill exits with code 1, which CMake considers a failure. - The
imgui-populate-patchfile that is created to mark the successful patching of files is seemingly not used to skip the patching next time.
CMake output:
-- CPM: Adding package [email protected] (5.0.3)
Enabling CAPSTONE_ARM_SUPPORT
Enabling CAPSTONE_ARM64_SUPPORT
Enabling CAPSTONE_M68K_SUPPORT
Enabling CAPSTONE_MIPS_SUPPORT
Enabling CAPSTONE_PPC_SUPPORT
Enabling CAPSTONE_SPARC_SUPPORT
Enabling CAPSTONE_SYSZ_SUPPORT
Enabling CAPSTONE_XCORE_SUPPORT
Enabling CAPSTONE_X86_SUPPORT
Enabling CAPSTONE_TMS320C64X_SUPPORT
Enabling CAPSTONE_M680X_SUPPORT
Enabling CAPSTONE_EVM_SUPPORT
Enabling CAPSTONE_MOS65XX_SUPPORT
Enabling CAPSTONE_WASM_SUPPORT
Enabling CAPSTONE_BPF_SUPPORT
Enabling CAPSTONE_RISCV_SUPPORT
Enabling CAPSTONE_SH_SUPPORT
Enabling CAPSTONE_TRICORE_SUPPORT
-- CPM: Adding package ImGui@10 (10fe2b67)
-- Populating imgui
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild
[0/7] Performing update step for 'imgui-populate'
[1/7] Performing patch step for 'imgui-populate'
patching file imconfig.h
Reversed (or previously applied) patch detected! Assume -R? [n]
Apply anyway? [n]
Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file imconfig.h.rej
FAILED: imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild/imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch
cd /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-src && /usr/bin/patch -p1 < /home/martijn/zec/3rd/tracy/cmake/imgui-emscripten.patch && /usr/bin/patch -p1 < /home/martijn/zec/3rd/tracy/cmake/imgui-loader.patch && /usr/bin/cmake -E touch /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild/imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch
ninja: build stopped: subcommand failed.
CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for imgui failed: 1
Call Stack (most recent call first):
/usr/share/cmake/Modules/FetchContent.cmake:1703 (__FetchContent_directPopulate)
/home/martijn/zec/3rd/tracy/cmake/CPM.cmake:1106 (FetchContent_Populate)
/home/martijn/zec/3rd/tracy/cmake/CPM.cmake:895 (cpm_fetch_package)
/home/martijn/zec/3rd/tracy/cmake/vendor.cmake:146 (CPMAddPackage)
CMakeLists.txt:26 (include)
-- Configuring incomplete, errors occurred!
With -N added in CPM:
~/zec/3rd/tracy/profiler/build master* ⇡ 17s
❯ cmake -DCMAKE_BUILD_TYPE=Release -DGTK_FILESELECTOR=OFF -G Ninja ..
Parsing public/common/TracyVersion.hpp file
VERSION 0.11.2
-- CPM: Adding package [email protected] (5.0.3)
Enabling CAPSTONE_ARM_SUPPORT
Enabling CAPSTONE_ARM64_SUPPORT
Enabling CAPSTONE_M68K_SUPPORT
Enabling CAPSTONE_MIPS_SUPPORT
Enabling CAPSTONE_PPC_SUPPORT
Enabling CAPSTONE_SPARC_SUPPORT
Enabling CAPSTONE_SYSZ_SUPPORT
Enabling CAPSTONE_XCORE_SUPPORT
Enabling CAPSTONE_X86_SUPPORT
Enabling CAPSTONE_TMS320C64X_SUPPORT
Enabling CAPSTONE_M680X_SUPPORT
Enabling CAPSTONE_EVM_SUPPORT
Enabling CAPSTONE_MOS65XX_SUPPORT
Enabling CAPSTONE_WASM_SUPPORT
Enabling CAPSTONE_BPF_SUPPORT
Enabling CAPSTONE_RISCV_SUPPORT
Enabling CAPSTONE_SH_SUPPORT
Enabling CAPSTONE_TRICORE_SUPPORT
-- CPM: Adding package ImGui@10 (10fe2b67)
-- Populating imgui
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild
[0/7] Performing update step for 'imgui-populate'
[1/7] Performing patch step for 'imgui-populate'
patching file imconfig.h
Reversed (or previously applied) patch detected! Skipping patch.
1 out of 1 hunk ignored -- saving rejects to file imconfig.h.rej
FAILED: imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild/imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch
cd /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-src && /usr/bin/patch -N -p1 -i /home/martijn/zec/3rd/tracy/cmake/imgui-emscripten.patch && /usr/bin/patch -N -p1 -i /home/martijn/zec/3rd/tracy/cmake/imgui-loader.patch && /usr/bin/cmake -E touch /home/martijn/zec/3rd/tracy/profiler/build/_deps/imgui-subbuild/imgui-populate-prefix/src/imgui-populate-stamp/imgui-populate-patch
ninja: build stopped: subcommand failed.
CMake Error at /usr/share/cmake/Modules/FetchContent.cmake:1679 (message):
Build step for imgui failed: 1
Call Stack (most recent call first):
/usr/share/cmake/Modules/FetchContent.cmake:1703 (__FetchContent_directPopulate)
/home/martijn/zec/3rd/tracy/cmake/CPM.cmake:1106 (FetchContent_Populate)
/home/martijn/zec/3rd/tracy/cmake/CPM.cmake:895 (cpm_fetch_package)
/home/martijn/zec/3rd/tracy/cmake/vendor.cmake:146 (CPMAddPackage)
CMakeLists.txt:26 (include)
-- Configuring incomplete, errors occurred!
~/zec/3rd/tracy/profiler/build master* ⇡
Metadata
Metadata
Assignees
Labels
No labels