[Cmake-commits] CMake branch, master, updated. v3.15.0-rc4-279-gf9e0cf6
Kitware Robot
kwrobot at kitware.com
Fri Jul 12 07:33:04 EDT 2019
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 f9e0cf64176628d07871741da2c6f585f52c4e39 (commit)
via 207a48602a32f762e2bbe4eef75e6ff4bdb4945c (commit)
via 1810a61b394eee2fe9465d5460bb578f833078da (commit)
via d1f38ba65d7a6860ceac0d60dc77971e9ccfdd05 (commit)
from 609d86e8131547e95269c2a5bd53336f948cae05 (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=f9e0cf64176628d07871741da2c6f585f52c4e39
commit f9e0cf64176628d07871741da2c6f585f52c4e39
Merge: 207a486 d1f38ba
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 12 11:24:44 2019 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jul 12 07:24:52 2019 -0400
Merge topic 'compiler-id-encoding'
d1f38ba65d CMakeDetermineCompilerId: Consider UTF-16 encodings of INFO strings
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !3539
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=207a48602a32f762e2bbe4eef75e6ff4bdb4945c
commit 207a48602a32f762e2bbe4eef75e6ff4bdb4945c
Merge: 609d86e 1810a61
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 12 07:23:11 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Jul 12 07:23:11 2019 -0400
Merge branch 'release-3.15'
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1f38ba65d7a6860ceac0d60dc77971e9ccfdd05
commit d1f38ba65d7a6860ceac0d60dc77971e9ccfdd05
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 11 09:50:30 2019 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Jul 11 09:50:30 2019 -0400
CMakeDetermineCompilerId: Consider UTF-16 encodings of INFO strings
Our compiler identification source encodes `INFO:compiler[...]` and
similar strings in compiled objects or binaries that we then extract to
get information about the compiler. With most compilers the strings are
encoded in the binaries as a simple byte sequence. However, some
compilers use other encodings. For example, the MS CSharp compiler uses
UTF-16LE and a TI compiler uses UTF-16BE. Try each encoding.
Fixes: #19459
diff --git a/Modules/CMakeDetermineCSharpCompiler.cmake b/Modules/CMakeDetermineCSharpCompiler.cmake
index dab9414..da860a8 100644
--- a/Modules/CMakeDetermineCSharpCompiler.cmake
+++ b/Modules/CMakeDetermineCSharpCompiler.cmake
@@ -18,7 +18,6 @@ if(NOT CMAKE_CSharp_COMPILER_ID_RUN)
set(CMAKE_CSharp_COMPILER_ID_RUN 1)
# Try to identify the compiler.
- set(CMAKE_CSharp_COMPILER_ID_STRINGS_PARAMETERS ENCODING UTF-16LE)
set(CMAKE_CSharp_COMPILER_ID)
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
CMAKE_DETERMINE_COMPILER_ID(CSharp CSFLAGS CMakeCSharpCompilerId.cs)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 6083358..1914f52 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -640,10 +640,14 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(ARCHITECTURE_ID)
set(SIMULATE_ID)
set(SIMULATE_VERSION)
- file(STRINGS ${file}
- CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 38
- ${CMAKE_${lang}_COMPILER_ID_STRINGS_PARAMETERS}
- REGEX ".?I.?N.?F.?O.?:.?[A-Za-z0-9_]+\\[[^]]*\\]")
+ foreach(encoding "" "ENCODING;UTF-16LE" "ENCODING;UTF-16BE")
+ file(STRINGS "${file}" CMAKE_${lang}_COMPILER_ID_STRINGS
+ LIMIT_COUNT 38 ${encoding}
+ REGEX ".?I.?N.?F.?O.?:.?[A-Za-z0-9_]+\\[[^]]*\\]")
+ if(NOT CMAKE_${lang}_COMPILER_ID_STRINGS STREQUAL "")
+ break()
+ endif()
+ endforeach()
set(COMPILER_ID_TWICE)
# With the IAR Compiler, some strings are found twice, first time as incomplete
# list like "?<Constant "INFO:compiler[IAR]">". Remove the incomplete copies.
-----------------------------------------------------------------------
Summary of changes:
Modules/CMakeDetermineCSharpCompiler.cmake | 1 -
Modules/CMakeDetermineCompilerId.cmake | 12 ++++++++----
2 files changed, 8 insertions(+), 5 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list