Skip to content

Commit db1bde7

Browse files
committed
WL#8896: Enable use of C++11 in MySQL server
This patch turns on C++11 support for MySQL 5.8. This is done by explicitly setting -std=c++11 for GCC, Clang and Solaris Studio. In order to get a near complete level of C++11 support, the patch raises the minimum required version of different compilers to: - GCC 4.8 - Clang 3.4 - Solaris Studio 12.4 Visual Studio minimum is still 2013. It will be raised to 2015 in a separate patch. This will bring C++11 support on Windows more in line with other compilers. A consequence of using -std=c++11 for Solaris Studio is that we no longer link with stlport. Solaris Studio will automatically use the g++ runtime library instead. The patch also fixes various new compilation errors and removes some old obsolete workarounds. Note that new deprecation errors (std::auto_ptr and the register keyword) are explicitly downgraded to warnings. It will be up to individual teams to fix these new warnings. RPM spec is updated to remove support for RHEL5/OL5 and to use compilers from Devtoolset to build on RHEL6/OL6. This is needed to meet new compiler version requirements. Finally the patch includes some limited testing of new C++11 features (compiler and library).
1 parent 3b65e07 commit db1bde7

32 files changed

+248
-249
lines changed

client/auth_utils.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int parse_cnf_file(istream &sin, map<string, string > *options,
6161
getline(sin, option_value);
6262
trim(&option_value);
6363
if (option_name.length() > 0)
64-
options->insert(make_pair<string, string >(option_name, option_value));
64+
options->insert(make_pair(option_name, option_value));
6565
}
6666
return ALL_OK;
6767
} catch(...)

client/base/help_options.cc

+3-4
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ void Mysql::Tools::Base::Options::Help_options::print_usage()
7474

7575
this->print_version_line();
7676

77-
std::string first_year_str=
78-
(static_cast<std::ostringstream*>(&(
79-
std::ostringstream() << this->m_program->get_first_release_year()))
80-
->str());
77+
std::ostringstream s;
78+
s << m_program->get_first_release_year();
79+
string first_year_str(s.str());
8180
string copyright;
8281

8382
if (first_year_str == COPYRIGHT_NOTICE_CURRENT_YEAR)

client/check/mysqlcheck.cc

+7-1
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,12 @@ int main(int argc, char **argv)
531531
if (dbConnect(current_host, current_user, opt_password))
532532
exit(EX_MYSQLERR);
533533

534+
// Sun Studio does not work with range constructor from char** to string.
535+
vector<string> conv;
536+
conv.reserve(argc);
537+
for (int i= 0; i < argc; i++)
538+
conv.push_back(argv[i]);
539+
534540
mysql_check(sock, what_to_do, opt_alldbs,
535541
opt_check_only_changed, opt_extended,
536542
opt_databases, opt_fast,
@@ -540,7 +546,7 @@ int main(int argc, char **argv)
540546
opt_frm, opt_fix_table_names,
541547
opt_fix_db_names, opt_upgrade,
542548
opt_write_binlog, verbose,
543-
opt_skip_database, vector<string>(argv, argv+argc),
549+
opt_skip_database, conv,
544550
DBerror);
545551

546552
dbDisconnect(current_host);

client/client_priv.h

+10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@
2020

2121
/* Common defines for all clients */
2222

23+
/*
24+
This include needs to be before my_compiler.h (via my_global.h)
25+
is included. This is because string conflicts with the define
26+
of __attribute__ in my_compiler.h on Sun Studio x86.
27+
TODO: Get rid of the __attribute__ define in my_compiler.h
28+
*/
29+
#ifdef __cplusplus
30+
#include <string>
31+
#endif
32+
2333
#include <my_global.h>
2434
#include <my_sys.h>
2535
#include <m_string.h>

client/dump/abstract_chain_element.h

+3
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ class Abstract_chain_element : public virtual I_chain_element,
4141
*/
4242
uint64 get_id() const;
4343

