[Cmake-commits] CMake branch, master, updated. v3.13.1-609-g049d324
Kitware Robot
kwrobot at kitware.com
Fri Dec 7 08:33:09 EST 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 049d324e42451fb92d9504551f3885e221f05b8a (commit)
via 05f1d7a4627e2bbebaa5a80ee3aaa98467f184b3 (commit)
via 1cb7ea61134536d803a64d5fb64fe37bccdcdb2f (commit)
via 3454edcd19b627a5a00efd9b70a6960dd675ca5a (commit)
via fdd09a02697af76ec316ec1b5c002d70a44543bb (commit)
via e6af2f3d2e754f3cda3581082658443b7f37d9ec (commit)
via 5651bb08786a2a51f389c44f5904f5de777e987b (commit)
via 5085a984e1ac4d49d68f02058383be21633a3fbf (commit)
via 8e5db11fd926ddb615f672a16f2e6fe5643f3a8d (commit)
via fc5afbe97094d741b853b045d51351f3a370e87e (commit)
via ecf6fc8dc106e181dcd89c099933a8faa96fe897 (commit)
via 4e174e0960e51fa1b83588d130e435bc6c7af8cc (commit)
via 620e4e5e21ca9070e50038c999dfae20cf5416ef (commit)
via 8adf237e52bea9aabc0f5d4ac8884ef9d2349d0f (commit)
via 243b7c40d44df2c8b1cb0dc55e2a11b15d9e6f5d (commit)
via e9a1ddc594de6e6251bf06d732775dae2cabe4c8 (commit)
from a956ab7f3ba4092ac6685eb0ec1e3185dbb54a43 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=049d324e42451fb92d9504551f3885e221f05b8a
commit 049d324e42451fb92d9504551f3885e221f05b8a
Merge: 05f1d7a 8adf237
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:30:14 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:32:41 2018 -0500
Merge topic 'misc-typos'
8adf237e52 Misc. comment typos
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2703
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=05f1d7a4627e2bbebaa5a80ee3aaa98467f184b3
commit 05f1d7a4627e2bbebaa5a80ee3aaa98467f184b3
Merge: 1cb7ea6 5085a98
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:29:43 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:31:37 2018 -0500
Merge topic 'FindCURL-components'
5085a984e1 Help: Add notes for topic 'FindCURL-components'
8e5db11fd9 FindCURL: add test for component
fc5afbe970 FindCURL: support COMPONENTS to check features
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2677
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1cb7ea61134536d803a64d5fb64fe37bccdcdb2f
commit 1cb7ea61134536d803a64d5fb64fe37bccdcdb2f
Merge: 3454edc ecf6fc8
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:29:06 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:30:25 2018 -0500
Merge topic 'cmtarget-remove-unused-classes'
ecf6fc8dc1 cmTarget: Remove unused classes cmTargetSet and cmTargetManifest
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2697
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3454edcd19b627a5a00efd9b70a6960dd675ca5a
commit 3454edcd19b627a5a00efd9b70a6960dd675ca5a
Merge: fdd09a0 4e174e0
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:27:56 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:29:27 2018 -0500
Merge topic 'FindHDF5-static-hl'
4e174e0960 FindHDF5: Fix search for static hdf5_hl on Windows
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2700
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fdd09a02697af76ec316ec1b5c002d70a44543bb
commit fdd09a02697af76ec316ec1b5c002d70a44543bb
Merge: e6af2f3 243b7c4
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:27:17 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:28:13 2018 -0500
Merge topic 'qnx_compiler_detection'
243b7c40d4 QNX: Compiler and feature detection fixes
Acked-by: Kitware Robot <kwrobot at kitware.com>
Acked-by: MvdHurk <maikelvandenhurk at hotmail.com>
Merge-request: !2699
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6af2f3d2e754f3cda3581082658443b7f37d9ec
commit e6af2f3d2e754f3cda3581082658443b7f37d9ec
Merge: 5651bb0 620e4e5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:26:11 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:26:42 2018 -0500
Merge topic 'UseEcos-append-flags'
620e4e5e21 UseEcos: Append C and CXX flags instead of overwriting them
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2684
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5651bb08786a2a51f389c44f5904f5de777e987b
commit 5651bb08786a2a51f389c44f5904f5de777e987b
Merge: a956ab7 e9a1ddc
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Dec 7 13:25:31 2018 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Dec 7 08:25:39 2018 -0500
Merge topic 'FindThreads-asan'
e9a1ddc594 FindThreads: Replace the pthread symbol checking in libc.
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !2629
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5085a984e1ac4d49d68f02058383be21633a3fbf
commit 5085a984e1ac4d49d68f02058383be21633a3fbf
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 6 11:48:47 2018 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 11:49:04 2018 -0500
Help: Add notes for topic 'FindCURL-components'
diff --git a/Help/release/dev/FindCURL-components.rst b/Help/release/dev/FindCURL-components.rst
new file mode 100644
index 0000000..9c50ede
--- /dev/null
+++ b/Help/release/dev/FindCURL-components.rst
@@ -0,0 +1,5 @@
+FindCURL-components
+-------------------
+
+* The :module:`FindCURL` module gained support for requesting
+ protocols as package components.
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8e5db11fd926ddb615f672a16f2e6fe5643f3a8d
commit 8e5db11fd926ddb615f672a16f2e6fe5643f3a8d
Author: Hiroshi Miura <miurahr at linux.com>
AuthorDate: Wed Dec 5 11:59:29 2018 +0900
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 11:49:04 2018 -0500
FindCURL: add test for component
Signed-off-by: Hiroshi Miura <miurahr at linux.com>
diff --git a/Tests/FindCURL/Test/CMakeLists.txt b/Tests/FindCURL/Test/CMakeLists.txt
index c3c719b..cbf2866 100644
--- a/Tests/FindCURL/Test/CMakeLists.txt
+++ b/Tests/FindCURL/Test/CMakeLists.txt
@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.10)
project(TestFindCURL C)
include(CTest)
-find_package(CURL REQUIRED)
+find_package(CURL REQUIRED COMPONENTS HTTP)
add_definitions(-DCMAKE_EXPECTED_CURL_VERSION="${CURL_VERSION_STRING}")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fc5afbe97094d741b853b045d51351f3a370e87e
commit fc5afbe97094d741b853b045d51351f3a370e87e
Author: Hiroshi Miura <miurahr at linux.com>
AuthorDate: Wed Nov 28 09:48:35 2018 +0900
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 11:49:04 2018 -0500
FindCURL: support COMPONENTS to check features
- Use pkg-config or curl-config to retrieve version,
supported features and protocols.
- Support optional COMPONENTS to check supported features
Signed-off-by: Hiroshi Miura <miurahr at linux.com>
diff --git a/Modules/FindCURL.cmake b/Modules/FindCURL.cmake
index a4b238d..d28dfea 100644
--- a/Modules/FindCURL.cmake
+++ b/Modules/FindCURL.cmake
@@ -7,6 +7,14 @@ FindCURL
Find the native CURL headers and libraries.
+This module accept optional COMPONENTS to check supported features and
+protocols::
+
+ PROTOCOLS: ICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3
+ POP3S RTMP RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP
+ FEATURES: SSL IPv6 UnixSockets libz AsynchDNS IDN GSS-API PSL SPNEGO
+ Kerberos NTLM NTLM_WB TLS-SRP HTTP2 HTTPS-proxy
+
IMPORTED Targets
^^^^^^^^^^^^^^^^
@@ -31,8 +39,20 @@ This module defines the following variables:
The version of curl found.
#]=======================================================================]
+find_package(PkgConfig QUIET)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_CURL QUIET libcurl)
+ if(PC_CURL_FOUND)
+ set(CURL_VERSION_STRING ${PC_CURL_VERSION})
+ pkg_get_variable(CURL_SUPPORTED_PROTOCOLS libcurl supported_protocols)
+ pkg_get_variable(CURL_SUPPORTED_FEATURES libcurl supported_features)
+ endif()
+endif()
+
# Look for the header file.
-find_path(CURL_INCLUDE_DIR NAMES curl/curl.h)
+find_path(CURL_INCLUDE_DIR
+ NAMES curl/curl.h
+ HINTS ${PC_CURL_INCLUDE_DIRS})
mark_as_advanced(CURL_INCLUDE_DIR)
if(NOT CURL_LIBRARY)
@@ -45,6 +65,7 @@ if(NOT CURL_LIBRARY)
curllib_static
# Windows older "Win32 - MSVC" prebuilts (libcurl.lib, e.g. libcurl-7.15.5-win32-msvc.zip):
libcurl
+ HINTS ${PC_CURL_LIBRARY_DIRS}
)
mark_as_advanced(CURL_LIBRARY_RELEASE)
@@ -52,6 +73,7 @@ if(NOT CURL_LIBRARY)
# Windows MSVC CMake builds in debug configuration on vcpkg:
libcurl-d_imp
libcurl-d
+ HINTS ${PC_CURL_LIBRARY_DIRS}
)
mark_as_advanced(CURL_LIBRARY_DEBUG)
@@ -59,7 +81,7 @@ if(NOT CURL_LIBRARY)
select_library_configurations(CURL)
endif()
-if(CURL_INCLUDE_DIR)
+if(CURL_INCLUDE_DIR AND NOT CURL_VERSION_STRING)
foreach(_curl_version_header curlver.h curl.h)
if(EXISTS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}")
file(STRINGS "${CURL_INCLUDE_DIR}/curl/${_curl_version_header}" curl_version_str REGEX "^#define[\t ]+LIBCURL_VERSION[\t ]+\".*\"")
@@ -71,10 +93,57 @@ if(CURL_INCLUDE_DIR)
endforeach()
endif()
+if(CURL_FIND_COMPONENTS)
+ set(CURL_KNOWN_PROTOCOLS ICT FILE FTP FTPS GOPHER HTTP HTTPS IMAP IMAPS LDAP LDAPS POP3 POP3S RTMP RTSP SCP SFTP SMB SMBS SMTP SMTPS TELNET TFTP)
+ set(CURL_KNOWN_FEATURES SSL IPv6 UnixSockets libz AsynchDNS IDN GSS-API PSL SPNEGO Kerberos NTLM NTLM_WB TLS-SRP HTTP2 HTTPS-proxy)
+ foreach(component IN LISTS CURL_KNOWN_PROTOCOLS CURL_KNOWN_FEATURES)
+ set(CURL_${component}_FOUND FALSE)
+ endforeach()
+ if(NOT PC_CURL_FOUND)
+ find_program(CURL_CONFIG_EXECUTABLE NAMES curl-config)
+ if(CURL_CONFIG_EXECUTABLE)
+ execute_process(COMMAND ${CURL_CONFIG_EXECUTABLE} --version
+ OUTPUT_VARIABLE CURL_CONFIG_VERSION_STRING
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ execute_process(COMMAND ${CURL_CONFIG_EXECUTABLE} --feature
+ OUTPUT_VARIABLE CURL_CONFIG_FEATURES_STRING
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REPLACE "\n" ";" CURL_CONFIG_FEATURES "${CURL_CONFIG_FEATURES_STRING}")
+ execute_process(COMMAND ${CURL_CONFIG_EXECUTABLE} --protocols
+ OUTPUT_VARIABLE CURL_CONFIG_PROTOCOLS_STRING
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ string(REPLACE "\n" ";" CURL_CONFIG_PROTOCOLS "${CURL_CONFIG_PROTOCOLS_STRING}")
+ endif()
+
+ endif()
+ foreach(component IN LISTS CURL_FIND_COMPONENTS)
+ list(FIND CURL_KNOWN_PROTOCOLS ${component} _found)
+ if(_found)
+ list(FIND CURL_SUPPORTED_PROTOCOLS ${component} _found)
+ if(_found)
+ set(CURL_${component}_FOUND TRUE)
+ elseif(CURL_FIND_REQUIRED)
+ message(FATAL_ERROR "CURL: Required protocol ${component} is not found")
+ endif()
+ else()
+ list(FIND CURL_SUPPORTED_FEATURES ${component} _found)
+ if(_found)
+ set(CURL_${component}_FOUND TRUE)
+ elseif(CURL_FIND_REQUIRED)
+ message(FATAL_ERROR "CURL: Required feature ${component} is not found")
+ endif()
+ endif()
+ endforeach()
+endif()
+
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL
+find_package_handle_standard_args(CURL
REQUIRED_VARS CURL_LIBRARY CURL_INCLUDE_DIR
- VERSION_VAR CURL_VERSION_STRING)
+ VERSION_VAR CURL_VERSION_STRING
+ HANDLE_COMPONENTS)
if(CURL_FOUND)
set(CURL_LIBRARIES ${CURL_LIBRARY})
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecf6fc8dc106e181dcd89c099933a8faa96fe897
commit ecf6fc8dc106e181dcd89c099933a8faa96fe897
Author: Artur Ryt <artur.ryt at gmail.com>
AuthorDate: Sat Dec 1 22:32:40 2018 +0100
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 11:40:13 2018 -0500
cmTarget: Remove unused classes cmTargetSet and cmTargetManifest
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 92d5505..688f73b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6,7 +6,6 @@
#include <algorithm>
#include <assert.h>
#include <iterator>
-#include <map>
#include <set>
#include <sstream>
#include <string.h>
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index aa2859d..655cefd 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -6,7 +6,6 @@
#include "cmConfigure.h" // IWYU pragma: keep
#include <iosfwd>
-#include <map>
#include <set>
#include <string>
#include <unordered_map>
@@ -344,11 +343,4 @@ private:
typedef std::unordered_map<std::string, cmTarget> cmTargets;
-class cmTargetSet : public std::set<std::string>
-{
-};
-class cmTargetManifest : public std::map<std::string, cmTargetSet>
-{
-};
-
#endif
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4e174e0960e51fa1b83588d130e435bc6c7af8cc
commit 4e174e0960e51fa1b83588d130e435bc6c7af8cc
Author: Mouginot B <mouginot.baptiste at gmail.com>
AuthorDate: Mon Dec 3 19:03:02 2018 -0600
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 10:43:29 2018 -0500
FindHDF5: Fix search for static hdf5_hl on Windows
The change in commit v3.10.0-rc1~411^2~1 (FindHDF5: Add support for
HDF5_USE_STATIC_LIBRARIES on Windows, 2017-07-03) accidentally left
out a `lib` prefix on the static library name of `hdf5_hl`. It was
done correctly already for the main `hdf5` library.
diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index e36767a..2772b7d 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -818,7 +818,7 @@ if( NOT HDF5_FOUND )
set( THIS_LIBRARY_SEARCH_DEBUG
lib${LIB}d.a lib${LIB}_debug.a lib${LIB}d lib${LIB}_D lib${LIB}_debug
lib${LIB}d-static.a lib${LIB}_debug-static.a lib${LIB}d-static lib${LIB}_D-static lib${LIB}_debug-static )
- set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a ${LIB} lib${LIB}-static.a lib${LIB}-static)
+ set( THIS_LIBRARY_SEARCH_RELEASE lib${LIB}.a lib${LIB} lib${LIB}-static.a lib${LIB}-static)
else()
set( THIS_LIBRARY_SEARCH_DEBUG ${LIB}d ${LIB}_D ${LIB}_debug ${LIB}d-shared ${LIB}_D-shared ${LIB}_debug-shared)
set( THIS_LIBRARY_SEARCH_RELEASE ${LIB} ${LIB}-shared)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=620e4e5e21ca9070e50038c999dfae20cf5416ef
commit 620e4e5e21ca9070e50038c999dfae20cf5416ef
Author: antmak <antmak.pub at gmail.com>
AuthorDate: Wed Nov 28 22:58:24 2018 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 6 09:49:28 2018 -0500
UseEcos: Append C and CXX flags instead of overwriting them
diff --git a/Modules/UseEcos.cmake b/Modules/UseEcos.cmake
index 6d13d42..9f84847 100644
--- a/Modules/UseEcos.cmake
+++ b/Modules/UseEcos.cmake
@@ -191,8 +191,8 @@ macro(ECOS_ADD_EXECUTABLE _exe_NAME )
set(CMAKE_CXX_LINK_EXECUTABLE "<CMAKE_CXX_COMPILER> <CMAKE_CXX_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <CMAKE_C_LINK_FLAGS> <OBJECTS> -o <TARGET> ${_ecos_EXTRA_LIBS} -nostdlib -nostartfiles -L${CMAKE_CURRENT_BINARY_DIR}/ecos/install/lib -Ttarget.ld ${ECOS_LD_MCPU}")
# some strict compiler flags
- set (CMAKE_C_FLAGS "-Wstrict-prototypes")
- set (CMAKE_CXX_FLAGS "-Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
+ set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wstrict-prototypes")
+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Woverloaded-virtual -fno-rtti -Wctor-dtor-privacy -fno-strict-aliasing -fno-exceptions")
add_executable(${_exe_NAME} ${ARGN})
set_target_properties(${_exe_NAME} PROPERTIES SUFFIX ".elf")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8adf237e52bea9aabc0f5d4ac8884ef9d2349d0f
commit 8adf237e52bea9aabc0f5d4ac8884ef9d2349d0f
Author: luz.paz <luzpaz at users.noreply.github.com>
AuthorDate: Wed Dec 5 11:57:58 2018 -0500
Commit: luz.paz <luzpaz at users.noreply.github.com>
CommitDate: Wed Dec 5 11:57:58 2018 -0500
Misc. comment typos
Found via `codespell`
diff --git a/Help/command/macro.rst b/Help/command/macro.rst
index 464940f..05e5d79 100644
--- a/Help/command/macro.rst
+++ b/Help/command/macro.rst
@@ -83,7 +83,7 @@ with a macro. This has a number of consequences, as explained in
the :ref:`Argument Caveats` section below.
Another difference between macros and functions is the control flow.
-A function is executed by transfering control from the calling
+A function is executed by transferring control from the calling
statement to the function body. A macro is executed as if the macro
body were pasted in place of the calling statement. This has the
consequence that a :command:`return()` in a macro body does not
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 8e25e9c..adb14ec 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -714,7 +714,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
xml.Attribute("path", p);
xml.EndElement();
- // exlude source directory from output search path
+ // exclude source directory from output search path
// - only if not named the same as an output directory
if (!cmSystemTools::FileIsDirectory(
std::string(this->HomeOutputDirectory + "/" + p))) {
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=243b7c40d44df2c8b1cb0dc55e2a11b15d9e6f5d
commit 243b7c40d44df2c8b1cb0dc55e2a11b15d9e6f5d
Author: Cristian Adam <cristian.adam at gmail.com>
AuthorDate: Mon Dec 3 23:18:43 2018 +0100
Commit: Cristian Adam <cristian.adam at gmail.com>
CommitDate: Mon Dec 3 23:18:43 2018 +0100
QNX: Compiler and feature detection fixes
Tested compiler detection with the QNX 7.0 list of compiler targets:
* gcc_ntoaarch64le
* gcc_ntoaarch64le_cxx
* gcc_ntoarmv7le
* gcc_ntoarmv7le_cxx
* gcc_ntox86_cxx
* gcc_ntoaarch64le_gpp
* gcc_ntox86_64_gpp
* gcc_ntoarmv7le_gpp
* gcc_ntox86_64_cxx
* gcc_ntox86
* gcc_ntox86_gpp
* gcc_ntox86_64
This commit fixes some of the problems described in:
https://cristianadam.eu/20181202/a-better-qnx-cmake-toolchain-file/
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index 17706ea..1a0d8a6 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -136,7 +136,7 @@ endif ()
# "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
+ if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang|QCC")
get_filename_component(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)(clang|g?cc)(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
@@ -145,7 +145,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_C_COMPILER_TARGET}-)
endif()
elseif(COMPILER_BASENAME MATCHES "qcc(\\.exe)?$")
- if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?")
+ if(CMAKE_C_COMPILER_TARGET MATCHES "gcc_nto([a-z0-9]+_[0-9]+|[^_le]+)(le)?")
set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-)
endif()
endif ()
diff --git a/Modules/CMakeDetermineCXXCompiler.cmake b/Modules/CMakeDetermineCXXCompiler.cmake
index 70d17a1..0a0c37b 100644
--- a/Modules/CMakeDetermineCXXCompiler.cmake
+++ b/Modules/CMakeDetermineCXXCompiler.cmake
@@ -133,7 +133,7 @@ endif ()
if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
- if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
+ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU|Clang|QCC")
get_filename_component(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
if (COMPILER_BASENAME MATCHES "^(.+-)(clan)?[gc]\\+\\+(-[0-9]+\\.[0-9]+\\.[0-9]+)?(\\.exe)?$")
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
@@ -142,7 +142,7 @@ if (CMAKE_CROSSCOMPILING AND NOT _CMAKE_TOOLCHAIN_PREFIX)
set(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_CXX_COMPILER_TARGET}-)
endif()
elseif(COMPILER_BASENAME MATCHES "QCC(\\.exe)?$")
- if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([^_le]+)(le)?")
+ if(CMAKE_CXX_COMPILER_TARGET MATCHES "gcc_nto([a-z0-9]+_[0-9]+|[^_le]+)(le)")
set(_CMAKE_TOOLCHAIN_PREFIX nto${CMAKE_MATCH_1}-)
endif()
endif ()
diff --git a/Modules/Compiler/QCC-C-FeatureTests.cmake b/Modules/Compiler/QCC-C-FeatureTests.cmake
new file mode 100644
index 0000000..68f4197
--- /dev/null
+++ b/Modules/Compiler/QCC-C-FeatureTests.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-C-FeatureTests)
diff --git a/Modules/Compiler/QCC-C.cmake b/Modules/Compiler/QCC-C.cmake
index ae4a2f4..6db619e 100644
--- a/Modules/Compiler/QCC-C.cmake
+++ b/Modules/Compiler/QCC-C.cmake
@@ -1,2 +1,5 @@
+# To include compiler feature detection
+include(Compiler/GNU-C)
+
include(Compiler/QCC)
__compiler_qcc(C)
diff --git a/Modules/Compiler/QCC-CXX-FeatureTests.cmake b/Modules/Compiler/QCC-CXX-FeatureTests.cmake
new file mode 100644
index 0000000..c836b94
--- /dev/null
+++ b/Modules/Compiler/QCC-CXX-FeatureTests.cmake
@@ -0,0 +1 @@
+include(Compiler/GNU-CXX-FeatureTests)
diff --git a/Modules/Compiler/QCC-CXX.cmake b/Modules/Compiler/QCC-CXX.cmake
index e86d1fa..0e7314a 100644
--- a/Modules/Compiler/QCC-CXX.cmake
+++ b/Modules/Compiler/QCC-CXX.cmake
@@ -1,3 +1,6 @@
+# To include compiler feature detection
+include(Compiler/GNU-CXX)
+
include(Compiler/QCC)
__compiler_qcc(CXX)
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e9a1ddc594de6e6251bf06d732775dae2cabe4c8
commit e9a1ddc594de6e6251bf06d732775dae2cabe4c8
Author: JerryShih <bignose1007 at gmail.com>
AuthorDate: Sun Nov 18 03:15:17 2018 +0800
Commit: JerryShih <bignose1007 at gmail.com>
CommitDate: Mon Dec 3 16:05:59 2018 +0800
FindThreads: Replace the pthread symbol checking in libc.
With asan build, we will have the pthread_create() symbol in libc. However,
libasan doesn't have full pthread implementation. We can't assume that we
have the pthread implementation in libc using pthread_create() symbol.
Replace the pthread_create() with pthread_kill() as a quick fix.
diff --git a/Modules/FindThreads.cmake b/Modules/FindThreads.cmake
index dfb683f..691b1b7 100644
--- a/Modules/FindThreads.cmake
+++ b/Modules/FindThreads.cmake
@@ -131,9 +131,17 @@ else()
#
set(CMAKE_HAVE_THREADS_LIBRARY)
if(NOT THREADS_HAVE_PTHREAD_ARG)
- # Check if pthread functions are in normal C library
- CHECK_SYMBOL_EXISTS(pthread_create pthread.h CMAKE_HAVE_LIBC_CREATE)
- if(CMAKE_HAVE_LIBC_CREATE)
+ # Check if pthread functions are in normal C library.
+ # If the pthread functions already exist in C library, we could just use
+ # them instead of linking to the additional pthread library. We could
+ # try to check any pthread symbol name, but here is an exception. If we
+ # use clang asan build, we will find the pthread_create() symbol in the
+ # libc(libasan). However, it doesn't have the full pthread implementation.
+ # So, we can't assume that we have the pthread implementation in libc
+ # using the pthread_create() checking here. Then, we turn to check the
+ # pthread_kill() symbol instead.
+ CHECK_SYMBOL_EXISTS(pthread_kill pthread.h CMAKE_HAVE_LIBC_PTHREAD_KILL)
+ if(CMAKE_HAVE_LIBC_PTHREAD_KILL)
set(CMAKE_THREAD_LIBS_INIT "")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(Threads_FOUND TRUE)
@@ -159,7 +167,7 @@ else()
endif()
endif()
-if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_CREATE)
+if(CMAKE_THREAD_LIBS_INIT OR CMAKE_HAVE_LIBC_PTHREAD_KILL)
set(CMAKE_USE_PTHREADS_INIT 1)
set(Threads_FOUND TRUE)
endif()
-----------------------------------------------------------------------
Summary of changes:
Help/command/macro.rst | 2 +-
Help/release/dev/FindCURL-components.rst | 5 ++
Modules/CMakeDetermineCCompiler.cmake | 4 +-
Modules/CMakeDetermineCXXCompiler.cmake | 4 +-
Modules/Compiler/QCC-C-FeatureTests.cmake | 1 +
Modules/Compiler/QCC-C.cmake | 3 ++
Modules/Compiler/QCC-CXX-FeatureTests.cmake | 1 +
Modules/Compiler/QCC-CXX.cmake | 3 ++
Modules/FindCURL.cmake | 77 +++++++++++++++++++++++++++--
Modules/FindHDF5.cmake | 2 +-
Modules/FindThreads.cmake | 16 ++++--
Modules/UseEcos.cmake | 4 +-
Source/cmExtraEclipseCDT4Generator.cxx | 2 +-
Source/cmTarget.cxx | 1 -
Source/cmTarget.h | 8 ---
Tests/FindCURL/Test/CMakeLists.txt | 2 +-
16 files changed, 108 insertions(+), 27 deletions(-)
create mode 100644 Help/release/dev/FindCURL-components.rst
create mode 100644 Modules/Compiler/QCC-C-FeatureTests.cmake
create mode 100644 Modules/Compiler/QCC-CXX-FeatureTests.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list