>
>
>> I am not finding it easy to find 'patterns' for these sort of issues. I
>> would have thought that configuring a project with separate debug and
>> release directories would be quite typical. But it's hard to find the
>> recommended way of doing such things.
>>
>
> It is typical:
>
Le ven. 21 juin 2019 à 11:40, Michael Jackson
a écrit :
>
> cd Foo
>
>mkdir Debug && cd Debug
>
>cmake -DCMAKE_BUILD_TYPE=Debug ../
>
>make -j
>
>
>
> We have just created a Debug build in the Debug Directory. Now, the same
> is analogous for the Release build.
>
>
>
> Cd Foo
>
>
>
> David,
>
> I think a bit more explanation of the philosophy (at least how I
> interpret it) is needed. I see in your emails that you are “targeting
> makefiles”. With CMake you need to really stop thinking this way. Rarely do
> you need to target any specific build system (although those
emails. Glad to have you in the
CMake community.
--
Mike Jackson
From: CMake on behalf of David Aldrich
Date: Friday, June 21, 2019 at 12:10 PM
To: Braden McDaniel
Cc: CMake
Subject: Re: [CMake] How to support separate debug and release build
directories?
> What would best practi
>
> > What would best practice be to provide convenient commands for our
> > developers to easily build the target ?
>
> For the Makefile generator, best practice is to use separate build
> directories (i.e., places where you run cmake) for different
> configurations (i.e., different settings
On Fri, 2019-06-21 at 15:28 +0100, David Aldrich wrote:
> > > I would also like this to work if I use the make targets e.g.
> > make
> > > debug.
> >
> > I think that's outside the scope of the Makefile generator. For
> > that
> > generator, CMAKE_BUILD_TYPE is a configuration-wide setting. If
>
> > I would also like this to work if I use the make targets e.g. make
> > debug.
>
> I think that's outside the scope of the Makefile generator. For that
> generator, CMAKE_BUILD_TYPE is a configuration-wide setting. If you
> want a different configuration, you need a different build
On Fri, 2019-06-21 at 14:19 +0100, David Aldrich wrote:
> Thanks for the help I have received in the past few days. I am making
> incremental improvements to my CMake project and have a new
> challenge. I am running CMake 3.13 on Centos 7.6, targeting make.
> My CMake file successfully builds
Le 21/06/2019 à 15:42, David Aldrich a écrit :
Do never test CMAKE_BUILD_TYPE in CMakeLists.txt files, it is
ignored in
multiple generators (e.g. Visual Studio).
Does that mean I shouldn't have this in CMakeLists.txt? :
# Specify a Release build by default
if(NOT CMAKE_BUILD_TYPE)
>
> Do never test CMAKE_BUILD_TYPE in CMakeLists.txt files, it is ignored in
> multiple generators (e.g. Visual Studio).
>
Does that mean I shouldn't have this in CMakeLists.txt? :
# Specify a Release build by default
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
message(STATUS
Le 21/06/2019 à 15:19, David Aldrich a écrit :
I now want to support separate target directories: build/debug and
build/release. I've shown my CMakeLists.txt below. So far I've just
added an attempt to support build/debug:
if (CMAKE_BUILD_TYPE EQUAL "DEBUG")
message("debug mode")
Thanks for the help I have received in the past few days. I am making
incremental improvements to my CMake project and have a new challenge. I
am running CMake 3.13 on Centos 7.6, targeting make. My CMake file
successfully builds debug or release targets and puts the executable in an
12 matches
Mail list logo