mirror of
https://github.com/lighttransport/tinyusdz.git
synced 2026-01-18 01:11:17 +01:00
Force disable exception of nonstd::optional.
[experimental] Add CMakePresets.json
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -350,3 +350,8 @@ healthchecksdb
|
||||
|
||||
# Backup folder for Package Reference Convert tool in Visual Studio 2017
|
||||
MigrationBackup/
|
||||
|
||||
compile_commands.json
|
||||
|
||||
# Cmake
|
||||
CMakeUserPresets.json
|
||||
|
||||
45
CMakePresets.json
Normal file
45
CMakePresets.json
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"version": 2,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 20,
|
||||
"patch": 0
|
||||
},
|
||||
"configurePresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"displayName": "Default Config",
|
||||
"description": "Default build using Ninja generator",
|
||||
"generator": "Ninja",
|
||||
"binaryDir": "${sourceDir}/build/default",
|
||||
"cacheVariables": {
|
||||
"FIRST_CACHE_VARIABLE": {
|
||||
"type": "BOOL",
|
||||
"value": "OFF"
|
||||
},
|
||||
"SECOND_CACHE_VARIABLE": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ninja-multi",
|
||||
"inherits": "default",
|
||||
"displayName": "Ninja Multi-Config",
|
||||
"description": "Default build using Ninja Multi-Config generator",
|
||||
"generator": "Ninja Multi-Config"
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default"
|
||||
}
|
||||
],
|
||||
"testPresets": [
|
||||
{
|
||||
"name": "default",
|
||||
"configurePreset": "default",
|
||||
"output": {"outputOnFailure": true},
|
||||
"execution": {"noTestsAction": "error", "stopOnFailure": true}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -53,6 +53,12 @@
|
||||
|
||||
// Control presence of exception handling (try and auto discover):
|
||||
|
||||
// TinyUSDZ mod. Force disable exception.
|
||||
#if defined( optional_CONFIG_NO_EXCEPTIONS )
|
||||
#undef optional_CONFIG_NO_EXCEPTIONS
|
||||
#define optional_CONFIG_NO_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
#ifndef optional_CONFIG_NO_EXCEPTIONS
|
||||
# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || defined(_CPPUNWIND)
|
||||
# define optional_CONFIG_NO_EXCEPTIONS 0
|
||||
|
||||
@@ -22,19 +22,6 @@
|
||||
#endif
|
||||
|
||||
// TODO(syoyo): Use C++17 std::optional, std::string_view when compiled with C++-17 compiler
|
||||
|
||||
// clang and gcc
|
||||
#if defined(__EXCEPTIONS) || defined(__cpp_exceptions)
|
||||
#define nsel_CONFIG_NO_EXCEPTIONS 0
|
||||
#define nssv_CONFIG_NO_EXCEPTIONS 0
|
||||
#else
|
||||
// -fno-exceptions
|
||||
#ifndef nsel_CONFIG_NO_EXCEPTIONS
|
||||
#define nsel_CONFIG_NO_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
#define nssv_CONFIG_NO_EXCEPTIONS 1
|
||||
#endif
|
||||
#include "nonstd/optional.hpp"
|
||||
|
||||
#ifdef __clang__
|
||||
|
||||
@@ -7,7 +7,7 @@ Instead, we'd like to propose Tydra, a three-headed monster(Please imagine Gidor
|
||||
|
||||
Currently Tydra is considering following three usecases in mind:
|
||||
|
||||
- Runtime publishment(e.g. to glTF), DCC conversion, data exchange.
|
||||
- Runtime publishment(e.g. to glTF), DCC conversion and exchange for realtime graphics(AR, VR, MR, games, etc).
|
||||
- Scene conversion to GL/Vulkan renderer(e.g. WebGL rendering)
|
||||
- Scene conversion to Ray tracing renderer(e.g. Vulkan/OptiX ray tracing)
|
||||
See `../../examples/sdlviewer/` for SW raytracing example.
|
||||
|
||||
Reference in New Issue
Block a user