From d245443e26ecdab6e6eec57db119ec57ee2d5981 Mon Sep 17 00:00:00 2001
From: Frank Bossen <fbossen@gmail.com>
Date: Tue, 23 Aug 2022 09:37:26 -0400
Subject: [PATCH] Reduce compile time for VC

---
 source/App/EncoderApp/EncAppCfg.cpp | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/source/App/EncoderApp/EncAppCfg.cpp b/source/App/EncoderApp/EncAppCfg.cpp
index 1cac6e72e..62f5a22f3 100644
--- a/source/App/EncoderApp/EncAppCfg.cpp
+++ b/source/App/EncoderApp/EncAppCfg.cpp
@@ -572,6 +572,10 @@ static uint32_t getMaxSlicesByLevel( Level::Name level )
     \param  argv        array of arguments
     \retval             true when success
  */
+#if _MSC_VER > 1000
+// Disable optimizations to avoid long compile times
+#pragma optimize( "", off )
+#endif
 bool EncAppCfg::parseCfg( int argc, char* argv[] )
 {
   bool do_help = false;
@@ -3299,6 +3303,9 @@ bool EncAppCfg::parseCfg( int argc, char* argv[] )
 
   return true;
 }
+#if _MSC_VER > 1000
+#pragma optimize( "", on )
+#endif
 
 
 // ====================================================================================================================
-- 
GitLab