I wonder on which platform cmake is available but make is not. Usually cmake builds a makefile and calls make on it. Personally I think cmake is overkill for something as simple as a chess engine.
Publius - public domain teaching engine
Moderator: Ras
-
- Posts: 469
- Joined: Fri Dec 16, 2016 11:04 am
- Location: France
- Full name: Richard Delorme
Re: Publius - public domain teaching engine
Richard Delorme
-
- Posts: 24
- Joined: Fri May 30, 2025 10:18 pm
- Full name: Ben Vining
Re: Publius - public domain teaching engine
Windows, and cmake also makes it easier to cross compile if you ever need to target iOS or other embedded platforms.which platform cmake is available but make is not
It's not just about portability though, cmake allows you to use Ninja which can speed up the build dramatically. I also use cmake to configure my Doxygen documentation build and all my tests, it's a complete solution.
-
- Posts: 469
- Joined: Fri Dec 16, 2016 11:04 am
- Location: France
- Full name: Richard Delorme
Re: Publius - public domain teaching engine
Gnu make is available for windows. and nmake is part of Microsoft visual Studio.
You can cross compile with a makefile. You can target several compilers with a makefile. You can do pgo build with a makefile (not impossible but quite complex with cmake), etc.and cmake also makes it easier to cross compile if you ever need to target iOS or other embedded platforms.
It's not just about portability though, cmake allows you to use Ninja which can speed up the build dramatically. I also use cmake to configure my Doxygen documentation build and all my tests, it's a complete solution.
As a chess programmer, my need is to do debug version, code coverage version, profiled version , etc of my code, to test and understand it. A Makefile is a perfect tool for that. Chess programs are simple, a few kilolines of code, a dozen files in a single src directory, with no dependency. CMake is a great tool for more complex projects, with hundred of files, millions if lines of code, multiple dependencies, etc. to build an editor, a chess gui, a compiler, etc. but I think it is too complex for a chess program, with more drawbacks than benefits.
Richard Delorme