From: Øystein Walle Date: Mon, 15 Jun 2020 14:03:49 GMT Subject: Re: [PATCH v4 6/8] cmake: support for building git on windows with mingw Message-ID: <20200615140349.1783-1-oystwa@gmail.com> In-Reply-To: <549f0cd5fffef38e8d85246a9aa2593674aad68c.1591986566.git.gitgitgadget@gmail.com> > +if(WIN32) > + set(EXE_EXTENSION .exe) > +else() > + set(EXE_EXTENSION) > +endif() You can probably use CMAKE_EXECUTABLE_SUFFIX here. See: https://cmake.org/cmake/help/latest/variable/CMAKE_EXECUTABLE_SUFFIX.html Øsse