mirror of
https://github.com/mmp/pbrt-v4
synced 2026-09-26 16:20:07 +03:00
Restrict accepted OpenEXR version (#119)
* CMake: Validate the version of the system OpenEXR
Let CMake validate that the version of the OpenEXR library we found
satisfies what was specified when calling `find_package(OpenEXR)`, for
example if a minimum or exact version were required.
* CMake: Restrict system OpenEXR versions to 2.3+
Versions prior to 2.3 are not compatible with C++17, due to for example
using the `register` storage class specifier or dynamic exception
specifications via the `throw` keyword.
Fixes regression introduced in cb2e8ae397
for systems with OpenEXR <2.3.
Fixes #117.
This commit is contained in:
parent
7bcf583201
commit
e1ebc7218a
2 changed files with 2 additions and 1 deletions
|
|
@ -227,6 +227,7 @@ find_package_handle_standard_args (OpenEXR
|
|||
REQUIRED_VARS ILMBASE_INCLUDE_PATH OPENEXR_INCLUDE_PATH
|
||||
OPENEXR_IMATH_LIBRARY OPENEXR_ILMIMF_LIBRARY
|
||||
OPENEXR_IEX_LIBRARY OPENEXR_HALF_LIBRARY
|
||||
VERSION_VAR OPENEXR_VERSION
|
||||
)
|
||||
|
||||
if (OPENEXR_FOUND)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ set (ZLIB_LIBRARIES ${ZLIB_LIBARIES} PARENT_SCOPE)
|
|||
###########################################################################
|
||||
# OpenEXR
|
||||
|
||||
find_package (OpenEXR)
|
||||
find_package (OpenEXR 2.3) # 2.3 is the first version compatible with C++17
|
||||
|
||||
if (OPENEXR_FOUND)
|
||||
message (STATUS "Found OpenEXR version ${OPENEXR_VERSION}")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue