Updated the CMake build to locate TBB using TBB's CMake config
and deleted the local cmake/FindTBB.cmake module.
While the source code remains compatible with earlier versions of
TBB, updated the minimum TBB version from 4.4 to 2018 since that
is the earliest TBB release to include a CMake config. This is
the version of TBB specified for the CY2019 VFX Reference Platform.
Tested on Windows, Linux, and macOS using TBB 2018 Update 6,
TBB 2020 Update 3, and oneTBB 2021.10.0
The MSVC build has been setting /W3 as an override for /Wall but this
has been causing generator specfic build inconsistencies.
For examples, this override works when using the Visual Studio generators,
but not when using the Ninja generator. This causes Ninja to build using
/Wall instead of /W3.
This removes the initial setting of /Wall to avoid this inconsistency.
We plan to continue to address compiler warnings to allow us to raise
this warning level further but that is a separate task.
The internal GL API Loader implementation is self contained and does
not require the system OpenGL implementation at build time, so we
don't need the OpenGL::GL import target for this case.
An earlier change added the OpenGL::GL import target for legacy uses
of GLEW and it remains correct there.
Fixes#1277
Also fixed the build so that obsolete CUDA gpu architectures
are specified as fallback values only when using older obsolete
versions of CUDA. We'll likely remove these fallbacks from future
releases of OpenSubdiv.
Fixes#1299
The OpenSubdiv public interface currently requires only C++11 but we
choose this version since C++14 has been the default since GCC 6,
Clang 6, and Visual Studio 2017 (for the most part) and C++14 has been
the default for OpenSubdiv on macOS when support for Metal is enabled.
This setting is guarded so that it can be overridden by the caller when
running CMake.
Fixes#1276
This is a slight improvement and fixes link problems in some
cases, though we expect to further improve handling of target
depenedencies overall.
Fixes#1277
Added an explicit target link dependency for OpenGL::GLX when
building example programs with CUDA on systems with GLX since
GLX is used by the example code used to initialize the CUDA
device context.
This is a simple workaround and we'd like to revisit and improve
how target dependencies are handled overall.
Fixes#1294
Added target include directories for the library targets
so that interface include directories are published with
the OpenSubdiv cmake config.
Also, removed a cmake version test which is no longer needed.
Fixes#1278
The cmake config export paths are now more consistent
with other vfx platform projects.
The target names are now more consistent with existing
opensubdiv static and dynamic library names.
This simplifies build dependencies when cross-compiling
or when building multi-architecture binaries.
For backward compatibility with earlier releases, the compiled
C++ version of this tool is used when no Python interpreter is found.
This adds support for the standard global option
BUILD_SHARED_LIBS
to select whether to build shared libraries.
Note that building shared DLL libraries is still
not yet supported on Windows.
At build time, the preprocessor symbols: OSD_USES_GLEW or
OSD_USES_INTERNAL_GLAPILOADER determine the GL API loader
that will be used by the OSD library.
This introduces an internal glLoader library which allows
most of the implementation to be agnostic about the
implementation of the GL loading library. Specifically,
this removes references to the GLEW headers and libraries
from the rest of the source code and build system.
The example code that uses Metal forces C++11 features, therefore
we have to turn it on clang so that we can enable the building of
compatible code that can be used by Metal and GL at the same time.
As mentioned in issue #997, OpenSubdiv still uses CUDA functionality
that is being deprecated. When warnings are treated as errors, this
can make OpenSubdiv fail to compile. For now, we turn off these
deprecation warnings until we can address them.
- changed the main OPENSUBDIV_INCLUDE_DIR to exclude ./opensubdiv
- updated CMakeLists.txt files in non-examples to use only this path
- updated CMakeLists.txt files in examples to append ./opensubdiv to path
- updated source in regression/common to use #include <opensubdiv/...>
- updated source in examples/common to use #include <opensubdiv/...>
- deferred source in examples to be updated on a case-by-case basis
Noticed a few typos when browsing comments. Proceeded with a "manual
spell check", reading all comments and tweaking spelling, grammar,
punctuation.
Didn't bother with Hbr library.
Comments only, no functional changes.
Previously, glew was forced to static linkage on windows, even when
dynamic Glew libraries were linked which would result in linker errors.
In this change, static glew libraries are detected by looking for the "s"
suffix convention on the library (though, maybe this should be handled in
the FindGlew module).
The symbol OPENSUBDIV_GREGORY_EVAL_TRUE_DERIVATIVES
determines the method used to compute derivative weights
for Gregory basis patches.
Setting this symbol during CMake configuration (and
hence during C++ and shader compilation) will enable
the use of true derivative weights.
The default behavior is to use a simpler approximation
for consistency with earlier releases.
Recent CUDA SDKs no longer support the "compute_11"
gpu architecture. We now fallback to "compute_20"
instead for newer SDK versions. Additionally, this
behavior can be overriden using the new CMake list
variable OSD_CUDA_NVCC_FLAGS so that it is easier
for clients to target newer architectures and specify
additional arguments.