Skip to content

Commit

Permalink
Linux build (PixarAnimationStudios#29)
Browse files Browse the repository at this point in the history
* linux build

* linux build fix after merge with usd_diff dll change

* cmake changes: PYTHON_LIBRARY_DIR

* scripts to build the clients and test projects under linux

* Fixed a bug where initially it was using CMAKE from paths
Cleaned up path to CMAKE in package-links a bit

* use find_library to get correct names for linux and windows

 + python include and lib path variable

* linux build fix for memStorage.cpp

* linux build fixes

gcc 4.8 does not fully support c++14, at least cmake thinks so and uses c++1y instead.

* return to c++14 and update to gcc5.4

* get also OmniverseClient executables bulding for linux
  • Loading branch information
sduthaler authored and dsullins committed May 15, 2018
1 parent 304bc4c commit fd2842e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
# to remain minimal, marking the points where divergence is required.
include(Options)

# Turn on C++11; pxr won't build without it.
set(_PXR_GCC_CLANG_SHARED_CXX_FLAGS "${_PXR_GCC_CLANG_SHARED_CXX_FLAGS} -std=c++11")
# Turn on C++14; pxr won't build without it.
set(_PXR_GCC_CLANG_SHARED_CXX_FLAGS "${_PXR_GCC_CLANG_SHARED_CXX_FLAGS} -std=c++14")

# Enable all warnings.
set(_PXR_GCC_CLANG_SHARED_CXX_FLAGS "${_PXR_GCC_CLANG_SHARED_CXX_FLAGS} -Wall")
Expand Down
4 changes: 3 additions & 1 deletion third_party/usd/src/pxr/base/lib/arch/fileSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
#include <cstdlib>
#include <cerrno>
#include <memory>
#include <vector>
#include <map>

#include <fcntl.h>
#include <sys/types.h>
Expand Down Expand Up @@ -320,7 +322,7 @@ int64_t ArchGetFileLength(FILE* file)
return -1;
#if defined (ARCH_OS_LINUX) || defined (ARCH_OS_DARWIN)
struct stat buf;
return fstat(fileno(_file), &buf) < 0 ? -1 :
return fstat(fileno(file), &buf) < 0 ? -1 :
static_cast<int64_t>(buf.st_size);
#elif defined (ARCH_OS_WINDOWS)
return _GetFileLength(_FileToWinHANDLE(file));
Expand Down
4 changes: 2 additions & 2 deletions third_party/usd/src/pxr/base/lib/arch/fileSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "pxr/base/arch/inttypes.h"
#include <memory>
#include <cstdio>
#include <string>
#include <cstring>
#include <set>

#include <fcntl.h>
Expand Down Expand Up @@ -188,7 +188,7 @@ class ArchFile
ArchFile() {}

public:
virtual ~ArchFile() = 0 {}
virtual ~ArchFile() {}

virtual int64_t GetFileLength() = 0;

Expand Down
1 change: 1 addition & 0 deletions third_party/usd/src/pxr/base/lib/arch/memStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <boost/weak_ptr.hpp>
#include <boost/make_shared.hpp>
#include <map>

PXR_NAMESPACE_OPEN_SCOPE

Expand Down

0 comments on commit fd2842e

Please sign in to comment.