diff --git a/CMakeLists.txt b/CMakeLists.txt index d2e82bb6..81271f79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,7 @@ endif() set(PROJECT_NAME ShaderConductor) project(${PROJECT_NAME}) + if(SC_WITH_CSHARP) project(${PROJECT_NAME} LANGUAGES CSharp) set(CMAKE_CSharp_FLAGS "/langversion:7") @@ -32,7 +33,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${SC_BUILD_DIR}/Lib) set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${SC_BUILD_DIR}/Lib) if((CMAKE_C_COMPILER_ID MATCHES GNU) OR (CMAKE_C_COMPILER_ID MATCHES Clang)) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1z") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14") endif() if (CMAKE_C_COMPILER_ID MATCHES Clang) foreach(flagVar diff --git a/Source/Core/ShaderConductor.cpp b/Source/Core/ShaderConductor.cpp index 3ccbde3f..e762577d 100644 --- a/Source/Core/ShaderConductor.cpp +++ b/Source/Core/ShaderConductor.cpp @@ -274,7 +274,7 @@ namespace private: std::function m_loadCallback; - std::atomic m_ref = 0; + std::atomic m_ref = {0}; }; Blob DefaultLoadCallback(const char* includeName)