Skip to content
Snippets Groups Projects
Commit a5a37ee9 authored by Karsten Rink's avatar Karsten Rink
Browse files

Win Debug fixes.

parent 251cf019
No related branches found
No related tags found
No related merge requests found
...@@ -67,7 +67,7 @@ target_link_libraries(DataExplorer ...@@ -67,7 +67,7 @@ target_link_libraries(DataExplorer
) )
# Workaround for Windows conan tiff-package # Workaround for Windows conan tiff-package
if(USE_CONAN AND WIN32) if(OGS_USE_CONAN AND WIN32)
find_package(ZLIB REQUIRED) find_package(ZLIB REQUIRED)
target_link_libraries(DataExplorer ${ZLIB_LIBRARIES}) target_link_libraries(DataExplorer ${ZLIB_LIBRARIES})
endif() endif()
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
#include "MemWatch.h" #include "MemWatch.h"
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__MINGW32__) #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__MINGW32__)
#include <fstream> #include <fstream>
#include <string> #include <string>
#include <sstream> #include <sstream>
...@@ -31,7 +31,7 @@ MemWatch::MemWatch () ...@@ -31,7 +31,7 @@ MemWatch::MemWatch ()
unsigned MemWatch::updateMemUsage () unsigned MemWatch::updateMemUsage ()
{ {
#if !defined(WIN32) && !defined(__APPLE__) && !defined(__MINGW32__) #if !defined(_WIN32) && !defined(__APPLE__) && !defined(__MINGW32__)
std::string fname ("/proc/"); std::string fname ("/proc/");
std::stringstream str_pid; std::stringstream str_pid;
str_pid << static_cast<unsigned> (getpid()); str_pid << static_cast<unsigned> (getpid());
......
...@@ -138,6 +138,8 @@ if(WIN32) ...@@ -138,6 +138,8 @@ if(WIN32)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} \
/ZI /Od /Ob0") /ZI /Od /Ob0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd")
DisableCompilerFlag(DEBUG /RTC1) DisableCompilerFlag(DEBUG /RTC1)
# cygwin # cygwin
else() else()
......
...@@ -176,7 +176,7 @@ function(conan_cmake_detect_vs_runtime result) ...@@ -176,7 +176,7 @@ function(conan_cmake_detect_vs_runtime result)
string(TOUPPER ${CMAKE_BUILD_TYPE} build_type) string(TOUPPER ${CMAKE_BUILD_TYPE} build_type)
set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS) set(variables CMAKE_CXX_FLAGS_${build_type} CMAKE_C_FLAGS_${build_type} CMAKE_CXX_FLAGS CMAKE_C_FLAGS)
foreach(variable ${variables}) foreach(variable ${variables})
string(REPLACE " " ";" flags ${${variable}}) string(REPLACE " " ";" flags ${variable})
foreach (flag ${flags}) foreach (flag ${flags})
if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd") if(${flag} STREQUAL "/MD" OR ${flag} STREQUAL "/MDd" OR ${flag} STREQUAL "/MT" OR ${flag} STREQUAL "/MTd")
string(SUBSTRING ${flag} 1 -1 runtime) string(SUBSTRING ${flag} 1 -1 runtime)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment