Skip to content

Replace Makefile references with cmake --build equivalents#147

Open
kkaefer wants to merge 1 commit into
masterfrom
kk/make
Open

Replace Makefile references with cmake --build equivalents#147
kkaefer wants to merge 1 commit into
masterfrom
kk/make

Conversation

@kkaefer
Copy link
Copy Markdown
Member

@kkaefer kkaefer commented May 22, 2026

  • Update README.md, CONTRIBUTING.md, and doc/advanced.md to use cmake -Bbuild / cmake --build build --target <name> instead of bare make commands left over from before the CMake migration
  • Add iwyu section to README.md documenting the cmake target
  • Make clang-tidy, cppcheck, doc, and iwyu targets always exist and fail with a clear error message when the required tool is not found, instead of silently being unavailable
  • Add unversioned clang-tidy and iwyu_tool.py to find_program search lists for Homebrew LLVM installs
  • Pass -isysroot and -Wno-c2y-extensions to iwyu on macOS to fix SDK header resolution
  • Suppress -Wnullability-extension on protobuf-generated .pb.cc files to fix build with Homebrew protobuf and AppleClang
  • Add /build to .gitignore

- Update README.md, CONTRIBUTING.md, and doc/advanced.md to use
  `cmake -Bbuild` / `cmake --build build --target <name>` instead of
  bare `make` commands left over from before the CMake migration
- Add iwyu section to README.md documenting the cmake target
- Make clang-tidy, cppcheck, doc, and iwyu targets always exist and
  fail with a clear error message when the required tool is not found,
  instead of silently being unavailable
- Add unversioned `clang-tidy` and `iwyu_tool.py` to find_program
  search lists for Homebrew LLVM installs
- Pass -isysroot and -Wno-c2y-extensions to iwyu on macOS to fix
  SDK header resolution
- Suppress -Wnullability-extension on protobuf-generated .pb.cc files
  to fix build with Homebrew protobuf and AppleClang
- Add /build to .gitignore
@kkaefer kkaefer requested a review from joto May 22, 2026 12:19
@kkaefer kkaefer mentioned this pull request May 22, 2026
@joto
Copy link
Copy Markdown
Collaborator

joto commented May 22, 2026

I should have put here what I have written in the other PR (#142):

Those are not "left-overs" from before. They are just what I type in to get the job done. I don't use those cmake commands and I don't know why I should. Sure, now you can use ninja or whatever instead of make. But in the end cmake is calling the underlying tool. And I'd rather use the underlying tool directly, because cmake is hiding functionality and I know how to get the result I want with the underlying tool. Maybe I am old-fashioned.

I don't see why typing longer commands with cmake in them is better.

@kkaefer
Copy link
Copy Markdown
Member Author

kkaefer commented May 22, 2026

They are leftovers, because there is no Makefile anymore, and typing what the readme tells you currently will thus fail. Sure, you can type doxygen doc, as well, but you add those CMake targets in the first place in 178c469 :)

@kkaefer
Copy link
Copy Markdown
Member Author

kkaefer commented May 22, 2026

Oh I guess cmake generates Makefiles by default and those commands work with that Makefile in the build directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants