Modernize CMake build system with target-based dependencies and FetchContent fallback#5
Open
Modernize CMake build system with target-based dependencies and FetchContent fallback#5
Conversation
…Content fallback Co-authored-by: hdclark <934858+hdclark@users.noreply.github.com>
…d fix MEMORY_CONSTRAINED_BUILD Co-authored-by: hdclark <934858+hdclark@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor CMake files to modern idiomatic style
Modernize CMake build system with target-based dependencies and FetchContent fallback
Jan 31, 2026
Owner
|
@copilot please review this pull request |
Author
I've performed a self-review of this PR. Here's a summary: Verified working:
Key changes:
Areas to verify:
Build verified in commit df91603. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The CMakeLists.txt had accumulated complexity from platform-specific workarounds and used legacy CMake patterns (global variables,
FILE(GLOB),include_directories()). This refactors to modern, idiomatic CMake 3.16+.Core Changes
Ygor::CompileOptionsandYgor::SanitizerOptionsINTERFACE librariesYgor::ygorexports include paths and links, downstream projects justtarget_link_libraries(app PRIVATE Ygor::ygor)FETCHCONTENT_FALLBACK)CMake Package Export
Installed library now provides proper CMake package config:
Cross-Compilation Support
Added toolchain files in
cmake/toolchains/:mingw-w64-x86_64.cmake- Windowsmacos-x86_64.cmake- macOS via osxcrossaarch64-linux-gnu.cmake/armv7-linux-gnueabihf.cmake- ARMmusl-linux.cmake- Alpine/embeddedOther Improvements
FILE(GLOB)MEMORY_CONSTRAINED_BUILDto preserve Debug assertionsWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
gitlab.com/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED s-through=-lgcc_/home/REDACTED/work/Ygor/Ygor/src s-th�� d/src --local /x86_64-linux-gnx86_64-linux-gnu ples.cc.o(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED git conf�� USE_LINUX_SYS=1 --64 --local(dns block)/usr/lib/git-core/git-remote-https /usr/lib/git-core/git-remote-https origin REDACTED make conf�� d/src --local p/bin/as ding CXX object as ect CMakeFiles/c-I(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.