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

improve detection of c++11 features #132

Closed mmp closed 7 years ago

mmp commented 7 years ago

Given #131, at minimum we should have a compile-time check for at least version 4.8 with gcc.

Related: http://stackoverflow.com/questions/14933172/how-can-i-add-a-minimum-compiler-version-requisite

More generally it's probably better to use cmake's TRY_COMPILE stuff to populate the stuff in core/port.h and fail compilation as appropriate.

mmp commented 7 years ago

Mostly addressed in d42c4b08a8abeae203b201de8e7103d461014b67; that doesn't have an explicit gcc version check, but does check for the presence of alignas, which is what the issue was here.