Skip to content

Commit e69f41e

Browse files
committed
Cleanup
1 parent 29141e2 commit e69f41e

2 files changed

Lines changed: 3 additions & 46 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ SET(STATIC_MSVCRT ON CACHE BOOL "force static lib" FORCE)
4444

4545
SET(WITH_UNIT_TESTS OFF CACHE BOOL "no mysql tests" FORCE)
4646
set(WITH_SSL "OFF" CACHE STRING "Disabled for now" FORCE)
47-
#set(LIBMARIADB_PLUGIN_LIBS "libcmtd.lib" CACHE STRING "force static build" FORCE)
47+
#TODO test with wolfssl
4848

4949
if(CMAKE_COMPILER_IS_GNUCXX)
5050
set(CMAKE_CXX_FLAGS "-std=c++1z -O2 -s -fPIC -fpermissive -static-libgcc -static-libstdc++")#-march=i686 -m32
@@ -59,51 +59,6 @@ else()
5959
endif()
6060

6161

62-
63-
64-
# Override add_library() and set the "EXCLUDE_FROM_DEFAULT_BUILD" property to TRUE on all libraries that use "EXCLUDE_FROM_ALL".
65-
function(add_library TARGET)
66-
_add_library(${TARGET} ${ARGN})
67-
cmake_parse_arguments(OPTS "EXCLUDE_FROM_ALL" "" "" ${ARGN})
68-
if(OPTS_EXCLUDE_FROM_ALL)
69-
set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)
70-
endif()
71-
endfunction()
72-
73-
# Helper function to recursively set EXCLUDE_FROM_DEFAULT_BUILD to FALSE on all targets "TARGET" depends on
74-
function(_include_in_build TARGET)
75-
if(TARGET ${TARGET})
76-
get_target_property(TYPE ${TARGET} TYPE)
77-
if(TYPE MATCHES "INTERFACE")
78-
get_target_property(DEPS ${TARGET} INTERFACE_LINK_LIBRARIES)
79-
else()
80-
set_target_properties(${TARGET} PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD FALSE)
81-
get_target_property(DEPS ${TARGET} LINK_LIBRARIES)
82-
endif()
83-
if(DEPS)
84-
foreach(D ${DEPS})
85-
_include_in_build(${D})
86-
endforeach()
87-
endif()
88-
endif()
89-
endfunction()
90-
91-
# Take executables as roots to run _include_in_build() on
92-
function(target_link_libraries TARGET)
93-
_target_link_libraries(${TARGET} ${ARGN})
94-
95-
get_target_property(_TYPE ${TARGET} TYPE)
96-
if(_TYPE MATCHES "EXECUTABLE")
97-
_include_in_build(${TARGET})
98-
endif()
99-
endfunction()
100-
101-
102-
103-
104-
105-
106-
10762
add_subdirectory(mariadb-connector-c)
10863

10964
CONFIGURE_FILE("${CMAKE_CURRENT_BINARY_DIR}/mariadb-connector-c/include/mariadb_version.h"

src/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
5252
else()
5353
set(CMAKE_CXX_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 /MP /EHsc")
5454
set(CMAKE_CXX_FLAGS_RELEASE "/MT /Zi /O2 /Ob1 /EHsc /MP") #with debug info
55+
set(CMAKE_C_FLAGS_DEBUG "/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1 /MP /EHsc")
56+
set(CMAKE_C_FLAGS_RELEASE "/MT /Zi /O2 /Ob1 /EHsc /MP") #with debug info
5557
set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "/OPT:REF /DEBUG:FULL")
5658
endif()

0 commit comments

Comments
 (0)