Skip to content

Commit 2226bf0

Browse files
committed
cmake: Handling SunPro comile warnings
1 parent a79300c commit 2226bf0

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

CMakeLists.txt

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ SET(EDIT_WARNING_MESSAGE "Please do not edit this file - it is generated by cmak
7070
CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/driver/version_info.h.cmake
7171
${CMAKE_BINARY_DIR}/driver/version_info.h @ONLY)
7272

73-
# This is needed by windows installer and fro CPACK
73+
# This is needed by windows installer and for CPACK
7474
IF(EXISTS "${CMAKE_SOURCE_DIR}/LICENSE.mysql")
7575
SET(LICENSE_FILENAME "${CMAKE_SOURCE_DIR}/LICENSE.mysql")
7676
ELSE(EXISTS "${CMAKE_SOURCE_DIR}/LICENSE.mysql")
@@ -139,6 +139,13 @@ ENDIF()
139139
#-----------------
140140
# CPPFLAGS, CXXFLAGS and LDFLAGS from the environment
141141

142+
#
143+
# Note: Currently it is assumed that the basic compile/link flags that
144+
# are required for Solaris SunPro C++ compiler are set in CMAKE_CXX_FLAGS
145+
# when running cmake. This is what happens when the legacy connector build
146+
# is initiated from jdbc.cmake during main connector configuration.
147+
#
148+
142149
SET(FreeBSD11Up False)
143150
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND
144151
${CMAKE_SYSTEM_VERSION} GREATER "10")
@@ -539,6 +546,12 @@ if(NOT MAINTAINER_MODE)
539546
/wd4706 # assignment within conditional expression
540547
)
541548

549+
elseif(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
550+
551+
add_compile_options(
552+
-erroff=wvarhidemem
553+
)
554+
542555
else()
543556

544557
add_compile_options(
@@ -549,6 +562,13 @@ if(NOT MAINTAINER_MODE)
549562
endif()
550563
endif()
551564

565+
if(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
566+
add_compile_options(
567+
-errtags=yes # show tags that can be used to disable warnings
568+
)
569+
endif()
570+
571+
552572
ADD_SUBDIRECTORY(cppconn)
553573
ADD_SUBDIRECTORY(driver)
554574

0 commit comments

Comments
 (0)