summaryrefslogtreecommitdiff
path: root/win
diff options
context:
space:
mode:
authorunknown <reggie@big_geek.>2006-02-08 11:18:17 -0600
committerunknown <reggie@big_geek.>2006-02-08 11:18:17 -0600
commita9ccd2d8d5c410fee655a1859a8f99bb33888604 (patch)
tree176388c0fbcaf9c2e4ff3be227b56e0851c7a9d0 /win
parentb38ec6f44adadef5e8838da24614edc60d08758b (diff)
downloadmariadb-git-a9ccd2d8d5c410fee655a1859a8f99bb33888604.tar.gz
cmakefiles cleanup
win/cmakefiles/base: add flag for diabling insecure crt functions warning win/cmakefiles/client: add dependency to GenError to make sure the error files are made win/cmakefiles/extra: add custom target to run comp_err win/cmakefiles/sql: removed comp_err stuff.
Diffstat (limited to 'win')
-rw-r--r--win/cmakefiles/base7
-rw-r--r--win/cmakefiles/client10
-rw-r--r--win/cmakefiles/extra12
-rw-r--r--win/cmakefiles/sql51
4 files changed, 53 insertions, 27 deletions
diff --git a/win/cmakefiles/base b/win/cmakefiles/base
index 6cc11a1e174..f8ac9969a26 100644
--- a/win/cmakefiles/base
+++ b/win/cmakefiles/base
@@ -6,6 +6,13 @@ EXEC_PROGRAM(cscript.exe win ARGS config-version.js OUT_VARIABLE out)
SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -D DBUG_OFF")
SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -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_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /wd4996")
+ SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /wd4996")
+ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 8")
+
IF(CMAKE_GENERATOR MATCHES "Visual Studio 7" OR CMAKE_GENERATOR MATCHES "Visual Studio 8")
# replace /MDd with /MTd
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
diff --git a/win/cmakefiles/client b/win/cmakefiles/client
index 711a5bf499b..7c0c6f2400b 100644
--- a/win/cmakefiles/client
+++ b/win/cmakefiles/client
@@ -2,7 +2,10 @@ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_CLIENT)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/libmysql)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/zlib
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include
+ ${CMAKE_SOURCE_DIR}/libmysql)
ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/bmove_upp.c ../mysys/charset-def.c ../mysys/charset.c
@@ -38,10 +41,9 @@ ADD_LIBRARY(mysqlclient ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../strings/strmov.c ../strings/strnlen.c ../strings/strnmov.c ../strings/strtod.c
../strings/strtoll.c ../strings/strtoull.c ../strings/strxmov.c ../strings/strxnmov.c
../mysys/thr_mutex.c ../mysys/typelib.c ../vio/vio.c ../vio/viosocket.c
- ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c
- ${PROJECT_SOURCE_DIR}/include/mysql_version.h)
+ ../vio/viossl.c ../vio/viosslfactories.c ../strings/xml.c)
-ADD_DEPENDENCIES(mysqlclient comp_err)
+ADD_DEPENDENCIES(mysqlclient GenError)
ADD_EXECUTABLE(mysql completion_hash.cc mysql.cc readline.cc sql_string.cc)
LINK_DIRECTORIES(${MYSQL_BINARY_DIR}/mysys ${MYSQL_BINARY_DIR}/zlib)
TARGET_LINK_LIBRARIES(mysql mysqlclient mysys yassl zlib dbug yassl taocrypt wsock32)
diff --git a/win/cmakefiles/extra b/win/cmakefiles/extra
index 5fedfcac2b9..40327eac0ad 100644
--- a/win/cmakefiles/extra
+++ b/win/cmakefiles/extra
@@ -6,4 +6,16 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(comp_err comp_err.c)
TARGET_LINK_LIBRARIES(comp_err dbug mysys strings wsock32)
+GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
+
+ADD_CUSTOM_TARGET(GenError
+ ${COMP_ERR_EXE} --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
+ --out-dir=${PROJECT_SOURCE_DIR}/sql/share/
+ --header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
+ --name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
+ --state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
+ --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
+ DEPENDS comp_err ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt)
+
+
diff --git a/win/cmakefiles/sql b/win/cmakefiles/sql
index 8361038bf4f..ee53436a1a6 100644
--- a/win/cmakefiles/sql
+++ b/win/cmakefiles/sql
@@ -1,7 +1,11 @@
SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")
SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR")
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/sql ${CMAKE_SOURCE_DIR}/regex ${CMAKE_SOURCE_DIR}/zlib)
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
+ ${CMAKE_SOURCE_DIR}/extra/yassl/include
+ ${CMAKE_SOURCE_DIR}/sql
+ ${CMAKE_SOURCE_DIR}/regex
+ ${CMAKE_SOURCE_DIR}/zlib)
SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc
${CMAKE_SOURCE_DIR}/sql/message.h
@@ -46,6 +50,7 @@ ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc discover.
${PROJECT_SOURCE_DIR}/sql/handlerton.cc
${PROJECT_SOURCE_DIR}/sql/lex_hash.h)
TARGET_LINK_LIBRARIES(mysqld heap myisam myisammrg innobase mysys yassl zlib dbug yassl taocrypt strings vio regex wsock32)
+ADD_DEPENDENCIES(mysqld GenError)
# Sql Parser custom command
ADD_CUSTOM_COMMAND(
@@ -82,30 +87,30 @@ ADD_CUSTOM_COMMAND(
DEPENDS ${PROJECT_SOURCE_DIR}/sql/handlerton.cc.in)
# Error file
-GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
-ADD_CUSTOM_COMMAND(
- SOURCE ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
- OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
- COMMAND ${COMP_ERR_EXE}
- ARGS --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
- --out-dir=${PROJECT_SOURCE_DIR}/sql/share/
- --header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
- --name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
- --state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
- --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
- DEPENDS ${COMP_ERR_EXE} share/errmsg.txt)
+#GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
+#ADD_CUSTOM_COMMAND(
+ #SOURCE ${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
+ #OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
+ #COMMAND ${COMP_ERR_EXE}
+ #ARGS --charset=${PROJECT_SOURCE_DIR}/sql/share/charsets
+ # --out-dir=${PROJECT_SOURCE_DIR}/sql/share/
+## --header_file=${PROJECT_SOURCE_DIR}/include/mysqld_error.h
+# --name_file=${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
+# --state_file=${PROJECT_SOURCE_DIR}/include/sql_state.h
+ # --in_file=${PROJECT_SOURCE_DIR}/sql/share/errmsg.txt
+ # DEPENDS ${COMP_ERR_EXE} share/errmsg.txt)
-ADD_CUSTOM_COMMAND(
- OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
- COMMAND echo
- DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
-)
+#ADD_CUSTOM_COMMAND(
+# OUTPUT ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
+# COMMAND echo
+# DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_error.h
+#)
-ADD_CUSTOM_COMMAND(
- OUTPUT ${PROJECT_SOURCE_DIR}/include/sql_state.h
- COMMAND echo
- DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
-)
+#ADD_CUSTOM_COMMAND(
+# OUTPUT ${PROJECT_SOURCE_DIR}/include/sql_state.h
+# COMMAND echo
+# DEPENDS ${PROJECT_SOURCE_DIR}/include/mysqld_ername.h
+#)
# Gen_lex_hash