Make non-emscripten flags platform agnostic.
authorRyan Harrison <rharrison@google.com>
Fri, 9 Aug 2019 15:19:07 +0000 (11:19 -0400)
committerRyan Harrison <rharrison@google.com>
Fri, 9 Aug 2019 15:19:07 +0000 (11:19 -0400)
CMakeLists.txt

index 788a547..4ebdb21 100644 (file)
@@ -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)