From 7eb3e6e07a3ad8e5e501ceadcc3f4703ade05281 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 9 Aug 2019 11:19:07 -0400 Subject: [PATCH] Make non-emscripten flags platform agnostic. --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 788a5477..4ebdb21b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -120,8 +120,13 @@ if(ENABLE_GLSLANG_WEB) if(ENABLE_EMSCRIPTEN_SINGLE_FILE) add_link_options("SHELL: -s SINGLE_FILE=1") endif(ENABLE_EMSCRIPTEN_SINGLE_FILE) - else(EMSCRIPTEN) - add_compile_options(-Os -g -flto -fno-exceptions) + else() + if(MSVC) + add_compile_options(/Os /GR-) + else() + add_compile_options(-Os -fno-exceptions) + add_link_options(-Os) + endif() endif(EMSCRIPTEN) endif(ENABLE_GLSLANG_WEB)