-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CMake update 1/3: basic modernization (preserving all current functionality) #755
Conversation
This doesn't necessarily have an effect though, as we need the bootstrapping executable anyhow for building other targets.
This is required for the Windows configuration to succeed at all. It should also be beneficial when we start sharing object code between bootstrap and actual executable.
I'm not familiar with cmake and don't have access to a Windows machine, but it looks cleaner and doesn't break CI so merging. Patches for a Unix-based cmake build will be accepted, but the primary build system will always be Make (or theoretically just enough Make to bootstrap a Scheme-based build system). So if you want to continue using cmake you'll have to adapt any changes to the Makefile (which admittedly are gradually becoming fewer). |
Yep, I expected that. |
Nice 🎉 I don't have conclusion for I think we shouldn't dereference variables inside |
Hey, thanks for having a look!! On the
Good point. I should fix that in a separate patch. |
The existing Windows-only CMake configuration is a great foundation and seems to successfully fill the gap for most Windows users. This PR builds upon that and proposes a modernization of the
CMakeLists.txt
.CMake
has evolved considerably over the last years - while that doesn't make it less of a pain to work with or read the hideousCMakeLists.txt
files, there are improvements to be worth taking into account. This PR:SEXP_USE_INTTYPES
globally for every target, we now set it per target and propagate relevant settings by "inheriting" them for other targets throughPUBLIC
,INTERFACE
andPRIVATE
specifier. The main benefit lies in better encapsulation and an improved integration into/with other CMake-based projects. I believe the latter is attractive for chibi, as CMake is a fairly dominant choice these days and it would be nice to allow for a seamless integration, e.g. locally with agit submodule
) that requires nothing butadd_subdirectory(external/chibi-scheme)
, or using a global installation together withCMake
'sfind_package(chibi-scheme)
.CMakeLists.txt
to allow for a subsequent PR that lifts the platform restriction and makes aCMake
build available for Unix-based systems.There are two follow-up PRs for this (PR 2/3 and PR 3/3). They are in my fork of the repo, as I can't do stacked PRs from fork to origin repo - but when you consider merging this one, I can reconfigure the second one to target this repo and so on.