Re:Strengths, weaknesses, opportunities, and threats facing ...
by rascul on Sunday May 01, 2022 @10:56PM
(#31230963)
I'm not very familiar with meson. I can use cmake to build a project but I don't know how to find various build options without searching through that project's documentation. I probably haven't explored cmake enough.
[ Parent
| on HN ]
Re:Strengths, weaknesses, opportunities, and threats facing ...
by downut on Sunday May 01, 2022 @11:51PM
(#31231269)
In the build directory, "ccmake ." Note the "." I need to do this in almost every cmake project I don't know well. Also toggle on the advanced options listing. Occasionally you'll see stuff in the CMakeLists.txt files that don't show up in that menu. This is usually variables you can set on the command line to influence configuration. People are nowadays calming down their desire to program up their own flavor of a gigantic build system, and sticking to simpler idioms. That's a big improvement. However there's a lot of legacy nightmare cmake out there. Meson is much harder to build different dialects. Some people don't like this. After 35 years of build systems, I say yes please!
I forget what I do in meson. Which means I just read the meson.build and meson_options.txt. They are quite straightforward, and very concise, if you're not Doing It Wrong.
Re:Strengths, weaknesses, opportunities, and threats facing ...
by throwaway82652 on Sunday May 01, 2022 @11:43PM
(#31231227)
Use cmake-gui and it lists all the options for you. Or for the manual method, search in the project's cmake sources for lines starting with "option(".
Re:Strengths, weaknesses, opportunities, and threats facing ...
by cycomanic on Monday May 02, 2022 @01:43AM
(#31231792)
I would argue this confirms what the OP said cmake is really not very friendly to the user (not developer). Reading through the cmake sources for options is equivalent to "read the source".
Re:Strengths, weaknesses, opportunities, and threats facing ...
by jcelerier on Monday May 02, 2022 @02:54AM
(#31232115)
But you only have to do this if you don't want to run an actual GUI or ncurses UI which does this for you for some reason ? What would you suggest instead ?
Re:Strengths, weaknesses, opportunities, and threats facing ...
by cycomanic on Monday May 02, 2022 @03:37PM
(#31239803)
Why do I need to run a gui or ncurses UI if I just want to do the equivalent of
configure && make && make install?
Re:Strengths, weaknesses, opportunities, and threats facing ...
by jcelerier on Tuesday May 03, 2022 @01:34AM
(#31245007)
The equivalent of this is
cmake -S source_folder -B build_folder
cmake --build build_folder
cmake --install build_folder
You don't need to run a GUI at all for this, I don't see how you could infer this from the previous messages
Re:Strengths, weaknesses, opportunities, and threats facing ...
by tpush on Monday May 02, 2022 @05:15AM
(#31232801)
Something like 'cmake --list-options CMakeLists.txt' seems the most obvious.
Re:Strengths, weaknesses, opportunities, and threats facing ...
by jcelerier on Monday May 02, 2022 @08:50AM
(#31234466)
I don't think it would be meaningfully different from what you would get by doing
less CMakeCache.txt
Listing the options cannot be done by just introspecting a CMakeLists: what would it show for: if(FOO)
option(ENABLE_BAMBOOZLE_${FOO} "Enable Bamboozle - ${FOO}-specific version" OFF)
else()
option(ENABLE_BAMBOOZLE "Enable Bamboozle" ON)
endif()
(and if your meta-build system does not allow to do that, I'm sorry but I'll have to build a meta-meta-build-system on top of it which implements it and no one will like it)