Allow new and delete to be replaced (#44)
This commit is contained in:
Родитель
dccc577054
Коммит
d842db7748
|
@ -22,6 +22,10 @@ if(USE_CPPRESTSDK)
|
|||
string(APPEND EXTRA_FLAGS " -DUSE_CPPRESTSDK")
|
||||
endif()
|
||||
|
||||
if(INJECT_HEADER_AFTER_STDAFX)
|
||||
string(APPEND EXTRA_FLAGS " -DINJECT_HEADER_AFTER_STDAFX=${INJECT_HEADER_AFTER_STDAFX}")
|
||||
endif()
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EXTRA_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_LDFLAGS}")
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ Below are instructions to build on different OS's. You can also use the followin
|
|||
| -DUSE_CPPRESTSDK | Includes the CppRestSDK (default http stack) | false |
|
||||
| -DWERROR | Enables warnings as errors | true |
|
||||
| -DWALL | Enables all warnings | true |
|
||||
| -DINJECT_HEADER_AFTER_STDAFX=`<header path>` | Adds the provided header to the library compilation in stdafx.cpp, intended to allow "new" and "delete" to be replaced. | `<none>` |
|
||||
|
||||
### Build on Windows ###
|
||||
```powershell
|
||||
|
|
|
@ -2,4 +2,8 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "stdafx.h"
|
||||
|
||||
#ifdef INJECT_HEADER_AFTER_STDAFX
|
||||
#include STRINGIFY(INJECT_HEADER_AFTER_STDAFX)
|
||||
#endif
|
|
@ -4,6 +4,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#define STRINGIFY_2(s) #s
|
||||
#define STRINGIFY(s) STRINGIFY_2(s)
|
||||
|
||||
#ifdef _WIN32 // used in the default log writer and to build the dll
|
||||
|
||||
// prevents from defining min/max macros that conflict with std::min()/std::max() functions
|
||||
|
|
Загрузка…
Ссылка в новой задаче