From d3c02c75ba23b9730719703bfc7a0488c974b8d3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 24 Mar 2019 13:59:46 +0100 Subject: [PATCH] - set the GLSL compiler to always be built as Release. The compile times for the shaders in debug mode are simply far too long when compiled as Debug. --- glslang/OGLCompilersDLL/CMakeLists.txt | 3 +++ glslang/glslang/CMakeLists.txt | 3 +++ glslang/spirv/CMakeLists.txt | 3 +++ 3 files changed, 9 insertions(+) diff --git a/glslang/OGLCompilersDLL/CMakeLists.txt b/glslang/OGLCompilersDLL/CMakeLists.txt index 08d8cefd69..db97e565fe 100644 --- a/glslang/OGLCompilersDLL/CMakeLists.txt +++ b/glslang/OGLCompilersDLL/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 2.8.12) +make_release_only() +set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}" ) + # Request C++11 if(${CMAKE_VERSION} VERSION_LESS 3.1) # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD diff --git a/glslang/glslang/CMakeLists.txt b/glslang/glslang/CMakeLists.txt index f3fba3be57..4ac7159b3a 100644 --- a/glslang/glslang/CMakeLists.txt +++ b/glslang/glslang/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 2.8.12) +make_release_only() +set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}" ) + if(WIN32) add_subdirectory(OSDependent/Windows) elseif(UNIX) diff --git a/glslang/spirv/CMakeLists.txt b/glslang/spirv/CMakeLists.txt index 95439bf5b9..c7fc8f9838 100644 --- a/glslang/spirv/CMakeLists.txt +++ b/glslang/spirv/CMakeLists.txt @@ -1,5 +1,8 @@ cmake_minimum_required(VERSION 2.8.12) +make_release_only() +set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${ZD_FASTMATH_FLAG}" ) + # Request C++11 if(${CMAKE_VERSION} VERSION_LESS 3.1) # CMake versions before 3.1 do not understand CMAKE_CXX_STANDARD