Skip to content

Commit f73623b

Browse files
committed
MSVC: correct __cplusplus to use 8bit for OSPUnstructuredCellType, closes #39
1 parent 1ba4572 commit f73623b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ cmake_minimum_required(VERSION 3.15)
55

66
project(ospray_studio VERSION 1.2.0 LANGUAGES CXX C)
77

8+
# https://gitlab.kitware.com/cmake/cmake/-/issues/18837
9+
if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914))
10+
add_compile_options(/Zc:__cplusplus)
11+
endif()
12+
813
include(GNUInstallDirs)
914
include(ProcessorCount)
1015

sg/generator/UnstructuredVol.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void UnstructuredVol::generateData()
166166
std::vector<uint32_t> cells = {0, 8, 14, 18};
167167

168168
// define cell types
169-
std::vector<OSPUnstructuredCellType> cellTypes = {
169+
std::vector<uint8_t> cellTypes = {
170170
OSP_HEXAHEDRON, OSP_WEDGE, OSP_TETRAHEDRON, OSP_PYRAMID};
171171

172172
auto &volume = tf.createChild("unstructured_volume", "volume_unstructured");

0 commit comments

Comments
 (0)