Skip to content

Commit

Permalink
remove full gtest | added cmake support
Browse files Browse the repository at this point in the history
minimal gtest added
  • Loading branch information
razor950 committed Aug 20, 2020
1 parent 73e962f commit 37ba27f
Show file tree
Hide file tree
Showing 89 changed files with 53,693 additions and 52,676 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ src/bin/vld.ini
/src/tests/vld_ComTest/ComTest_i.c
*.VC.opendb
*.VC.db
build/
65 changes: 65 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(vld
VERSION 2.5.2
DESCRIPTION "Visual Leak Detector"
HOMEPAGE_URL "https://github.com/btolfa/vld"
LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_library(vld SHARED)
target_include_directories(vld PRIVATE setup)
target_compile_definitions(vld PRIVATE UNICODE _UNICODE)

add_subdirectory(lib/cppformat fmt)
target_link_libraries(vld PRIVATE fmt)

target_sources(vld PRIVATE
src/callstack.cpp
src/dllspatches.cpp
src/ntapi.cpp
src/stdafx.cpp
src/utility.cpp
src/vld.cpp
src/vldapi.cpp
src/vldheap.cpp
src/vld_hooks.cpp
src/callstack.h
src/criticalsection.h
src/crtmfcpatch.h
src/dbghelp.h
src/map.h
src/ntapi.h
src/resource.h
src/set.h
setup/version.h
src/stdafx.h
src/tree.h
src/utility.h
src/vld.h
src/vldallocator.h
src/vldheap.h
src/vldint.h
src/vld_def.h
src/vld.natvis
src/vld.rc
)

if (CMAKE_VS_PLATFORM_NAME STREQUAL "Win32")
target_sources(vld PRIVATE src/vld.dll.dependency.x86.manifest)
endif()

if (CMAKE_VS_PLATFORM_NAME STREQUAL "x64")
target_sources(vld PRIVATE src/vld.dll.dependency.x64.manifest)
endif()

target_include_directories(vld INTERFACE src)

target_compile_options(vld PRIVATE $<$<CONFIG:Release>:/Ot /GT /GF /Gy->)

enable_testing()

add_subdirectory(lib/gtest gtest)
add_subdirectory(src/tests tests)
10 changes: 10 additions & 0 deletions lib/cppformat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.12 FATAL_ERROR)

project(fmt
VERSION 1.1.0
DESCRIPTION "fmt is an open-source formatting library for C++"
HOMEPAGE_URL "http://fmtlib.net"
LANGUAGES CXX)

add_library(fmt format.cc posix.cc format.h posix.h)
target_include_directories(fmt INTERFACE ..)
2 changes: 1 addition & 1 deletion lib/cppformat/format.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<PropertyGroup Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset>v140_xp</PlatformToolset>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
Expand Down
157 changes: 0 additions & 157 deletions lib/gtest/CHANGES

This file was deleted.

Loading

0 comments on commit 37ba27f

Please sign in to comment.