[Cmake-commits] CMake branch, master, updated. v3.9.3-1062-g1e38b99
Kitware Robot
kwrobot at kitware.com
Wed Oct 4 07:15:18 EDT 2017
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 1e38b99454838660b4727a8ac1f5b611e1d535cc (commit)
via 44d0e377f919399a086a62b5df45dd0ede1a2747 (commit)
via b320eb48f32f082dfa88bb0e958770a1feff30b1 (commit)
via 8b5539d1c27145a5b71d551c12fabe273a5f93dc (commit)
via 58d9297eefd516cb30c00f132a9c9b8c440c4f91 (commit)
via b8dd7a705c5e3149a86208f027e3d15703389494 (commit)
via 0b419b998d8e54a98f04540a5dad9034d1632521 (commit)
via 1bdb8cd24782173e22946643eb3bbfed2e6b9dc8 (commit)
via b96ca728f1da01c051ac3b44f32b5221d1efeff9 (commit)
via 303cd7037a5de2b26373ed4184fd36e68e0f01da (commit)
via f952f16d233b7121740f271a0a5d65d108473568 (commit)
from 19fce0471311d423ee88f3904c0b70946a31bcb1 (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=1e38b99454838660b4727a8ac1f5b611e1d535cc
commit 1e38b99454838660b4727a8ac1f5b611e1d535cc
Merge: 44d0e37 58d9297
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 4 11:07:06 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 4 07:08:27 2017 -0400
Merge topic 'test-macos-updates'
58d9297e Tests: Fix RunCMake.Framework ios arch for Xcode 9
b8dd7a70 Tests: Fix RunCMake.Framework expected output on macOS 10.13
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1338
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=44d0e377f919399a086a62b5df45dd0ede1a2747
commit 44d0e377f919399a086a62b5df45dd0ede1a2747
Merge: b320eb4 0b419b9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 4 11:06:48 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 4 07:07:50 2017 -0400
Merge topic 'vs-no-empty-link-version'
0b419b99 VS: Do not emit empty linker Version tag
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1332
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b320eb48f32f082dfa88bb0e958770a1feff30b1
commit b320eb48f32f082dfa88bb0e958770a1feff30b1
Merge: 8b5539d 1bdb8cd
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 4 11:05:46 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 4 07:07:09 2017 -0400
Merge topic 'compiler-version-internal'
1bdb8cd2 IAR: Detect compiler platform version
b96ca728 Add infrastructure to detect secondary compiler version information
f952f16d Help: Fix placement of one variable in cmake-variables manual
Acked-by: Kitware Robot <kwrobot at kitware.com>
Merge-request: !1324
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8b5539d1c27145a5b71d551c12fabe273a5f93dc
commit 8b5539d1c27145a5b71d551c12fabe273a5f93dc
Merge: 19fce04 303cd70
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Oct 4 11:04:25 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Wed Oct 4 07:05:41 2017 -0400
Merge topic 'src-flags-genex-target'
303cd703 VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS property
Acked-by: Kitware Robot <kwrobot at kitware.com>
Acked-by: Nikita Nemkin <nikita at nemkin.ru>
Merge-request: !1336
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=58d9297eefd516cb30c00f132a9c9b8c440c4f91
commit 58d9297eefd516cb30c00f132a9c9b8c440c4f91
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 3 09:09:08 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 09:09:08 2017 -0400
Tests: Fix RunCMake.Framework ios arch for Xcode 9
Xcode 9 comes with the iPhoneOS 11.0 SDK that does not support the
`armv7` architecture. For this SDK version and newer, use `arm64`.
diff --git a/Tests/RunCMake/Framework/ios.cmake b/Tests/RunCMake/Framework/ios.cmake
index 209a50d..446e914 100644
--- a/Tests/RunCMake/Framework/ios.cmake
+++ b/Tests/RunCMake/Framework/ios.cmake
@@ -20,6 +20,16 @@ execute_process(
OUTPUT_VARIABLE IOS_SDK_PATH
OUTPUT_STRIP_TRAILING_WHITESPACE)
+execute_process(
+ COMMAND ${XCRUN_EXECUTABLE} --sdk iphoneos --show-sdk-version
+ OUTPUT_VARIABLE IOS_SDK_VERSION
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+if(IOS_SDK_VERSION VERSION_GREATER_EQUAL 11.0)
+ set(IOS_ARCH arm64)
+else()
+ set(IOS_ARCH armv7)
+endif()
+
set(CMAKE_OSX_SYSROOT ${IOS_SDK_PATH} CACHE PATH "Sysroot used for iOS support")
-set(CMAKE_OSX_ARCHITECTURES "armv7" CACHE STRING "Architectures to build for")
+set(CMAKE_OSX_ARCHITECTURES "${IOS_ARCH}" CACHE STRING "Architectures to build for")
set(CMAKE_FIND_ROOT_PATH ${IOS_SDK_PATH} CACHE PATH "Find search path root")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8dd7a705c5e3149a86208f027e3d15703389494
commit b8dd7a705c5e3149a86208f027e3d15703389494
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 3 09:05:13 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 09:08:27 2017 -0400
Tests: Fix RunCMake.Framework expected output on macOS 10.13
The archiver output in the case of universal binaries has changed
slightly. Update our expected output to match. While at it, drop
unnecessary leading and trailing `.*`.
diff --git a/Tests/RunCMake/Framework/FrameworkTypeSTATIC-build-stdout.txt b/Tests/RunCMake/Framework/FrameworkTypeSTATIC-build-stdout.txt
index 532cfed..4b5f761 100644
--- a/Tests/RunCMake/Framework/FrameworkTypeSTATIC-build-stdout.txt
+++ b/Tests/RunCMake/Framework/FrameworkTypeSTATIC-build-stdout.txt
@@ -1,2 +1,2 @@
-.*/Framework:( Mach-O universal binary with [^
-]*)? current ar archive random library.*
+/Framework: (Mach-O universal binary with [^
+]*)?current ar archive random library
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0b419b998d8e54a98f04540a5dad9034d1632521
commit 0b419b998d8e54a98f04540a5dad9034d1632521
Author: Vitaly Stakhovsky <vvs31415 at gitlab.org>
AuthorDate: Sat Sep 30 09:53:20 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 08:27:46 2017 -0400
VS: Do not emit empty linker Version tag
This empty element does nothing, so simply remove it to simplify
generated `.vcxproj` files.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6535008..212b522 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3225,8 +3225,6 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
}
if (this->MSTools) {
- linkOptions.AddFlag("Version", "");
-
if (this->GeneratorTarget->GetPropertyAsBool("WIN32_EXECUTABLE")) {
if (this->GlobalGenerator->TargetsWindowsCE()) {
linkOptions.AddFlag("SubSystem", "WindowsCE");
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1bdb8cd24782173e22946643eb3bbfed2e6b9dc8
commit 1bdb8cd24782173e22946643eb3bbfed2e6b9dc8
Author: Stefan Andersson <tfosm at hotmail.com>
AuthorDate: Tue Sep 19 10:55:25 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 08:11:27 2017 -0400
IAR: Detect compiler platform version
`__IAR_SYSTEMS_ICC__` provides additional version information that
we need to determine correct usage of the compiler. Extract and
store it as `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL`.
Issue: #17264
diff --git a/Modules/Compiler/IAR-DetermineCompiler.cmake b/Modules/Compiler/IAR-DetermineCompiler.cmake
index 4ef587b..a1bffeb 100644
--- a/Modules/Compiler/IAR-DetermineCompiler.cmake
+++ b/Modules/Compiler/IAR-DetermineCompiler.cmake
@@ -2,8 +2,10 @@
# http://www.iar.com
# http://supp.iar.com/FilesPublic/UPDINFO/004916/arm/doc/EWARM_DevelopmentGuide.ENU.pdf
#
-# __IAR_SYSTEMS_ICC__ An integer that identifies the IAR compiler platform. The current value is 8. Note that
-# the number could be higher in a future version of the product
+# __IAR_SYSTEMS_ICC__ An integer that identifies the IAR compiler platform:
+# 9 and higher means C11 and C++14 as language default
+# 8 means C99 and C++03 as language default
+# 7 and lower means C89 and EC++ as language default.
# __ICCARM__ An integer that is set to 1 when the code is compiled with the IAR C/C++ Compiler for ARM
# __VER__ An integer that identifies the version number of the IAR compiler in use. For example,
# version 5.11.3 is returned as 5011003.
@@ -15,4 +17,5 @@ set(_compiler_id_version_compute "
# define @PREFIX at COMPILER_VERSION_MAJOR @MACRO_DEC@((__VER__) / 1000000)
# define @PREFIX at COMPILER_VERSION_MINOR @MACRO_DEC@(((__VER__) / 1000) % 1000)
# define @PREFIX at COMPILER_VERSION_PATCH @MACRO_DEC@((__VER__) % 1000)
+# define @PREFIX at COMPILER_VERSION_INTERNAL @MACRO_DEC@(__IAR_SYSTEMS_ICC__)
# endif")
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b96ca728f1da01c051ac3b44f32b5221d1efeff9
commit b96ca728f1da01c051ac3b44f32b5221d1efeff9
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Sep 27 08:05:44 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 08:11:27 2017 -0400
Add infrastructure to detect secondary compiler version information
Create a `CMAKE_<LANG>_COMPILER_VERSION_INTERNAL` variable to hold
a secondary/internal compiler version number detected at the same
time as the primary compiler version. This will be useful for some
compilers where we need such a number to determine correct usage.
Inspired-by: Stefan Andersson <tfosm at hotmail.com>
Suggested-by: Norbert Lange <norbert.lange at andritz.com>
Issue: #17264
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index f94c008..2e369e3 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -400,6 +400,7 @@ Variables for Languages
/variable/CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
/variable/CMAKE_LANG_COMPILER_TARGET
/variable/CMAKE_LANG_COMPILER_VERSION
+ /variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL
/variable/CMAKE_LANG_COMPILE_OBJECT
/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
diff --git a/Help/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL.rst b/Help/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL.rst
new file mode 100644
index 0000000..c3cd980
--- /dev/null
+++ b/Help/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL.rst
@@ -0,0 +1,8 @@
+CMAKE_<LANG>_COMPILER_VERSION_INTERNAL
+--------------------------------------
+
+An internal variable subject to change.
+
+This is used to identify the variant of a compiler based on an internal
+version number. For some compilers this is needed to determine the
+correct usage.
diff --git a/Modules/CMakeCCompiler.cmake.in b/Modules/CMakeCCompiler.cmake.in
index 92259dd..8ad0c01 100644
--- a/Modules/CMakeCCompiler.cmake.in
+++ b/Modules/CMakeCCompiler.cmake.in
@@ -2,6 +2,7 @@ set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@")
set(CMAKE_C_COMPILER_ARG1 "@CMAKE_C_COMPILER_ARG1@")
set(CMAKE_C_COMPILER_ID "@CMAKE_C_COMPILER_ID@")
set(CMAKE_C_COMPILER_VERSION "@CMAKE_C_COMPILER_VERSION@")
+set(CMAKE_C_COMPILER_VERSION_INTERNAL "@CMAKE_C_COMPILER_VERSION_INTERNAL@")
set(CMAKE_C_COMPILER_WRAPPER "@CMAKE_C_COMPILER_WRAPPER@")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "@CMAKE_C_STANDARD_COMPUTED_DEFAULT@")
set(CMAKE_C_COMPILE_FEATURES "@CMAKE_C_COMPILE_FEATURES@")
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in
index 95184c9..10f7318 100644
--- a/Modules/CMakeCCompilerId.c.in
+++ b/Modules/CMakeCCompilerId.c.in
@@ -67,6 +67,9 @@ int main(int argc, char* argv[])
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
+#ifdef COMPILER_VERSION_INTERNAL
+ require += info_version_internal[argc];
+#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
diff --git a/Modules/CMakeCXXCompiler.cmake.in b/Modules/CMakeCXXCompiler.cmake.in
index 47fc624..df57a4f 100644
--- a/Modules/CMakeCXXCompiler.cmake.in
+++ b/Modules/CMakeCXXCompiler.cmake.in
@@ -2,6 +2,7 @@ set(CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@")
set(CMAKE_CXX_COMPILER_ARG1 "@CMAKE_CXX_COMPILER_ARG1@")
set(CMAKE_CXX_COMPILER_ID "@CMAKE_CXX_COMPILER_ID@")
set(CMAKE_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@")
+set(CMAKE_CXX_COMPILER_VERSION_INTERNAL "@CMAKE_CXX_COMPILER_VERSION_INTERNAL@")
set(CMAKE_CXX_COMPILER_WRAPPER "@CMAKE_CXX_COMPILER_WRAPPER@")
set(CMAKE_CXX_STANDARD_COMPUTED_DEFAULT "@CMAKE_CXX_STANDARD_COMPUTED_DEFAULT@")
set(CMAKE_CXX_COMPILE_FEATURES "@CMAKE_CXX_COMPILE_FEATURES@")
diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in
index 6572bb3..4cb2267 100644
--- a/Modules/CMakeCXXCompilerId.cpp.in
+++ b/Modules/CMakeCXXCompilerId.cpp.in
@@ -55,6 +55,9 @@ int main(int argc, char* argv[])
#ifdef COMPILER_VERSION_MAJOR
require += info_version[argc];
#endif
+#ifdef COMPILER_VERSION_INTERNAL
+ require += info_version_internal[argc];
+#endif
#ifdef SIMULATE_ID
require += info_simulate[argc];
#endif
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index cddc966..7efe739 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -108,6 +108,7 @@ function(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
set(CMAKE_${lang}_XCODE_CURRENT_ARCH "${CMAKE_${lang}_XCODE_CURRENT_ARCH}" PARENT_SCOPE)
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX}" PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
+ set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_WRAPPER "${CMAKE_${lang}_COMPILER_WRAPPER}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
@@ -473,6 +474,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(COMPILER_VERSION_MINOR 0)
set(COMPILER_VERSION_PATCH 0)
set(COMPILER_VERSION_TWEAK 0)
+ set(COMPILER_VERSION_INTERNAL "")
set(HAVE_COMPILER_VERSION_MAJOR 0)
set(HAVE_COMPILER_VERSION_MINOR 0)
set(HAVE_COMPILER_VERSION_PATCH 0)
@@ -514,6 +516,10 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION "${CMAKE_MATCH_1}")
string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION "${COMPILER_VERSION}")
endif()
+ if("${info}" MATCHES "INFO:compiler_version_internal\\[([^]\"]*)\\]")
+ string(REGEX REPLACE "^0+([0-9])" "\\1" COMPILER_VERSION_INTERNAL "${CMAKE_MATCH_1}")
+ string(REGEX REPLACE "\\.0+([0-9])" ".\\1" COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}")
+ endif()
foreach(comp MAJOR MINOR PATCH TWEAK)
foreach(digit 1 2 3 4 5 6 7 8 9)
if("${info}" MATCHES "INFO:compiler_version_${comp}_digit_${digit}\\[([0-9])\\]")
@@ -589,6 +595,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(CMAKE_${lang}_COMPILER_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
set(MSVC_${lang}_ARCHITECTURE_ID "${ARCHITECTURE_ID}")
set(CMAKE_${lang}_COMPILER_VERSION "${COMPILER_VERSION}")
+ set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${COMPILER_VERSION_INTERNAL}")
set(CMAKE_${lang}_SIMULATE_ID "${SIMULATE_ID}")
set(CMAKE_${lang}_SIMULATE_VERSION "${SIMULATE_VERSION}")
endif()
@@ -640,6 +647,7 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
set(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_VERSION "${CMAKE_${lang}_COMPILER_VERSION}" PARENT_SCOPE)
+ set(CMAKE_${lang}_COMPILER_VERSION_INTERNAL "${CMAKE_${lang}_COMPILER_VERSION_INTERNAL}" PARENT_SCOPE)
set(CMAKE_${lang}_COMPILER_WRAPPER "${COMPILER_WRAPPER}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_ID "${CMAKE_${lang}_SIMULATE_ID}" PARENT_SCOPE)
set(CMAKE_${lang}_SIMULATE_VERSION "${CMAKE_${lang}_SIMULATE_VERSION}" PARENT_SCOPE)
diff --git a/Modules/CMakePlatformId.h.in b/Modules/CMakePlatformId.h.in
index a6a9c0a..dd77379 100644
--- a/Modules/CMakePlatformId.h.in
+++ b/Modules/CMakePlatformId.h.in
@@ -201,6 +201,15 @@ char const info_version[] = {
']','\0'};
#endif
+/* Construct a string literal encoding the internal version number. */
+#ifdef COMPILER_VERSION_INTERNAL
+char const info_version_internal[] = {
+ 'I', 'N', 'F', 'O', ':',
+ 'c','o','m','p','i','l','e','r','_','v','e','r','s','i','o','n','_',
+ 'i','n','t','e','r','n','a','l','[',
+ COMPILER_VERSION_INTERNAL,']','\0'};
+#endif
+
/* Construct a string literal encoding the version number components. */
#ifdef SIMULATE_VERSION_MAJOR
char const info_simulate_version[] = {
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=303cd7037a5de2b26373ed4184fd36e68e0f01da
commit 303cd7037a5de2b26373ed4184fd36e68e0f01da
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 2 08:25:22 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Oct 3 08:03:33 2017 -0400
VS,Xcode: Fix TARGET_PROPERTY genex in source COMPILE_FLAGS property
This already worked in other generators. Also add a test case.
Fixes: #17314
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 304a188..c79ee47 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -668,7 +668,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile(
std::string configName = "NO-PER-CONFIG-SUPPORT-IN-XCODE";
std::unique_ptr<cmCompiledGeneratorExpression> compiledExpr =
ge.Parse(cflags);
- const char* processed = compiledExpr->Evaluate(lg, configName);
+ const char* processed =
+ compiledExpr->Evaluate(lg, configName, false, gtgt);
if (compiledExpr->GetHadContextSensitiveCondition()) {
std::ostringstream e;
/* clang-format off */
diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx
index 8027191..d8030b7 100644
--- a/Source/cmLocalVisualStudio7Generator.cxx
+++ b/Source/cmLocalVisualStudio7Generator.cxx
@@ -1454,7 +1454,7 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo(
if (const char* cflags = sf.GetProperty("COMPILE_FLAGS")) {
cmGeneratorExpression ge;
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(cflags);
- fc.CompileFlags = cge->Evaluate(lg, *i);
+ fc.CompileFlags = cge->Evaluate(lg, *i, false, gt);
needfc = true;
}
if (lg->FortranProject) {
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6535008..eb5a3e4 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2125,8 +2125,8 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags(
if (configDependentFlags) {
cmGeneratorExpression ge;
std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(flags);
- std::string evaluatedFlags =
- cge->Evaluate(this->LocalGenerator, *config);
+ std::string evaluatedFlags = cge->Evaluate(
+ this->LocalGenerator, *config, false, this->GeneratorTarget);
clOptions.Parse(evaluatedFlags.c_str());
} else {
clOptions.Parse(flags.c_str());
diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt
index 8ac3419..83fd11d 100644
--- a/Tests/GeneratorExpression/CMakeLists.txt
+++ b/Tests/GeneratorExpression/CMakeLists.txt
@@ -258,11 +258,13 @@ add_custom_target(check-part4 ALL
VERBATIM
)
+add_executable(srcgenex srcgenex.c)
+set_property(SOURCE srcgenex.c PROPERTY COMPILE_FLAGS "-DNAME=$<TARGET_PROPERTY:NAME>")
+
#-----------------------------------------------------------------------------
# Cover test properties with generator expressions.
add_executable(echo echo.c)
add_executable(pwd pwd.c)
-set_property(SOURCE echo.c PROPERTY COMPILE_FLAGS $<1:-DSRC_GENEX_WORKS>)
add_test(NAME echo-configuration COMMAND echo $<CONFIGURATION>)
set_property(TEST echo-configuration PROPERTY
diff --git a/Tests/GeneratorExpression/echo.c b/Tests/GeneratorExpression/echo.c
index 41596a2..06b0844 100644
--- a/Tests/GeneratorExpression/echo.c
+++ b/Tests/GeneratorExpression/echo.c
@@ -3,9 +3,6 @@
int main(int argc, char* argv[])
{
-#ifndef SRC_GENEX_WORKS
-#error SRC_GENEX_WORKS not defined
-#endif
printf("%s\n", argv[1]);
return EXIT_SUCCESS;
}
diff --git a/Tests/GeneratorExpression/srcgenex.c b/Tests/GeneratorExpression/srcgenex.c
new file mode 100644
index 0000000..56d3c3f
--- /dev/null
+++ b/Tests/GeneratorExpression/srcgenex.c
@@ -0,0 +1,12 @@
+int srcgenex(void)
+{
+ return 0;
+}
+
+int main(int argc, char* argv[])
+{
+#ifndef NAME
+#error NAME not defined
+#endif
+ return NAME();
+}
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f952f16d233b7121740f271a0a5d65d108473568
commit f952f16d233b7121740f271a0a5d65d108473568
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 2 11:39:25 2017 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 2 11:40:40 2017 -0400
Help: Fix placement of one variable in cmake-variables manual
The `CMAKE_<LANG>_COMPILER_PREDEFINES_COMMAND` variable was recently
added slightly in the wrong place for the sorted ordering.
diff --git a/Help/manual/cmake-variables.7.rst b/Help/manual/cmake-variables.7.rst
index 66d3049..f94c008 100644
--- a/Help/manual/cmake-variables.7.rst
+++ b/Help/manual/cmake-variables.7.rst
@@ -397,9 +397,9 @@ Variables for Languages
/variable/CMAKE_LANG_COMPILER_EXTERNAL_TOOLCHAIN
/variable/CMAKE_LANG_COMPILER_ID
/variable/CMAKE_LANG_COMPILER_LOADED
+ /variable/CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
/variable/CMAKE_LANG_COMPILER_TARGET
/variable/CMAKE_LANG_COMPILER_VERSION
- /variable/CMAKE_LANG_COMPILER_PREDEFINES_COMMAND
/variable/CMAKE_LANG_COMPILE_OBJECT
/variable/CMAKE_LANG_CREATE_SHARED_LIBRARY
/variable/CMAKE_LANG_CREATE_SHARED_MODULE
-----------------------------------------------------------------------
Summary of changes:
Help/manual/cmake-variables.7.rst | 3 ++-
Help/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL.rst | 8 ++++++++
Modules/CMakeCCompiler.cmake.in | 1 +
Modules/CMakeCCompilerId.c.in | 3 +++
Modules/CMakeCXXCompiler.cmake.in | 1 +
Modules/CMakeCXXCompilerId.cpp.in | 3 +++
Modules/CMakeDetermineCompilerId.cmake | 8 ++++++++
Modules/CMakePlatformId.h.in | 9 +++++++++
Modules/Compiler/IAR-DetermineCompiler.cmake | 7 +++++--
Source/cmGlobalXCodeGenerator.cxx | 3 ++-
Source/cmLocalVisualStudio7Generator.cxx | 2 +-
Source/cmVisualStudio10TargetGenerator.cxx | 6 ++----
Tests/GeneratorExpression/CMakeLists.txt | 4 +++-
Tests/GeneratorExpression/echo.c | 3 ---
Tests/GeneratorExpression/srcgenex.c | 12 ++++++++++++
.../Framework/FrameworkTypeSTATIC-build-stdout.txt | 4 ++--
Tests/RunCMake/Framework/ios.cmake | 12 +++++++++++-
17 files changed, 73 insertions(+), 16 deletions(-)
create mode 100644 Help/variable/CMAKE_LANG_COMPILER_VERSION_INTERNAL.rst
create mode 100644 Tests/GeneratorExpression/srcgenex.c
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list