This makes it more clear to users when SPIR-V optimization is disabled
because SPIRV-Tools could not be found, and suggests alternatives for
finding it.
This allows to build with optimizer enabled, if external SPIR-V tools
libraries are available in the system. It is quite common in *nix world
to package spirv-tools and glslang separately.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
Build fails due to external dependency on SPIRV-Tools.
EX:
```
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
CMake Error at External/spirv-tools/CMakeLists.txt:15 (cmake_minimum_required):
CMake 3.17.2 or higher is required. You are running version 3.14.0
```
The web/emscripten build has been broken for an unknown amount of time
and for multiple reasons:
- Calling `cat` on Windows
- The latest version of wasm-ld does not support the `--no-undefined`
flag
- `ccall` was not being exported
Fixes#3272.
Currently with the build instructions provided in README.md
the build will fail.
In the r25 NDK the CMake toolchain defaults to the legacy path,
due to a bug in the current implementation.
https://github.com/android/ndk/issues/323
The FindPythonInterp and FindPythonLibs modules, which have
been deprecated since CMake 3.12, have been removed by policy
CMP0148. Port projects to FindPython3, FindPython2, or FindPython.
While trying to set a default for CMAKE_INSTALL_PREFIX sounds
appealing it has multiple issues.
It's particularly problematic for open source projects where
many users try to accomplish many different things.
It's also conflicting with the new way of installing with cmake
IE: `cmake --install build --prefix build/install`
I've already removed similar logic in various other Khronos
repositories a while ago to address similar complaints.
closes#1015
This is no longer needed with modern CMake.
I've already removed this from several Khronos repos.
See this stackoverflow for modern approaches to setting ccache via cmake:
https://stackoverflow.com/a/74120112/19739129
OpenBSD does not link shared libs against libc so it is expected
that the use of --no-undefined when linking will fail.
Also garbage collect CMAKE_VERSION check while here, as requested, since
the minimum version is already 3.14.
At least on openSUSE, the usual installation location for cmake support
files is ${MAKE_INSTALL_LIBDIR}/cmake/<name>
$ find /usr/lib64 -name '*.cmake' | grep /cmake/ | wc -l
834
$ find /usr/lib64 -name '*.cmake' | grep -v /cmake/ | wc -l
8
which is also used by glslang with these changes.
pre compiled headers leads to "internal error in mingw32_gt_pch_use_address, at config/i386/host-mingw32.c:192: MapViewOfFileEx: Attempt to access invalid address"
[BEFORE]:
% cmake ..
CMake Warning (dev) at CMakeLists.txt:35 (project):
Policy CMP0048 is not set: project() command manages VERSION variables.
Run "cmake --help-policy CMP0048" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
The following variable(s) would be set to empty:
CMAKE_PROJECT_VERSION
CMAKE_PROJECT_VERSION_MAJOR
CMAKE_PROJECT_VERSION_MINOR
CMAKE_PROJECT_VERSION_PATCH
This warning is for project developers. Use -Wno-dev to suppress it.
-- No build type selected, default to Debug
-- Found PythonInterp: /usr/local/bin/python3 (found version "3.9")
-- Found PythonInterp: /usr/local/bin/python3 (found suitable version "3.9", minimum required is "3")
-- optimizer enabled
-- Google Mock found - building tests
-- Configuring done
[AFTER]:
% cmake ..
-- No build type selected, default to Debug
-- Google Mock was not found - tests based on that will not build
-- Configuring done
-- Generating done
iOS 8 does not support `thread_local`, which is still in use.
Another approach will have to be found.
This change is a revert of the following changes:
a3845240 - "Simplify PoolAlloc with use of thread_local."
abf92c80 - "Deprecate InitializeDll functions"
33585c87 - "Limit visibility of symbols for internal libraries"
Issue: #2346
Also remove `SPIRV/doc.cpp` from the `SPVRemapper` target as this
is part of `SPIRV`, causing ODR violations. Instead have
`SPVRemapper` link against `SPIRV`.
Fixes ODR violations.