<html><head></head><body><div>On Fri, 2019-01-25 at 13:23 -0800, Venedict Tchistopolskii wrote:</div><blockquote type="cite"><div dir="ltr">Get 2 CMake projects.<div><br></div><div>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. </div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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.</div></div></blockquote><div><br></div><div>Ah, I see what you mean.</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>I think, as you noted, you're better off just triggering "Configure" before closing the dialog.</div><div><br></div><div>Kyle</div><blockquote type="cite">
</blockquote></body></html>