git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] cmake: ignore generated files

From
Đoàn Trần Công Danh <congdanhqx@gmail.com>
Date
Sep 24, 2020, 10:34 UTC
Message-ID
<20200924103437.GA18952@danh.dev>
In-Reply-To
<nycvar.QRO.7.76.6.2009232224410.5061@tvgsbejvaqbjf.bet>
Hi Dscho,
On 2020-09-23 22:27:17+0200, Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
Show 13 quoted lines
> > ... the above sounds like the argument concentrates too much on
> > where the build directory is (i.e. between "in place" and "a
> > throw-away directory next door"), which sounds like much smaller
> > point compared to the other things that needs to be improved in the
> > VS users.  And making a choice against what is recommended as best
> > practice...?  I dunno.
> 
> All I want is for the CMake support to be easier to use, yet we go in the
> opposite direction: instead of allowing to use CMake under more
> circumstances (which actually *works*, we just don't have the appropriate
> patterns in our `.gitignore` yet to avoid adding and committing the
> generated files), we now seem to intend to require a separate build
> directory.

I've left Windows development land for a long time. So, please take below discussion with grain of salt.

When I was there, CMake Users on Windows mostly used CMake-GUI to generate build system for CMake since running CMake as CLI in Windows takes too much hassle.

When I was there, CMake-GUI shows the option to choose build directories explicitly, and whenever the source directories changed, the build directories also changed, with some [-/]build added into sourcedir [1]

I heard that nowaday, CMake is supported natively with MSVC, I don't know what is the default option when using CMake with MSVC, but from the history of MSVC always supports building out of tree, and information for Microsoft Docs [2]:

	Click the Show All Files button at the top of Solution
	Explorer to see all the CMake-generated output in the
	out/build/<config> folders.

I think the default UX with CMake on Windows is building project out of tree.

> That's the opposite direction of making things more convenient for Visual
> Studio users.
So, I don't think we would provide them more convenient with this change.

1: https://cmake.org/runningcmake/ 2: https://docs.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=vs-2019

-- 
Danh
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 14 of 22 in “cmake: ignore generated files”
  1. cmake: ignore generated filesJohannes Schindelin via GitGitGadget, Sep 17, 2020
  2. Junio C HamanoSep 17, 2020
  3. Johannes SchindelinSep 18, 2020
  4. Junio C HamanoSep 18, 2020
  5. Đoàn Trần Công DanhSep 18, 2020
  6. Junio C HamanoSep 18, 2020
  7. Đoàn Trần Công DanhSep 19, 2020
  8. Junio C HamanoSep 19, 2020
  9. Johannes SchindelinSep 20, 2020
  10. Junio C HamanoSep 23, 2020
  11. Johannes SchindelinSep 23, 2020
  12. Junio C HamanoSep 23, 2020
  13. Johannes SchindelinSep 25, 2020
  14. Đoàn Trần Công DanhSep 24, 2020
  15. Johannes SchindelinSep 25, 2020
  16. Johannes SchindelinSep 20, 2020
  17. Junio C HamanoSep 21, 2020
  18. Johannes SchindelinSep 23, 2020
  19. SZEDER GáborSep 24, 2020
  20. Junio C HamanoSep 24, 2020
  21. Junio C HamanoSep 23, 2020
  22. Junio C HamanoSep 23, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.