Skip to content

Commit

Permalink
fix some environment specific bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
okapies committed Oct 4, 2018
1 parent 6a0fb84 commit c1573ed
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion external/cmdline.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@

#ifdef _MSC_VER
#define NOMINMAX
#include <DbgHelp.h>
/*
You must include Windows.h before DbgHelp.h.
See https://stackoverflow.com/a/43283926/1014818 for more details.
*/
#include <Windows.h>
#include <DbgHelp.h>
#else
#include <cxxabi.h>
#endif
Expand Down
6 changes: 6 additions & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ enable_testing()
# GTest setup
set(GTEST_DIR "lib/googletest")
execute_process(COMMAND git submodule update --init -- test/${GTEST_DIR} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})

message(STATUS "Adding ${GTEST_DIR}")

# Prevent overriding the parent project's compiler/linker settings on Windows
# See https://github.com/google/googletest/blob/master/googletest/README.md#visual-studio-dynamic-vs-static-runtimes
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

add_subdirectory(${GTEST_DIR} EXCLUDE_FROM_ALL)

# filesystem setup
Expand Down
2 changes: 1 addition & 1 deletion test/lib/googletest
Submodule googletest updated 215 files

0 comments on commit c1573ed

Please sign in to comment.