Force disable exception of nonstd::optional.

[experimental] Add CMakePresets.json
This commit is contained in:
Syoyo Fujita
2022-11-04 23:10:22 +09:00
parent 51387cf5ce
commit 34b6e19c13
5 changed files with 57 additions and 14 deletions

5
.gitignore vendored
View File

@@ -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
View 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}
}
]
}

View File

@@ -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

View File

@@ -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__

View File

@@ -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.