I’m genuinely curious if it’s actually easier, but I’m assuming you’re just using a different tool, maybe without as much historical baggage (and incompatible implementations)…
Now I personally would rather not use a pre 1.0 release of an entirely different programming language to compile my C projects instead of a cross-platform C compiler, but people can do whatever they want.
If you think that cmake is complicated, when in reality all it does is set targets using a declarative stye, then programming might not be for you.
That's like the hello world of cmake builds
Bigger cmake builds are doing dependency resolution, configuration tests, and configuration for development or release builds/installs.
Go poke at the cmake logs and result artifacts in Debug/Release build types and see if it's "just declaring targets."
find_package(foo)
#...
target_link_libraries(myapp foo::Static)
> configuration tests,
I don't know what you mean by configuration tests. I don't think I ever added any test resembling that description other than sanity checks in cmake find modules and sanity checks on projects just for convenience.
> and configuration for development or release builds
Those are not handled by cmake other than setting a flag that's used in the code.
> /installs.
You don't need to do anything other than setting the install target.
https://cmake.org/cmake/help/latest/command/install.html
I think you're either wildly exaggerating or you've been creating your own problems.
> I don't know what you mean by configuration tests.
When you run cmake -S <my project> -B build folder you'll see a bunch of output. What this output corresponds to may include a number of tests that either succeed or fail to indicate whether the project will build. For example, the aforementioned find_package logic, finding the compiler tool chain (especially if cross compiling), testing for random shit like endianness, etc.
> Those are not handled by cmake other than setting a flag that's used in the code.
if(STREQ ${CMAKE_BUILD_TYPE} Release)
....
endif()
Is ridiculously common with the "..." filled in by various things like setting optimization flags, paths within the build directory, etc> You don't need to do anything other than setting the install target.
No but you should probably understand what RPATH is and why it's set in release builds but not installed artifacts or why doing something that seems obvious like checking the checksum of your built object is the same as the installed one might fail.
The point is that cmake does a lot of work and it's not just declaring targets. Builds are hard.