Re: [CMake] Tests with assert and Release build type

2015-12-24 Thread Ruslan Baratov via CMake
On 24-Dec-15 19:46, Magnus Therning wrote: I'm *not* mixing stuff built with `-g` and stuff built without it. Actually I don't see anything bad about mixing `-g` code with code without `-g`. I'm also *not* mixing linking with debug- and non-debug libraries. Since we cover a lot of aspects

Re: [CMake] Tests with assert and Release build type

2015-12-24 Thread Magnus Therning
David Cole writes: > Not only is it possible ... it WILL happen if you use the Microsoft > C++ compiler and try to mix and match Release and Debug compilation > units. > > The MS compiler has some very nice memory tracking facilities built > into the Debug runtime libraries, but it is

Re: [CMake] Tests with assert and Release build type

2015-12-24 Thread Magnus Therning
Ruslan Baratov writes: > On 22-Dec-15 04:07, Magnus Therning wrote: >> Ruslan Baratov writes: >> >>> On 20-Dec-15 01:31, Magnus Therning wrote: Ruslan Baratov writes: > How about using RelWithDebInfo? See: > http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably

Re: [CMake] Tests with assert and Release build type

2015-12-23 Thread Ruslan Baratov via CMake
On 22-Dec-15 04:07, Magnus Therning wrote: Ruslan Baratov writes: On 20-Dec-15 01:31, Magnus Therning wrote: Ruslan Baratov writes: How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably missing something but how does that solve the issue with

Re: [CMake] Tests with assert and Release build type

2015-12-23 Thread David Cole via CMake
Not only is it possible ... it WILL happen if you use the Microsoft C++ compiler and try to mix and match Release and Debug compilation units. The MS compiler has some very nice memory tracking facilities built into the Debug runtime libraries, but it is accomplished via different structs for

Re: [CMake] Tests with assert and Release build type

2015-12-21 Thread Ruslan Baratov via CMake
On 20-Dec-15 01:31, Magnus Therning wrote: Ruslan Baratov writes: How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably missing something but how does that solve the issue with some targets requiring NDEBUG to be *undefined* and other targets

Re: [CMake] Tests with assert and Release build type

2015-12-21 Thread Magnus Therning
Ruslan Baratov writes: > On 20-Dec-15 01:31, Magnus Therning wrote: >> Ruslan Baratov writes: >> >>> How about using RelWithDebInfo? See: >>> http://stackoverflow.com/a/28124715/2288008 >> Hmm, I'm probably missing something but how does that solve the issue >> with some targets requiring NDEBUG

Re: [CMake] Tests with assert and Release build type

2015-12-19 Thread Magnus Therning
Dave Flogeras writes: > On Fri, Dec 18, 2015 at 9:55 AM, Magnus Therning wrote: >> >> I'm sure I'm not the first one to run into the conflict between a >> desire to test the code shipped to customers and the desire to at the >> same time define NDEBUG to make sure tests

Re: [CMake] Tests with assert and Release build type

2015-12-19 Thread Magnus Therning
Ruslan Baratov writes: > How about using RelWithDebInfo? See: > http://stackoverflow.com/a/28124715/2288008 Hmm, I'm probably missing something but how does that solve the issue with some targets requiring NDEBUG to be *undefined* and other targets requiring NDEBUG to be defined? /M > On

Re: [CMake] Tests with assert and Release build type

2015-12-19 Thread Dave Flogeras
On Fri, Dec 18, 2015 at 9:55 AM, Magnus Therning wrote: > > I'm sure I'm not the first one to run into the conflict between a desire > to test the code shipped to customers and the desire to at the same time > define NDEBUG to make sure tests don't have their `assert` turned

[CMake] Tests with assert and Release build type

2015-12-18 Thread Magnus Therning
I'm sure I'm not the first one to run into the conflict between a desire to test the code shipped to customers and the desire to at the same time define NDEBUG to make sure tests don't have their `assert` turned into NOOPs. Is there some nice way of handling this? I can always remove -DNDEBUG

Re: [CMake] Tests with assert and Release build type

2015-12-18 Thread Ruslan Baratov via CMake
How about using RelWithDebInfo? See: http://stackoverflow.com/a/28124715/2288008 Ruslo On 18-Dec-15 20:55, Magnus Therning wrote: I'm sure I'm not the first one to run into the conflict between a desire to test the code shipped to customers and the desire to at the same time define NDEBUG to