diff --git a/CMakeLists.txt b/CMakeLists.txt index 233e4be1..a16e7a3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,7 +20,7 @@ if(DIFFVG_CUDA) set(CMAKE_CUDA_STANDARD 11) if(NOT WIN32) # Hack: for some reason the line above doesn't work on some Linux systems. - set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++11") + set(CUDA_NVCC_FLAGS "${CUDA_NVCC_FLAGS} -std=c++17") #set(CUDA_NVCC_FLAGS_DEBUG "-g -G") endif() else() @@ -118,7 +118,7 @@ elseif(APPLE) set_target_properties(diffvg PROPERTIES INSTALL_RPATH "@loader_path") endif() -set_property(TARGET diffvg PROPERTY CXX_STANDARD 11) +set_property(TARGET diffvg PROPERTY CXX_STANDARD 17) set_target_properties(diffvg PROPERTIES PREFIX "") # Still enable assertion in release mode string( REPLACE "/DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}") diff --git a/pydiffvg_tensorflow/custom_ops/CMakeLists.txt b/pydiffvg_tensorflow/custom_ops/CMakeLists.txt index e15c953c..ab4c2728 100644 --- a/pydiffvg_tensorflow/custom_ops/CMakeLists.txt +++ b/pydiffvg_tensorflow/custom_ops/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.12) -set(CMAKE_CXX_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) project(diffvgTFCustomOp) diff --git a/pydiffvg_tensorflow/custom_ops/data_ptr.cc b/pydiffvg_tensorflow/custom_ops/data_ptr.cc index cb3caff3..48729ed7 100644 --- a/pydiffvg_tensorflow/custom_ops/data_ptr.cc +++ b/pydiffvg_tensorflow/custom_ops/data_ptr.cc @@ -27,7 +27,7 @@ REGISTER_OP("DataPtr") .Output("output: uint64") // scalar .SetShapeFn([](::tensorflow::shape_inference::InferenceContext* c) { c->set_output(0, {}); // scalar - return Status::OK(); + return Status(); }); template