lukka / run-cmake

GitHub Action to build C++ applications with CMake (CMakePresets.json), Ninja and vcpkg on GitHub.
MIT License
176 stars 19 forks source link

[ENHANCEMENT] information of CMakeSettings.json #39

Closed orion160 closed 2 years ago

orion160 commented 3 years ago

When run-cmake starts there is information about the build, that information does not correspond to the CMakeSettings.json and is to be overrided in the json file.

image

And the CMakeSettings.json doesnt show information about the config

image

Well, i think that these features are under developmemnt.

lukka commented 3 years ago

@orion160 1 - The output shown in there is emitted by the github runner, there is nothing it can done to make it right. The values shown in there must be disregarded accordingly to the current mode. For example, if the input cmakeListsOrSettingsJson is set to CMakeSettingsJson, only the valid input (as specified in actions.yml) are taken into account by the action, all the others are disregarded. A solution to this would be to split this action in three different actions. Having a "mode selection" is pretty much a burden I would avoid indeed, and it is not a good idea indeed.

2 - When using CMakeSettings.json, In the output of the run-cmake each configuration name is printed out while it is being processed, e.g.: Process configuration: 'x64-Debug'. If it is not printed in your workflow it may mean nothing matched the regular expression defined in configurationRegexFilter input.

orion160 commented 3 years ago

Thanks. What i was referring, is where i can see the configuration that CMakeSettings.json overrides, or send to cmake executable. Of course the regex filter is working, but where do i know the actual parameters that are sent to CMake, as the first image shows.

For the moment the information that run-cmake shows to me is

image

As #38 there are some settings that are discarded to run cmake, the cmakesettings.json schema dictates this parameters for which some of them are passed to Visual Studio and Others to cmake.

The problem urges where the documentation doesnt specifies which is passed to cmake, and so use it in run-cmake.

Action.yml gives useful information, but i am confused in knowing which parameters will be gathered from the json file

orion160 commented 3 years ago

As an example, Action.yml

image

gives this information, which means that when i am using CMakeSettings.json that information doesnt matter.

but as it was shown in the previous comment, the information about the cmakebuild type is not echoed when processing the config, so i cant certainly know if it is gathering the cmakebuildtype from the json file

lukka commented 3 years ago

@orion160 yes, the output in case of the CMakeSettings.json could be improved. Right now the only way to see more verbose log (but way too much) is to enable the verbose long indeed :)

Note that file will be replaced by the CMakePresets.json, which will be consumed directly by CMake, hence ton of code will be dropped out of this action soon, hurray!

orion160 commented 3 years ago

@lukka that means that CMakeSettings.json will be deprecated or eliminated?

Currently Visual Studio has not integration with cmake presets, in consequence there is also lack of the integration with cmake + vcpkg

lukka commented 3 years ago

@orion160 it will, yes, removed from run-cmake. Yet the existing versions of this action are and will be supporting it.

lukka commented 2 years ago

Closing as support for CMakePreset.json has been added. Please take a look to run-cmake@v10 and see if CMakePreset.json suites your needs.