Blame 0002-jsonnet-0.17.0-do-not-override-compiler-flags.patch

949f392
From 052efc6196c602db6b72f95d09f838cde6070127 Mon Sep 17 00:00:00 2001
949f392
From: Ben Beasley <code@musicinmybrain.net>
949f392
Date: Wed, 23 Jun 2021 13:20:22 -0500
949f392
Subject: [PATCH] patch CMakeLists.txt to stop overriding build flags
949f392
949f392
---
949f392
 CMakeLists.txt | 8 +++-----
949f392
 1 file changed, 3 insertions(+), 5 deletions(-)
949f392
949f392
diff --git a/CMakeLists.txt b/CMakeLists.txt
949f392
index 5df20ca..1d6eb73 100644
949f392
--- a/CMakeLists.txt
949f392
+++ b/CMakeLists.txt
949f392
@@ -35,16 +35,14 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${GLOBAL_OUTPUT_PATH})
949f392
 # Compiler flags.
949f392
 if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR
949f392
         ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
949f392
-    set(OPT "-O3")
949f392
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -pedantic -std=c99 -O3 ${OPT}")
949f392
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Woverloaded-virtual -pedantic -std=c++11 -fPIC ${OPT}")
949f392
+    set(OPT "")
949f392
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -Wall -Wextra -pedantic ${OPT}")
949f392
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -Woverloaded-virtual -pedantic -fPIC ${OPT}")
949f392
 else()
949f392
     # TODO: Windows support.
949f392
     message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported")
949f392
 endif()
949f392
 
949f392
-set(CMAKE_CXX_STANDARD 11)
949f392
-
949f392
 
949f392
 # Include external googletest project. This runs a CMake sub-script
949f392
 # (CMakeLists.txt.in) that downloads googletest source. It's then built as part
949f392
-- 
949f392
2.31.1
949f392