Skip to content

Commit

Permalink
MSVC: correct __cplusplus to use 8bit for OSPUnstructuredCellType, cl…
Browse files Browse the repository at this point in the history
…oses #39
johguenther committed Jan 8, 2025
1 parent 1ba4572 commit f73623b
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -5,6 +5,11 @@ cmake_minimum_required(VERSION 3.15)

project(ospray_studio VERSION 1.2.0 LANGUAGES CXX C)

# https://gitlab.kitware.com/cmake/cmake/-/issues/18837
if (MSVC AND (MSVC_VERSION GREATER_EQUAL 1914))
add_compile_options(/Zc:__cplusplus)
endif()

include(GNUInstallDirs)
include(ProcessorCount)

2 changes: 1 addition & 1 deletion sg/generator/UnstructuredVol.cpp
Original file line number Diff line number Diff line change
@@ -166,7 +166,7 @@ void UnstructuredVol::generateData()
std::vector<uint32_t> cells = {0, 8, 14, 18};

// define cell types
std::vector<OSPUnstructuredCellType> cellTypes = {
std::vector<uint8_t> cellTypes = {
OSP_HEXAHEDRON, OSP_WEDGE, OSP_TETRAHEDRON, OSP_PYRAMID};

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

0 comments on commit f73623b

Please sign in to comment.