On 4 February 2013 07:10, Alex Ott <[email protected]> wrote:
>
> We added NDEBUG=1 later, but I expected that this should be done
> automatically - maybe we need to explicitly add NDEBUG=1 if cmake is
> invoked in Release/RelWithDebugInfo configurations?
I''ve done quick test [1] using VS2010 and by default, and NDEBUG=1
for all but Debug builds, as expected:
C:\> cat cmake_build_type.h.in
#define CMAKE_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
C:\> cat cmake_ndebug_test.cpp
// Does CMake define NDEBUG in non-Debug builds?
#include "cmake_build_type.h"
#include <cstdio>
int main()
{
// Possible values are empty, Debug, Release, RelWithDebInfo and MinSizeRel.
// This variable is only supported for make based generators.
std::printf("CMAKE_BUILD_TYPE=%s\n", CMAKE_BUILD_TYPE);
#ifdef NDEBUG
std::printf("NDEBUG=%d\n", NDEBUG);
#else
std::puts("NDEBUG not defined");
#endif
}
Unless I've missed something, I don't see a need to explicitly set NDEBUG=1.
[1] https://github.com/mloskot/workshop/tree/master/cmake
Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
soci-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/soci-users