Skip to content

Commit e35adc4

Browse files
committed
Merge branch 'refs/heads/wl12755-tls-ciphers'
2 parents b4e5947 + d789f37 commit e35adc4

31 files changed

+1867
-251
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/INFO_SRC
2+
/CMakeSettings.json
3+
.vs

CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ ENDIF()
5555
#
5656
set(CMAKE_INSTALL_PREFIX "" CACHE PATH "Install location")
5757

58+
#
59+
# Enable grouping targets into folders for IDE tools
60+
#
61+
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
5862

5963

6064
##########################################################################
@@ -76,6 +80,9 @@ include(libutils) # merge_libraries()
7680
message("Building on system: ${CMAKE_SYSTEM} (${CMAKE_SYSTEM_PROCESSOR})")
7781
message("Using cmake generator: ${CMAKE_GENERATOR}")
7882
#message("Compiler identification: ${CMAKE_CXX_COMPILER_ID}")
83+
if(DEFINED CMAKE_GENERATOR_TOOLSET)
84+
message("Using toolset: ${CMAKE_GENERATOR_TOOLSET}")
85+
endif()
7986

8087

8188
if(SUNPRO)
@@ -190,6 +197,7 @@ add_config_option(BUILD_STATIC BOOLEAN DEFAULT OFF
190197
)
191198

192199
if(BUILD_STATIC)
200+
193201
message("Building static connector library")
194202
set(BUILD_SHARED_LIBS OFF)
195203

@@ -200,6 +208,7 @@ if(BUILD_STATIC)
200208
)
201209

202210
else()
211+
203212
message("Building shared connector library")
204213
set(BUILD_SHARED_LIBS ON)
205214

@@ -306,6 +315,9 @@ endif()
306315

307316
add_subdirectory(cdk)
308317

318+
foreach(T cdk cdk_foundation cdk_mysqlx cdk_proto_mysqlx cdk_parser)
319+
set_target_properties(${T} PROPERTIES FOLDER "CDK")
320+
endforeach()
309321

310322
#
311323
# Unit tests framework
@@ -554,6 +566,7 @@ ENDIF (WITH_TESTS)
554566
add_executable(try EXCLUDE_FROM_ALL try.cc)
555567
target_link_libraries(try connector)
556568

569+
557570
if(WITH_JDBC)
558571

559572
add_executable(try_jdbc EXCLUDE_FROM_ALL try_jdbc.cc)
@@ -646,6 +659,8 @@ add_custom_target(link_test
646659
VERBATIM
647660
)
648661

662+
set_target_properties(link_test PROPERTIES FOLDER "Tests")
663+
649664
add_dependencies(link_test connector)
650665
#if(TARGET connector-merge)
651666
# add_dependencies(link_test connector-merge)

cdk/cmake/DepFindProtobuf.cmake

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,19 @@ set(CONFIG_EXPR
8585
$<$<CONFIG:Static>:Release>$<$<NOT:$<CONFIG:Static>>:$<CONFIG>>
8686
)
8787

88+
set(set_arch)
89+
if(CMAKE_GENERATOR_PLATFORM)
90+
set(set_arch -A ${CMAKE_GENERATOR_PLATFORM})
91+
endif()
92+
93+
set(set_toolset)
94+
if(CMAKE_GENERATOR_TOOLSET)
95+
set(set_toolset -T ${CMAKE_GENERATOR_TOOLSET})
96+
endif()
8897

8998
if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
9099

91-
message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR}")
100+
message("==== Configuring Protobuf build using cmake generator: ${CMAKE_GENERATOR} ${set_arch} ${set_toolset}")
92101

