From 7ed20037210b1aec604996e0ab9cab22c7f0e1ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Klinkovsk=C3=BD?= Date: Sun, 24 Mar 2024 14:10:08 +0100 Subject: [PATCH] Fix deprecated positional option for '.pvx' file Since CLI11 2.4.0, the `'.pvx' file` option is not recognized as a valid option and results in the following runtime error: terminate called after throwing an instance of 'CLI::BadNameString' what(): Invalid positional Name: '.pvx' file Aborted (core dumped) Hence, when ParaView is compiled with a new CLI11 version, starting `pvserver` or `pvrenderserver` always fails before the user even sees the result of CLI parsing. Since the option is deprecated, I don't see much value in actually fixing it and only guarded it with CLI11 version macros, so the option will not be available when a new CLI11 version is used. --- Remoting/Core/vtkRemotingCoreConfiguration.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Remoting/Core/vtkRemotingCoreConfiguration.cxx b/Remoting/Core/vtkRemotingCoreConfiguration.cxx index 77965bcde11..448368784ee 100644 --- a/Remoting/Core/vtkRemotingCoreConfiguration.cxx +++ b/Remoting/Core/vtkRemotingCoreConfiguration.cxx @@ -498,6 +498,7 @@ bool vtkRemotingCoreConfiguration::PopulateRenderingOptions( "provides the configuration for screens in a CAVE.") ->take_first(); +#if CLI11_VERSION_MAJOR < 2 || (CLI11_VERSION_MAJOR == 2 && CLI11_VERSION_MINOR < 4) auto pvx = caveGroup ->add_option( "'.pvx' file", @@ -508,6 +509,7 @@ bool vtkRemotingCoreConfiguration::PopulateRenderingOptions( ->excludes("--pvx") ->take_first(); CLI::deprecate_option(pvx, "--pvx"); +#endif } return true; -- GitLab