Skip to content

Commit

Permalink
collection of fixes for building without pre-compiled headers
Browse files Browse the repository at this point in the history
ie, if -DPXR_ENABLE_PRECOMPILED_HEADERS=OFF

wanted to build without precompiled headers to help with debugging a
strange build issue (ie, create more transparent + atomic build steps)

also, turning off PCH usage allows stashed.io (a
caching compiler wrapper for MSVC) to operate when using PDB
(see: https://github.com/playscale/stashed.io/wiki/PDB-and-PCH-generation)

most fixes are pretty self-explanatory - adding some missing headers to
individual source / header files

in stackTrace.cpp, the include of Winsock2.h must happen before windows.h,
which is brought in via fileSystem.h

See:
PixarAnimationStudios/OpenUSD#1672
  • Loading branch information
pmolodo committed Nov 3, 2021
1 parent 8e555bf commit 43b0d3a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion stackTrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,18 @@
#include "pxr/base/arch/error.h"
#include "pxr/base/arch/errno.h"
#include "pxr/base/arch/export.h"
#if defined(ARCH_OS_WINDOWS)
// Need to include Winsock2.h BEFORE windows.h - which is included in
// fileSystem.h
#include <Winsock2.h>
#endif
#include "pxr/base/arch/fileSystem.h"
#include "pxr/base/arch/inttypes.h"
#include "pxr/base/arch/symbols.h"
#include "pxr/base/arch/vsnprintf.h"
#if defined(ARCH_OS_WINDOWS)
#include <io.h>
#include <process.h>
#include <Winsock2.h>
#include <DbgHelp.h>
#ifndef MAXHOSTNAMELEN
#define MAXHOSTNAMELEN 64
Expand Down

0 comments on commit 43b0d3a

Please sign in to comment.