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 <kyle.edwa...@kitware.com> 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