mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-09 13:50:05 +00:00
Merge pull request #1297 from davidgyu/dev_cxx_version
Updated C++ standard to C++14
This commit is contained in:
commit
dbb23be83d
@ -26,6 +26,17 @@ cmake_minimum_required(VERSION 3.12)
|
||||
|
||||
project(OpenSubdiv)
|
||||
|
||||
# Set C++ standard requirements, allowing overrides
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD)
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
endif()
|
||||
if (NOT DEFINED CMAKE_CXX_STANDARD_REQUIRED)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
endif()
|
||||
if (NOT DEFINED CMAKE_CXX_EXTENSIONS)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
endif()
|
||||
|
||||
# Turn on folder support
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
@ -446,12 +457,6 @@ endif()
|
||||
|
||||
if( METAL_FOUND AND NOT NO_METAL)
|
||||
set(OSD_GPU TRUE)
|
||||
if (CMAKE_COMPILER_IS_CLANGCC)
|
||||
# When building with Metal support enabled, we need to explicitly
|
||||
# request that the C++ code be compiled with C++11 since some example
|
||||
# code for Metal relies on functionality only available in C++11.
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if( OPENGL_FOUND AND NOT NO_OPENGL)
|
||||
|
@ -157,8 +157,6 @@ if(METAL_FOUND)
|
||||
mtlHud.h
|
||||
)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
|
||||
add_library(examples_common_mtl_obj
|
||||
OBJECT
|
||||
${EXAMPLES_COMMON_SOURCE_FILES}
|
||||
|
@ -108,10 +108,6 @@ if(IOS)
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set_property (TARGET mtlPtexViewer PROPERTY CXX_STANDARD 14)
|
||||
|
||||
target_link_libraries(mtlPtexViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
@ -104,10 +104,6 @@ if(IOS)
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
set_property (TARGET mtlViewer PROPERTY CXX_STANDARD 14)
|
||||
|
||||
target_link_libraries(mtlViewer
|
||||
${PLATFORM_LIBRARIES}
|
||||
)
|
||||
|
@ -80,7 +80,6 @@ if (NOT NO_LIB)
|
||||
list(APPEND PLATFORM_GPU_LIBRARIES
|
||||
${METAL_LIBRARIES}
|
||||
)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
||||
endif()
|
||||
|
||||
if ( OPENCL_FOUND )
|
||||
|
Loading…
Reference in New Issue
Block a user