Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 14:06 -0800, Venedict Tchistopolskii wrote:
> Could you clarify on saving the build-directory section?
> 
> I'm not sure how it knows which cache or build directory to load. In
> my setup here the issue I noted applies even if build directory is
> generated on both projects/etc.
> 
> VT
As a convenience, cmake-gui uses a QSettings object to store the last
few build directories that it configured. These directories are
populated in the build directory dropdown menu.
The source directories are not stored in QSettings at all, but instead
extracted from the build directories. If the build directory hasn't
been configured, then CMake has no way of knowing what source directory
to pick.
Kyle
> 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Gagh I'm stupid, missed the drop down, thanks for clarifying!

Much better now :)

VT

On Fri, Jan 25, 2019 at 2:48 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 14:06 -0800, Venedict Tchistopolskii wrote:
>
> Could you clarify on saving the build-directory section?
>
> I'm not sure how it knows which cache or build directory to load. In my
> setup here the issue I noted applies even if build directory is generated
> on both projects/etc.
>
> VT
>
>
> As a convenience, cmake-gui uses a QSettings object to store the last few
> build directories that it configured. These directories are populated in
> the build directory dropdown menu.
>
> The source directories are not stored in QSettings at all, but instead
> extracted from the build directories. If the build directory hasn't been
> configured, then CMake has no way of knowing what source directory to pick.
>
> Kyle
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Could you clarify on saving the build-directory section?

I'm not sure how it knows which cache or build directory to load. In my
setup here the issue I noted applies even if build directory is generated
on both projects/etc.

VT

On Fri, Jan 25, 2019 at 1:59 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 13:23 -0800, Venedict Tchistopolskii wrote:
>
> Get 2 CMake projects.
>
> Get CMake GUI to 'configure' one of them. Close/re-open and it will
> automatically point to this configured project source and build locations,
> regardless of what build/version/cmake-gui.exe you use.
>
> Run a different cmake-gui.exe through the CLI, passing in source and build
> locations. It will be properly load these instead of the 'last configured
> project' now.
>
> Now close it, without configuring, and re-open it normally without CLI
> overrides. Now it'll load the original project as if you've never set it to
> a different source/build location.
>
> tl;dr CMake loads the last-configured source/bin directory by default. If
> you don't configure (or pass override through CLI) it will keep loading the
> same project.
>
>
> Ah, I see what you mean.
>
> Saving the build path is easy: just add the command-line path to the cache
> of build directories on startup as well as at configure time.
>
> Saving the source path is more difficult. The GUI gets the source
> directory by scanning the files in the build directory. If the build
> directory hasn't been generated yet, then the GUI will have no idea where
> to find the source directory, unless we start caching source directories as
> well.
>
> I think, as you noted, you're better off just triggering "Configure"
> before closing the dialog.
>
> Kyle
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 13:23 -0800, Venedict Tchistopolskii wrote:
> Get 2 CMake projects.
> 
> Get CMake GUI to 'configure' one of them. Close/re-open and it will
> automatically point to this configured project source and build
> locations, regardless of what build/version/cmake-gui.exe you use. 
> 
> Run a different cmake-gui.exe through the CLI, passing in source and
> build locations. It will be properly load these instead of the 'last
> configured project' now.
> 
> Now close it, without configuring, and re-open it normally without
> CLI overrides. Now it'll load the original project as if you've never
> set it to a different source/build location.
> 
> tl;dr CMake loads the last-configured source/bin directory by
> default. If you don't configure (or pass override through CLI) it
> will keep loading the same project.
Ah, I see what you mean.
Saving the build path is easy: just add the command-line path to the
cache of build directories on startup as well as at configure time.
Saving the source path is more difficult. The GUI gets the source
directory by scanning the files in the build directory. If the build
directory hasn't been generated yet, then the GUI will have no idea
where to find the source directory, unless we start caching source
directories as well.
I think, as you noted, you're better off just triggering "Configure"
before closing the dialog.
Kyle
> 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Get 2 CMake projects.

Get CMake GUI to 'configure' one of them. Close/re-open and it will
automatically point to this configured project source and build locations,
regardless of what build/version/cmake-gui.exe you use.

Run a different cmake-gui.exe through the CLI, passing in source and build
locations. It will be properly load these instead of the 'last configured
project' now.

Now close it, without configuring, and re-open it normally without CLI
overrides. Now it'll load the original project as if you've never set it to
a different source/build location.

tl;dr CMake loads the last-configured source/bin directory by default. If
you don't configure (or pass override through CLI) it will keep loading the
same project.

VT

On Fri, Jan 25, 2019 at 1:19 PM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 12:55 -0800, Venedict Tchistopolskii wrote:
>
> Cherry picked and tested. Works great, thank you!
>
>
> Great, glad to hear it!
>
> Now, if only the source/build path would stick around, without requiring
> config to be triggered. :P
>
>
> Can you clarify what you mean by this?
>
> Kyle
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 12:55 -0800, Venedict Tchistopolskii wrote:
> Cherry picked and tested. Works great, thank you!
Great, glad to hear it!
> Now, if only the source/build path would stick around, without requiring 
> config to be triggered. :P
Can you clarify what you mean by this?
Kyle
> 
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Cherry picked and tested. Works great, thank you!

