4 ms·
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(".
by throwaway82652 4y ago
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(".
- cycomanic 4y agoI 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".
- jcelerier 4y agoBut 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 ?
- cycomanic 4y agoWhy do I need to run a gui or ncurses UI if I just want to do the equivalent of configure && make && make install?
- jcelerier 4y agoThe 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
- tpush 4y agoSomething like 'cmake --list-options CMakeLists.txt' seems the most obvious.
- jcelerier 4y agoI 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)