diff options
| author | Egor Tensin <egor@tensin.name> | 2026-03-30 16:29:33 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-03-30 16:29:36 +0200 |
| commit | d5d02452c39d5ecaafa0e64e69b953fc6b7f617c (patch) | |
| tree | 5132b3ae56e40760186ba3a42938ecbaff70ebcc /README.md | |
| parent | workflows: clean up path ignore patterns (diff) | |
| download | cmake-common-remove_common_cmake.tar.gz cmake-common-remove_common_cmake.zip | |
REMOVE common.cmakev6.0remove_common_cmake
This repo literally started with common.cmake. However, I think that in
this day and age, it is, to put it mildly, outdated. Feature by feature:
* The C++ standard is better defined on a per-project basis, and it's
very easy. Frankly, I'm surprised GCC still (as of March '26) defaults
to something pre-11 (or at least I think it does).
* The warning options are, again, very easy to do on a per-project
basis, and perhaps they should be defined there.
* The Windows-only defines (NOMINMAX, etc.) are, again, very easy to
define on the project level, and don't warrant a separate file.
* The static runtime thing is more tricky. I use static runtime linking
on Windows only, basically. And since about 3.15, it supports
CMAKE_MSVC_RUNTIME_LIBRARY, which can set up the linking without my
help. I don't care about the older versions enough to keep maintenance.
* Symbol stripping is better done when calling `cmake --install --strip`
in modern CMake version. Otherwise, it's a simple compilation flag for
Release builds.
* Installing PDBs does require some trickery though. It's simple enough:
you just call install() with $<TARGET_PDB_FILE> or whatever it's
called.
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -90,22 +90,6 @@ Build (and optionally, install) a CMake project. Pass the `--help` flag to view detailed usage information. -### common.cmake - -Use in a project by putting - - include(path/to/common.cmake) - -in CMakeLists.txt. - -This file aids in quick-and-dirty development by - -* linking everything (including the runtime) statically by default, -* setting some useful compilation options (enables warnings, defines common -Windows-specific macros, strips debug symbols in release builds, etc.). - -Everything is enabled by default (use the `CC_*` CMake options to opt out). - Tools ----- |