Now, if only the source/build path would stick around, without requiring
config to be triggered. :P

On Fri, Jan 25, 2019 at 8:56 AM Kyle Edwards 
wrote:

> Venedict,
>
> Currently, cmake-gui only lets you specify a build or source directory,
> not both.
>
> I've opened https://gitlab.kitware.com/cmake/cmake/merge_requests/2863 to
> add explicit -S and -B options to cmake-gui, which will allow you to
> specify both.
>
> Kyle
>
> On Fri, 2019-01-25 at 08:10 -0800, Venedict Tchistopolskii wrote:
>
> Actually that doesn't work.
> *cmake-gui.exe "D:/GitHub/SOURCE" "D:/GitHub/SOURCE/solutions_cmake/win64"*
>
> Ignores both options, but
> *cmake-gui.exe "D:/GitHub/SOURCE"*
>
> Uses current directory as noted. Why? Syntax wrong or something?
>
> VT
>
>
> On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards 
> wrote:
>
> On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote:
> > However, the manual does not describe this behavior, maybe it should
> > be
> > mentioned there.
> > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)
>
> Even better, perhaps we should add explicit -B and -S options the way
> cmake and ccmake already do.
>
> Kyle
>
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
Venedict,
Currently, cmake-gui only lets you specify a build or source directory,
not both.
I've opened https://gitlab.kitware.com/cmake/cmake/merge_requests/2863 
to add explicit -S and -B options to cmake-gui, which will allow you to
specify both.
Kyle
On Fri, 2019-01-25 at 08:10 -0800, Venedict Tchistopolskii wrote:
> Actually that doesn't work.
> cmake-gui.exe "D:/GitHub/SOURCE"
> "D:/GitHub/SOURCE/solutions_cmake/win64"
> 
> Ignores both options, but
> cmake-gui.exe "D:/GitHub/SOURCE"
> 
> Uses current directory as noted. Why? Syntax wrong or something?
> 
> VT
> 
> 
> On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards 
> m> wrote:
> > On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh
> > wrote:
> > > However, the manual does not describe this behavior, maybe it
> > should
> > > be
> > > mentioned there.
> > > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)
> > 
> > Even better, perhaps we should add explicit -B and -S options the
> > way
> > cmake and ccmake already do.
> > 
> > Kyle
> > -- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Venedict Tchistopolskii
Actually that doesn't work.
*cmake-gui.exe "D:/GitHub/SOURCE" "D:/GitHub/SOURCE/solutions_cmake/win64"*

Ignores both options, but
*cmake-gui.exe "D:/GitHub/SOURCE"*

Uses current directory as noted. Why? Syntax wrong or something?

VT


On Fri, Jan 25, 2019 at 6:52 AM Kyle Edwards 
wrote:

> On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote:
> > However, the manual does not describe this behavior, maybe it should
> > be
> > mentioned there.
> > (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)
>
> Even better, perhaps we should add explicit -B and -S options the way
> cmake and ccmake already do.
>
> Kyle
>
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Kyle Edwards via cmake-developers
On Fri, 2019-01-25 at 09:18 +0100, Gößwein Matthias / eeas gmbh wrote:
> However, the manual does not describe this behavior, maybe it should
> be
> mentioned there.
> (https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)

Even better, perhaps we should add explicit -B and -S options the way
cmake and ccmake already do.

Kyle
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


Re: [cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-25 Thread Gößwein Matthias / eeas gmbh
Dear Venedict,

Yes, that ist possible. Basically the syntax for cmake-gui is:

cmake-gui [] ( | )

So you can either pass a source directory or a build directory where
cmake was already run.

If you pass the path to the source directory as parameter, then cmake
uses the current directory as build directory.

So you can set both by changing to the build directory on the shell and
run cmake-gui with the source-directory as parameter from there.

However, the manual does not describe this behavior, maybe it should be
mentioned there.
(https://cmake.org/cmake/help/v3.13/manual/cmake-gui.1.html)

Best regards,
Matthias.

Am 24.01.2019 um 23:33 schrieb Venedict Tchistopolskii:
> Basically I want to launch the CMake GUI and pass in source/build
> directories through the CLI, overriding whatever it has at the moment.
>
> Is that possible? I don't get where it's picking up the previously
> touched source build but I want to override it consistently.
>
> E.g. cmake-gui.exe -H -B won't work.
>
> This is for a project wrapper that handles CMake launch and preparation.
>
> VT
>

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers


[cmake-developers] Controlling CMake GUI source/build directory from CLI

2019-01-24 Thread Venedict Tchistopolskii
Basically I want to launch the CMake GUI and pass in source/build
directories through the CLI, overriding whatever it has at the moment.

Is that possible? I don't get where it's picking up the previously touched
source build but I want to override it consistently.

E.g. cmake-gui.exe -H -B won't work.

This is for a project wrapper that handles CMake launch and preparation.

VT
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers