From ff7b01d8d436f77325de5cbf2f0c520a6fa35164 Mon Sep 17 00:00:00 2001
From: unknown <kent@mysql.com/kent-amd64.(none)>
Date: Thu, 22 Mar 2007 16:53:37 +0100
Subject: [PATCH] Makefile.am:   Don't install benchmark executable
 CMakeLists.txt:   Handle CMAKE_C_FLAGS_RELWITHDEBINFO and
 CMAKE_CXX_FLAGS_RELWITHDEBINFO

extra/yassl/taocrypt/benchmark/Makefile.am:
  Don't install benchmark executable
CMakeLists.txt:
  Handle CMAKE_C_FLAGS_RELWITHDEBINFO and CMAKE_CXX_FLAGS_RELWITHDEBINFO
mysys/CMakeLists.txt:
  Handle CMAKE_C_FLAGS_RELWITHDEBINFO and CMAKE_CXX_FLAGS_RELWITHDEBINFO
---
 CMakeLists.txt                             | 8 ++++++++
 extra/yassl/taocrypt/benchmark/Makefile.am | 2 +-
 mysys/CMakeLists.txt                       | 2 ++
 3 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index b458864c41..2a76361693 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,13 +86,17 @@ ENDIF(CYBOZU)
 
 # in some places we use DBUG_OFF
 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D DBUG_OFF")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -D DBUG_OFF")
 SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -D DBUG_OFF")
+SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -D DBUG_OFF")
 
 IF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
     SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /wd4996")
     SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /wd4996")
+    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /wd4996")
     SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
     SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
+    SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} /wd4996")
 ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
 
 IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR 
@@ -104,10 +108,14 @@ IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR
 	       ${CMAKE_C_FLAGS_DEBUG_INIT})
 	STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELEASE 
 	       ${CMAKE_C_FLAGS_RELEASE})
+	STRING(REPLACE "/MD" "/MT" CMAKE_C_FLAGS_RELWITHDEBINFO 
+	       ${CMAKE_C_FLAGS_RELWITHDEBINFO})
 	STRING(REPLACE "/MDd" "/MTd" CMAKE_C_FLAGS_DEBUG 
 	       ${CMAKE_C_FLAGS_DEBUG})
 	STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELEASE 
 	       ${CMAKE_CXX_FLAGS_RELEASE})
+	STRING(REPLACE "/MD" "/MT" CMAKE_CXX_FLAGS_RELWITHDEBINFO 
+	       ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
 	STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG 
 	       ${CMAKE_CXX_FLAGS_DEBUG})
 
diff --git a/extra/yassl/taocrypt/benchmark/Makefile.am b/extra/yassl/taocrypt/benchmark/Makefile.am
index 891dd532b9..2fe1c90c90 100644
--- a/extra/yassl/taocrypt/benchmark/Makefile.am
+++ b/extra/yassl/taocrypt/benchmark/Makefile.am
@@ -1,5 +1,5 @@
 INCLUDES = -I$(srcdir)/../include -I$(srcdir)/../mySTL
-bin_PROGRAMS       = benchmark
+noinst_PROGRAMS    = benchmark
 benchmark_SOURCES  = benchmark.cpp
 benchmark_LDADD    = $(top_builddir)/extra/yassl/taocrypt/src/libtaocrypt.la
 benchmark_CXXFLAGS = -DYASSL_PURE_C
diff --git a/mysys/CMakeLists.txt b/mysys/CMakeLists.txt
index f529b559fb..608d7cb1ce 100755
--- a/mysys/CMakeLists.txt
+++ b/mysys/CMakeLists.txt
@@ -22,7 +22,9 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
 # Currently, USE_TLS crashes in Debug builds, so until that is fixed Debug
 # .dlls cannot be loaded at runtime.
 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DUSE_TLS")
+SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DUSE_TLS")
 SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -DUSE_TLS")
+SET(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -DUSE_TLS")
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/mysys )
 ADD_LIBRARY(mysys array.c charset-def.c charset.c checksum.c default.c default_modify.c
-- 
2.30.9