93102
file(REMOVE "${PB_BINARY_DIR}/CMakeCache.txt")
94103
file(MAKE_DIRECTORY "${PB_BINARY_DIR}")
@@ -102,6 +111,8 @@ if(NOT EXISTS "${PB_BINARY_DIR}/exports.cmake")
102111
execute_process(
103112
COMMAND ${CMAKE_COMMAND}
104113
-G "${CMAKE_GENERATOR}"
114+
${set_arch}
115+
${set_toolset}
105116
${set_build_type}
106117
-DSTATIC_MSVCRT=${STATIC_MSVCRT}
107118
-DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE}
@@ -251,6 +262,8 @@ add_custom_target(build_protobuf
251262
SOURCES "${build_stamp}"
252263
)
253264

265+
set_target_properties(build_protobuf PROPERTIES FOLDER "Misc")
266+
254267
add_dependencies(Protobuf::pb-full build_protobuf)
255268
add_dependencies(Protobuf::pb-lite build_protobuf)
256269
add_dependencies(Protobuf::protoc build_protobuf)

cdk/cmake/DepFindSSL.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ function(main)
118118
add_library(openssl-applink STATIC "${OPENSSL_INCLUDE_DIR}/openssl/applink.c")
119119
target_link_libraries(SSL::ssl INTERFACE openssl-applink)
120120

121+
set_target_properties(openssl-applink PROPERTIES FOLDER "Misc")
121122
# Remove warnings from openssl applink.c
122123
target_compile_options(openssl-applink PRIVATE /wd4152 /wd4996)
123124

cdk/cmake/headers.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,7 @@ if(WITH_HEADER_CHECKS)
406406
COMMENT "Header checks"
407407
SOURCES ${all_headers}
408408
)
409+
set_target_properties(Headers PROPERTIES FOLDER "Tests")
409410

410411
#
411412
# Configure the sanity checks project. All CMakeLists.txt files defining the project

cdk/cmake/testing.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ IF(WITH_TESTS)
143143
set_global(test_tests ${test_tests})
144144

145145
add_library(${TEST} OBJECT ${ARGN})
146+
set_target_properties(${TEST} PROPERTIES FOLDER "Tests")
146147

147148
target_include_directories(${TEST} PRIVATE ${test_includes})
148149

@@ -152,6 +153,7 @@ IF(WITH_TESTS)
152153

153154
target_compile_definitions(${TEST} PRIVATE
154155
-D_SCL_SECURE_NO_WARNINGS
156+
-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
155157
)
156158

157159
target_compile_options(${TEST} PRIVATE
@@ -276,6 +278,7 @@ IF(WITH_TESTS)
276278
${CMAKE_CURRENT_BINARY_DIR}/tests_main.cc
277279
${test_sources}
278280
)
281+
set_target_properties(${target_run_unit_tests} PROPERTIES FOLDER "Tests")
279282

280283
TARGET_LINK_LIBRARIES(${target_run_unit_tests} gtest)
281284

@@ -285,6 +288,11 @@ IF(WITH_TESTS)
285288

286289
if (MSVC)
287290

291+
target_compile_definitions(${target_run_unit_tests} PRIVATE
292+
-D_SCL_SECURE_NO_WARNINGS
293+
-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING
294+
)
295+
288296
target_compile_options(${target_run_unit_tests} PRIVATE
289297
/wd4244
290298
/wd4267
@@ -345,6 +353,8 @@ IF(WITH_TESTS)
345353
SOURCES ${tests_dir}/test_main.in
346354
)
347355

356+
set_target_properties(${cdk_target_prefix}update_test_groups PROPERTIES FOLDER "Tests")
357+
348358
ENDIF()
349359
ENDMACRO(ADD_TEST_TARGET)
350360

cdk/extra/uuid/src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ SET (UUID_SRCS uuid_gen.cc)
4141
ADD_LIBRARY(uuid_gen STATIC ${UUID_SRCS})
4242

4343
SET_TARGET_PROPERTIES(uuid_gen PROPERTIES LINKER_LANGUAGE CXX)
44+
set_target_properties(uuid_gen PROPERTIES FOLDER "Misc")
4445

4546
get_filename_component(INC_DIR "../include" ABSOLUTE)
4647
target_include_directories(uuid_gen PUBLIC ${INC_DIR})

0 commit comments

Comments
 (0)