Fix Windows build
authorRob Hughes <robert.hughes@arm.com>
Mon, 17 Aug 2020 14:47:20 +0000 (15:47 +0100)
committerTeresaARM <teresa.charlinreyes@arm.com>
Mon, 17 Aug 2020 17:35:13 +0000 (17:35 +0000)
Change-Id: I145d220c73313e31c184b6a75ab7f4823df99919
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
cmake/GlobalConfig.cmake
profiling/common/src/NetworkSockets.cpp
src/armnn/Logging.cpp
src/armnn/test/UnitTests.cpp
src/armnnUtils/Filesystem.hpp
src/armnnUtils/Processes.cpp
src/armnnUtils/Threads.cpp

index e5a5866..b093e5d 100644 (file)
@@ -347,7 +347,7 @@ endif()
 
 # This is the root for the dynamic backend tests to search for dynamic
 # backends. By default it will be the project build directory.
-add_definitions('-DDYNAMIC_BACKEND_BUILD_DIR="${PROJECT_BINARY_DIR}"')
+add_definitions(-DDYNAMIC_BACKEND_BUILD_DIR="${PROJECT_BINARY_DIR}")
 
 # ArmNN dynamic backend
 if(DYNAMIC_BACKEND_PATHS)
index 2a65655..15ad087 100644 (file)
@@ -8,17 +8,11 @@
 #if defined(__unix__) || defined(__APPLE__)
 #include <unistd.h>
 #include <fcntl.h>
-#include <common/include/Conversion.hpp>
-#endif
-
-#if defined(__APPLE__) || defined(_MSC_VER) || defined(__MINGW32__)
-#include <common/include/IgnoreUnused.hpp>
 #endif
 
-#if defined(__MINGW32__)
 #include <common/include/Conversion.hpp>
+#include <common/include/IgnoreUnused.hpp>
 #include <common/include/NumericCast.hpp>
-#endif
 
 namespace arm
 {
index 8b46a77..0cdcdc5 100644 (file)
@@ -9,7 +9,7 @@
 #include <armnn/utility/Assert.hpp>
 
 #if defined(_MSC_VER)
-#include <commons/include/WindowsWrapper.hpp>
+#include <common/include/WindowsWrapper.hpp>
 #endif
 
 #if defined(__ANDROID__)
index 5d9211e..032a49f 100644 (file)
@@ -24,7 +24,7 @@ BOOST_GLOBAL_FIXTURE(ConfigureLoggingFixture);
 #include <boost/iostreams/filtering_stream.hpp>
 #include <boost/iostreams/tee.hpp>
 #include <iostream>
-#include <commons/include/WindowsWrapper.hpp>
+#include <common/include/WindowsWrapper.hpp>
 
 using namespace boost::iostreams;
 using namespace std;
index 3d93ce6..ba0d97a 100644 (file)
@@ -5,6 +5,11 @@
 
 #pragma once
 
+#if defined(_MSC_VER)
+// ghc includes Windows.h directly, bringing in macros that we don't want (e.g. min/max).
+// By including Windows.h ourselves first (with appropriate options), we prevent this.
+#include <common/include/WindowsWrapper.hpp>
+#endif
 #include <ghc/filesystem.hpp>
 namespace fs = ghc::filesystem;
 
index eb68dd9..8b401d4 100644 (file)
@@ -8,7 +8,7 @@
 #if defined(__unix__) || defined(__APPLE__)
 #include <unistd.h>
 #elif defined(_MSC_VER)
-#include <commons/include/WindowsWrapper.hpp>
+#include <common/include/WindowsWrapper.hpp>
 #endif
 
 namespace armnnUtils
index 3ee8174..64a8481 100644 (file)
@@ -10,7 +10,7 @@
 #include <sys/syscall.h>
 #define gettid() syscall(SYS_gettid)
 #elif defined(_MSC_VER)
-#include <commons/include/WindowsWrapper.hpp>
+#include <common/include/WindowsWrapper.hpp>
 #elif defined(__APPLE__)
 #include "AvailabilityMacros.h"
 #include <sys/syscall.h>