Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update EASTL_Project_Integration.md #508

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions doc/CMake/EASTL_Project_Integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,16 @@ Add to your CMakeLists.txt:

```cmake
set(EASTL_ROOT_DIR C:/EASTL)
include_directories (${EASTL_ROOT_DIR}/include)
include_directories (${EASTL_ROOT_DIR}/test/packages/EAAssert/include)
include_directories (${EASTL_ROOT_DIR}/test/packages/EABase/include/Common)
include_directories (${EASTL_ROOT_DIR}/test/packages/EAMain/include)
include_directories (${EASTL_ROOT_DIR}/test/packages/EAStdC/include)
include_directories (${EASTL_ROOT_DIR}/test/packages/EATest/include)
include_directories (${EASTL_ROOT_DIR}/test/packages/EAThread/include)
set(EASTL_LIBRARY debug ${EASTL_ROOT_DIR}/build/Debug/EASTL.lib optimized ${EASTL_ROOT_DIR}/build/Release/EASTL.lib)
add_custom_target(NatVis SOURCES ${EASTL_ROOT_DIR}/doc/EASTL.natvis)

add_subdirectory(${EASTL_ROOT_DIR})

target_include_directories(... PUBLIC "${EASTL_ROOT_DIR}/include")
```

And then add the library into the linker

```
target_link_libraries(... ${EASTL_LIBRARY})
target_link_libraries(... ${EASTL})
```

### Using Visual Studio
Expand Down Expand Up @@ -86,8 +81,13 @@ ${EASTL_ROOT_DIR}/doc/EASTL.natvis
EASTL requires you to have an overload for the operator new[], here is an example that just forwards to global new[]:

```c
void* __cdecl operator new[](size_t size, const char* name, int flags, unsigned debugFlags, const char* file, int line)
{
return new uint8_t[size];
void* operator new[](size_t size, const char* pName, int flags, unsigned debugFlags,
const char* file, int line) {
return new uint8_t[size];
}

void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName,
int flags, unsigned debugFlags, const char* file, int line) {
return new uint8_t[size];
}
```