44+
/** Disable move assignment to avoid Wvirtual-move-assign warning */
45+
Abstract_chain_element& operator= (Abstract_chain_element&& other) = delete;
46+
4447
protected:
4548
Abstract_chain_element(
4649
Mysql::I_callable<bool, const Mysql::Tools::Base::Message_data&>*

client/mysqladmin.cc

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <sql_common.h>
2727
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2828
#include <mysqld_error.h> /* to check server error codes */
29-
#include <string> /* std::string */
3029
#include "mysql/service_mysql_alloc.h"
3130

3231
#define ADMIN_VERSION "8.42"

cmake/build_configurations/compiler_options.cmake

+7-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2012, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ IF(UNIX)
2828

2929
# Default GCC flags
3030
IF(CMAKE_COMPILER_IS_GNUCC)
31-
SET(COMMON_C_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
31+
SET(COMMON_C_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
3232
# Disable inline optimizations for valgrind testing to avoid false positives
3333
IF(WITH_VALGRIND)
3434
SET(COMMON_C_FLAGS "-fno-inline ${COMMON_C_FLAGS}")
@@ -37,7 +37,7 @@ IF(UNIX)
3737
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
3838
ENDIF()
3939
IF(CMAKE_COMPILER_IS_GNUCXX)
40-
SET(COMMON_CXX_FLAGS "-g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing")
40+
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -std=c++11")
4141
# Disable inline optimizations for valgrind testing to avoid false positives
4242
IF(WITH_VALGRIND)
4343
SET(COMMON_CXX_FLAGS "-fno-inline ${COMMON_CXX_FLAGS}")
@@ -53,7 +53,7 @@ IF(UNIX)
5353
SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_C_FLAGS}")
5454
ENDIF()
5555
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
56-
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing")
56+
SET(COMMON_CXX_FLAGS "-g -fno-omit-frame-pointer -fno-strict-aliasing -std=c++11")
5757
SET(CMAKE_CXX_FLAGS_DEBUG "${COMMON_CXX_FLAGS}")
5858
SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 ${COMMON_CXX_FLAGS}")
5959
ENDIF()
@@ -80,15 +80,11 @@ IF(UNIX)
8080
ENDIF()
8181

8282
IF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
83-
84-
SET(SUNPRO_CXX_LIBRARY "stlport4" CACHE STRING
85-
"What C++ library to use. The server needs stlport4. It is possible to build the client libraries with -DWITHOUT_SERVER=1 -DSUNPRO_CXX_LIBRARY=Cstd")
86-
87-
MESSAGE(STATUS "SUNPRO_CXX_LIBRARY ${SUNPRO_CXX_LIBRARY}")
83+
SET(COMMON_CXX_FLAGS "-std=c++11")
8884

8985
IF(CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
9086
SET(COMMON_C_FLAGS "-g -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic")
91-
SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic -library=${SUNPRO_CXX_LIBRARY}")
87+
SET(COMMON_CXX_FLAGS "-g0 -mt -fsimple=1 -ftrap=%none -nofstore -xbuiltin=%all -xlibmil -xlibmopt -xtarget=generic ${COMMON_CXX_FLAGS}")
9288
# We have to specify "-xO1" for DEBUG flags here,
9389
# see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6879978
9490
SET(CMAKE_C_FLAGS_DEBUG "-xO1 ${COMMON_C_FLAGS}")
@@ -103,7 +99,7 @@ IF(UNIX)
10399
ELSE()
104100
# Assume !x86 is SPARC
105101
SET(COMMON_C_FLAGS "-g -Xa -xstrconst -mt")
106-
SET(COMMON_CXX_FLAGS "-g0 -mt -library=${SUNPRO_CXX_LIBRARY}")
102+
SET(COMMON_CXX_FLAGS "-g0 -mt ${COMMON_CXX_FLAGS}")
107103
IF(32BIT)
108104
SET(COMMON_C_FLAGS "${COMMON_C_FLAGS} -xarch=sparc")
109105
SET(COMMON_CXX_FLAGS "${COMMON_CXX_FLAGS} -xarch=sparc")

cmake/maintainer.cmake

+10-2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ MY_ADD_CXX_WARNING_FLAG("Wlogical-op")
4747
MY_ADD_C_WARNING_FLAG("Wundef")
4848
MY_ADD_CXX_WARNING_FLAG("Wundef")
4949

50+
# Temporarily convert C++11 related errors to warnings
51+
MY_CHECK_CXX_COMPILER_FLAG("-Wdeprecated-declarations" HAVE_DEPRECATED_DECLARATIONS)
52+
IF(HAVE_DEPRECATED_DECLARATIONS)
53+
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -Wno-error=deprecated-declarations")
54+
ENDIF()
55+
MY_CHECK_CXX_COMPILER_FLAG("-Wdeprecated-register" HAVE_DEPRECATED_REGISTER)
56+
IF(HAVE_DEPRECATED_REGISTER)
57+
SET(MY_CXX_WARNING_FLAGS "${MY_CXX_WARNING_FLAGS} -Wno-error=deprecated-register")
58+
ENDIF()
59+
5060
# Turn on extra Clang warnings in maintainer mode
5161
IF(CMAKE_C_COMPILER_ID MATCHES "Clang" AND MYSQL_MAINTAINER_MODE)
5262
MY_ADD_C_WARNING_FLAG("Wconditional-uninitialized")
@@ -70,8 +80,6 @@ IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
7080

7181
# Turn on extra Clang++ warnings in maintainer mode
7282
IF(MYSQL_MAINTAINER_MODE)
73-
MY_ADD_CXX_WARNING_FLAG("Wc++11-compat-reserved-user-defined-literal")
74-
MY_ADD_CXX_WARNING_FLAG("Wc++11-extra-semi")
7583
MY_ADD_CXX_WARNING_FLAG("Wconditional-uninitialized")
7684
MY_ADD_CXX_WARNING_FLAG("Wheader-hygiene")
7785
MY_ADD_CXX_WARNING_FLAG("Wnon-virtual-dtor")

cmake/os/Darwin.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
22
#
33
# This program is free software; you can redistribute it and/or modify
44
# it under the terms of the GNU General Public License as published by
@@ -17,17 +17,17 @@
1717

1818
INCLUDE(CheckCSourceRuns)
1919

20-
# We require at least Clang 3.3 (XCode 5).
20+
# We require at least Clang 3.6 (XCode 7).
2121
IF(NOT FORCE_UNSUPPORTED_COMPILER)
2222
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
2323
CHECK_C_SOURCE_RUNS("
2424
int main()
2525
{
2626
return (__clang_major__ < 3) ||
27-
(__clang_major__ == 3 && __clang_minor__ < 3);
27+
(__clang_major__ == 3 && __clang_minor__ < 6);
2828
}" HAVE_SUPPORTED_CLANG_VERSION)
2929
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
30-
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
30+
MESSAGE(FATAL_ERROR "Clang 3.6 or newer is required!")
3131
ENDIF()
3232
ELSE()
3333
MESSAGE(FATAL_ERROR "Unsupported compiler!")

cmake/os/FreeBSD.cmake

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
32
#
43
# This program is free software; you can redistribute it and/or modify
54
# it under the terms of the GNU General Public License as published by
@@ -18,17 +17,17 @@
1817

1918
INCLUDE(CheckCSourceRuns)
2019

21-
# We require at least Clang 3.3.
20+
# We require at least Clang 3.4.
2221
IF(NOT FORCE_UNSUPPORTED_COMPILER)
2322
IF(CMAKE_C_COMPILER_ID MATCHES "Clang")
2423
CHECK_C_SOURCE_RUNS("
2524
int main()
2625
{
2726
return (__clang_major__ < 3) ||
28-
(__clang_major__ == 3 && __clang_minor__ < 3);
27+
(__clang_major__ == 3 && __clang_minor__ < 4);
2928
}" HAVE_SUPPORTED_CLANG_VERSION)
3029
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
31-
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
30+
MESSAGE(FATAL_ERROR "Clang 3.4 or newer is required!")
3231
ENDIF()
3332
ELSE()
3433
MESSAGE(FATAL_ERROR "Unsupported compiler!")

cmake/os/Linux.cmake

+6-7
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
# Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
1+
# Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
32
#
43
# This program is free software; you can redistribute it and/or modify
54
# it under the terms of the GNU General Public License as published by
@@ -19,23 +18,23 @@
1918
INCLUDE(CheckSymbolExists)
2019
INCLUDE(CheckCSourceRuns)
2120

22-
# We require at least GCC 4.4 or Clang 3.3.
21+
# We require at least GCC 4.8 or Clang 3.4.
2322
IF(NOT FORCE_UNSUPPORTED_COMPILER)
2423
IF(CMAKE_COMPILER_IS_GNUCC)
2524
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
2625
OUTPUT_VARIABLE GCC_VERSION)
27-
IF(GCC_VERSION VERSION_LESS 4.4)
28-
MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
26+
IF(GCC_VERSION VERSION_LESS 4.8)
27+
MESSAGE(FATAL_ERROR "GCC 4.8 or newer is required!")
2928
ENDIF()
3029
ELSEIF(CMAKE_C_COMPILER_ID MATCHES "Clang")
3130
CHECK_C_SOURCE_RUNS("
3231
int main()
3332
{
3433
return (__clang_major__ < 3) ||
35-
(__clang_major__ == 3 && __clang_minor__ < 3);
34+
(__clang_major__ == 3 && __clang_minor__ < 4);
3635
}" HAVE_SUPPORTED_CLANG_VERSION)
3736
IF(NOT HAVE_SUPPORTED_CLANG_VERSION)
38-
MESSAGE(FATAL_ERROR "Clang 3.3 or newer is required!")
37+
MESSAGE(FATAL_ERROR "Clang 3.4 or newer is required!")
3938
ENDIF()
4039
ELSE()
4140
MESSAGE(FATAL_ERROR "Unsupported compiler!")

cmake/os/SunOS.cmake

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ INCLUDE(CheckCSourceRuns)
1818
INCLUDE(CheckCSourceCompiles)
1919
INCLUDE(CheckCXXSourceCompiles)
2020

21-
# We require at least GCC 4.4 or SunStudio 12u2 (CC 5.11)
21+
# We require at least GCC 4.8 or SunStudio 12.4 (CC 5.13)
2222
IF(NOT FORCE_UNSUPPORTED_COMPILER)
2323
IF(CMAKE_COMPILER_IS_GNUCC)
2424
EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -dumpversion
2525
OUTPUT_VARIABLE GCC_VERSION)
26-
IF(GCC_VERSION VERSION_LESS 4.4)
27-
MESSAGE(FATAL_ERROR "GCC 4.4 or newer is required!")
26+
IF(GCC_VERSION VERSION_LESS 4.8)
27+
MESSAGE(FATAL_ERROR "GCC 4.8 or newer is required!")
2828
ENDIF()
2929
ELSEIF(CMAKE_C_COMPILER_ID MATCHES "SunPro")
3030
EXECUTE_PROCESS(
@@ -35,8 +35,8 @@ IF(NOT FORCE_UNSUPPORTED_COMPILER)
3535
)
3636
STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
3737
SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})
38-
IF(${CC_MINOR_VERSION} LESS 11)
39-
MESSAGE(FATAL_ERROR "SunStudio 12u2 or newer is required!")
38+
IF(${CC_MINOR_VERSION} LESS 13)
39+
MESSAGE(FATAL_ERROR "SunStudio 12.4 or newer is required!")
4040
ENDIF()
4141
ELSE()
4242
MESSAGE(FATAL_ERROR "Unsupported compiler!")

configure.cmake

+1-86
Original file line numberDiff line numberDiff line change
@@ -62,19 +62,6 @@ IF(NOT SYSTEM_TYPE)
6262
ENDIF()
6363
ENDIF()
6464

65-
# The default C++ library for SunPro is really old, and not standards compliant.
66-
# http://www.oracle.com/technetwork/server-storage/solaris10/cmp-stlport-libcstd-142559.html
67-
# Use stlport rather than Rogue Wave.
68-
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS")
69-
IF(CMAKE_CXX_COMPILER_ID MATCHES "SunPro")
70-
IF(SUNPRO_CXX_LIBRARY)
71-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=${SUNPRO_CXX_LIBRARY}")
72-
ELSE()
73-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -library=stlport4")
74-
ENDIF()
75-
ENDIF()
76-
ENDIF()
77-
7865
# Check to see if we are using LLVM's libc++ rather than e.g. libstd++
7966
# Can then check HAVE_LLBM_LIBCPP later without including e.g. ciso646.
8067
CHECK_CXX_SOURCE_RUNS("
@@ -93,7 +80,7 @@ MACRO(DIRNAME IN OUT)
9380
ENDMACRO()
9481

9582
MACRO(FIND_REAL_LIBRARY SOFTLINK_NAME REALNAME)
96-
# We re-distribute libstlport.so/libstdc++.so which are both symlinks.
83+
# We re-distribute libstdc++.so which is a symlink.
9784
# There is no 'readlink' on solaris, so we use perl to follow links:
9885
SET(PERLSCRIPT
9986
"my $link= $ARGV[0]; use Cwd qw(abs_path); my $file = abs_path($link); print $file;")
@@ -175,78 +162,6 @@ IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND CMAKE_COMPILER_IS_GNUCC)
175162
ENDIF()
176163
ENDIF()
177164

178-
IF(CMAKE_SYSTEM_NAME MATCHES "SunOS" AND
179-
CMAKE_C_COMPILER_ID MATCHES "SunPro" AND
180-
CMAKE_CXX_FLAGS MATCHES "stlport4")
181-
DIRNAME(${CMAKE_CXX_COMPILER} CXX_PATH)
182-
# Also extract real path to the compiler(which is normally
183-
# in <install_path>/prod/bin) and try to find the
184-
# stlport libs relative to that location as well.
185-
GET_FILENAME_COMPONENT(CXX_REALPATH ${CMAKE_CXX_COMPILER} REALPATH)
186-
187-
# CC -V yields
188-
# CC: Sun C++ 5.13 SunOS_sparc Beta 2014/03/11
189-
# CC: Sun C++ 5.11 SunOS_sparc 2010/08/13
190-
191-
EXECUTE_PROCESS(
192-
COMMAND ${CMAKE_CXX_COMPILER} "-V"
193-
OUTPUT_VARIABLE stdout
194-
ERROR_VARIABLE stderr
195-
RESULT_VARIABLE result
196-
)
197-
IF(result)
198-
MESSAGE(FATAL_ERROR "Failed to execute ${CMAKE_CXX_COMPILER} -V")
199-
ENDIF()
200-
201-
STRING(REGEX MATCH "CC: Sun C\\+\\+ 5\\.([0-9]+)" VERSION_STRING ${stderr})
202-
SET(CC_MINOR_VERSION ${CMAKE_MATCH_1})
203-
204-
IF(${CC_MINOR_VERSION} EQUAL 13)
205-
SET(STLPORT_SUFFIX "lib/compilers/stlport4")
206-
IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
207-
SET(STLPORT_SUFFIX "lib/compilers/stlport4/sparcv9")
208-
ENDIF()
209-
IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
210-
SET(STLPORT_SUFFIX "lib/compilers/stlport4/amd64")
211-
ENDIF()
212-
ELSE()
213-
SET(STLPORT_SUFFIX "lib/stlport4")
214-
IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "sparc")
215-
SET(STLPORT_SUFFIX "lib/stlport4/v9")
216-
ENDIF()
217-
IF(SIZEOF_VOIDP EQUAL 8 AND CMAKE_SYSTEM_PROCESSOR MATCHES "i386")
218-
SET(STLPORT_SUFFIX "lib/stlport4/amd64")
219-
ENDIF()
220-
ENDIF()
221-
222-
FIND_LIBRARY(STL_LIBRARY_NAME
223-
NAMES "stlport"
224-
PATHS ${CXX_PATH}/../${STLPORT_SUFFIX}
225-
${CXX_REALPATH}/../../${STLPORT_SUFFIX}
226-
)
227-
MESSAGE(STATUS "STL_LIBRARY_NAME ${STL_LIBRARY_NAME}")
228-
IF(STL_LIBRARY_NAME)
229-
DIRNAME(${STL_LIBRARY_NAME} STLPORT_PATH)
230-
FIND_REAL_LIBRARY(${STL_LIBRARY_NAME} real_library)
231-
MESSAGE(STATUS "INSTALL ${STL_LIBRARY_NAME} ${real_library}")
232-
INSTALL(FILES ${STL_LIBRARY_NAME} ${real_library}
233-
DESTINATION ${INSTALL_LIBDIR} COMPONENT SharedLibraries)
234-
EXTEND_C_LINK_FLAGS(${STLPORT_PATH})
235-
EXTEND_CXX_LINK_FLAGS(${STLPORT_PATH})
236-
ELSE()
237-
MESSAGE(STATUS "Failed to find the required stlport library, print some"
238-
"variables to help debugging and bail out")
239-
MESSAGE(STATUS "CMAKE_CXX_COMPILER ${CMAKE_CXX_COMPILER}")
240-
MESSAGE(STATUS "CXX_PATH ${CXX_PATH}")
241-
MESSAGE(STATUS "CXX_REALPATH ${CXX_REALPATH}")
242-
MESSAGE(STATUS "STLPORT_SUFFIX ${STLPORT_SUFFIX}")
243-
MESSAGE(STATUS "PATH: ${CXX_PATH}/../${STLPORT_SUFFIX}")
244-
MESSAGE(STATUS "PATH: ${CXX_REALPATH}/../../${STLPORT_SUFFIX}")
245-
MESSAGE(FATAL_ERROR
246-
"Could not find the required stlport library.")
247-
ENDIF()
248-
ENDIF()
249-
250165
IF(CMAKE_COMPILER_IS_GNUCXX)
251166
IF (CMAKE_EXE_LINKER_FLAGS MATCHES " -static "
252167
OR CMAKE_EXE_LINKER_FLAGS MATCHES " -static$")

0 commit comments

Comments
 (0)