mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.88k stars 1.19k forks source link

Build issues on Windows #64

Closed lookup1980 closed 8 years ago

lookup1980 commented 8 years ago

Hi,

I tried pbrt-v3 on Windows, and there're 2 build issues:

  1. bash command in CMake does not work well on Windows: COMMAND bash -c "if [[ -e ${CMAKE_BINARY_DIR}/pbrtparse.hpp ]]\; then /bin/mv ${CMAKE_BINARY_DIR}/pbrtparse.hpp ${CMAKE_BINARY_DIR}/pbrtparse.hh\; fi" The command below works, and it should be portable to Linux and OSX: COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_BINARY_DIR}/pbrtparse.hpp ${CMAKE_BINARY_DIR}/pbrtparse.hh
  2. The project can't build with VisualStudio2012, which does not have header file cinttypes. VisualStudio2015 works for me.
mmp commented 8 years ago
  1. Should be fixed now (with a slightly different fix, but thanks for letting me know about "cmake -E rename!"
  2. VS2012's C++11 support is almost certainly too incomplete to support pbrt-v3--we use too many C++11 features. (Even getting VS2013 to build it is still a work in progress...)