summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Help/prop_tgt/IMPORTED_NO_SYSTEM.rst2
-rw-r--r--Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst15
-rw-r--r--Help/prop_tgt/SYSTEM.rst14
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake2
-rw-r--r--Modules/Compiler/IAR-ASM.cmake4
-rw-r--r--Modules/Compiler/IAR-CXX.cmake5
-rw-r--r--Modules/Compiler/IAR.cmake1
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Tests/RunCMake/Ninja/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake3
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt1
-rw-r--r--Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake3
-rw-r--r--Tests/RunCMake/showIncludes.c8
13 files changed, 45 insertions, 16 deletions
diff --git a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
index c8ec8b5c48..e1fea37d8c 100644
--- a/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
+++ b/Help/prop_tgt/IMPORTED_NO_SYSTEM.rst
@@ -25,6 +25,8 @@ system target. This has the following effects:
would be by default. Entries of
:prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not affected,
and will always be treated as system include directories.
+* On Apple platforms, when the target is a framework, it will not be treated as
+ system.
This property can also be enabled on a non-imported target. Doing so does
not affect the build system, but does tell the :command:`install(EXPORT)` and
diff --git a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
index a4c9b9fddc..458618b7e7 100644
--- a/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
+++ b/Help/prop_tgt/NO_SYSTEM_FROM_IMPORTED.rst
@@ -4,13 +4,14 @@ NO_SYSTEM_FROM_IMPORTED
Do not treat include directories from the interfaces of consumed
:ref:`imported targets` as system directories.
-The contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property
-are treated as system includes when the consumed target's :prop_tgt:`SYSTEM`
-property is set to true. By default, :prop_tgt:`SYSTEM` is true for imported
-targets and false for other target types. If the ``NO_SYSTEM_FROM_IMPORTED``
-property is set to true on a *consuming* target, compilation of sources in that
-consuming target will not treat the contents of the
-:prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of consumed imported targets as
+When the consumed target's :prop_tgt:`SYSTEM` property is set to true, the
+contents of the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` target property are
+treated as system includes or, on Apple platforms, when the target is a
+framework, it will be treated as system. By default, :prop_tgt:`SYSTEM` is
+true for imported targets and false for other target types. If the
+``NO_SYSTEM_FROM_IMPORTED`` property is set to true on a *consuming* target,
+compilation of sources in that consuming target will not treat the contents of
+the :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` of consumed imported targets as
system includes, even if that imported target's :prop_tgt:`SYSTEM` property
is false.
diff --git a/Help/prop_tgt/SYSTEM.rst b/Help/prop_tgt/SYSTEM.rst
index c7ae27e819..f5c11bcb8b 100644
--- a/Help/prop_tgt/SYSTEM.rst
+++ b/Help/prop_tgt/SYSTEM.rst
@@ -10,13 +10,17 @@ effects:
system include directories when compiling consumers.
Entries of :prop_tgt:`INTERFACE_SYSTEM_INCLUDE_DIRECTORIES` are not
affected, and will always be treated as system include directories.
+* On Apple platforms, If the :prop_tgt:`FRAMEWORK` target property is true,
+ the frameworks directory is treated as system.
For imported targets, this property defaults to true, which means
-that their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` are treated
-as system directories by default. If their ``SYSTEM`` property is false,
-then their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` will not be
-treated as system. Use the :prop_tgt:`EXPORT_NO_SYSTEM` property to change
-how a target's ``SYSTEM`` property is set when it is installed.
+that their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` and, if the
+:prop_tgt:`FRAMEWORK` target property is true, frameworks directory are
+treated as system directories by default. If their ``SYSTEM`` property is
+false, then their :prop_tgt:`INTERFACE_INCLUDE_DIRECTORIES` as well as
+frameworks will not be treated as system. Use the :prop_tgt:`EXPORT_NO_SYSTEM`
+property to change how a target's ``SYSTEM`` property is set when it is
+installed.
For non-imported targets, this target property is initialized from
the :prop_dir:`SYSTEM` directory property when the target is created.
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 403766e561..6c490960d5 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -1149,7 +1149,7 @@ function(CMAKE_DETERMINE_MSVC_SHOWINCLUDES_PREFIX lang userflags)
ENCODING AUTO # cl prints in console output code page
)
string(REPLACE "\n" "\n " msg " ${out}")
- if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./)")
+ if(res EQUAL 0 AND "${out}" MATCHES "(^|\n)([^:\n][^:\n]+:[^:\n]*[^: \n][^: \n]:?[ \t]+)([A-Za-z]:\\\\|\\./|/)")
set(CMAKE_${lang}_CL_SHOWINCLUDES_PREFIX "${CMAKE_MATCH_2}" PARENT_SCOPE)
string(APPEND msg "\nFound prefix \"${CMAKE_MATCH_2}\"")
else()
diff --git a/Modules/Compiler/IAR-ASM.cmake b/Modules/Compiler/IAR-ASM.cmake
index 4c0025c7f9..5f1dac07bf 100644
--- a/Modules/Compiler/IAR-ASM.cmake
+++ b/Modules/Compiler/IAR-ASM.cmake
@@ -38,22 +38,26 @@ elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__assembler_iar_deps("-y" 8)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s90;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r90")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_iar_xlink(ASM)
__assembler_iar_deps("-y" 8)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s43;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r43")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
__compiler_iar_xlink(ASM)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s85;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r85")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
__compiler_iar_xlink(ASM)
set(_CMAKE_IAR_SILENCER_FLAG " -S")
set(CMAKE_ASM_SOURCE_FILE_EXTENSIONS s51;asm;msa)
+ set(CMAKE_ASM_OUTPUT_EXTENSION ".r51")
elseif("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
__compiler_iar_ilink(ASM)
diff --git a/Modules/Compiler/IAR-CXX.cmake b/Modules/Compiler/IAR-CXX.cmake
index 3f0ef1f357..cea5e7eb01 100644
--- a/Modules/Compiler/IAR-CXX.cmake
+++ b/Modules/Compiler/IAR-CXX.cmake
@@ -69,6 +69,7 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "RISCV")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "AVR")
__compiler_iar_xlink(CXX)
__compiler_check_default_language_standard(CXX 7.10 98)
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r90")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
__compiler_iar_xlink(CXX)
@@ -78,12 +79,12 @@ elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "MSP430")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "V850")
__compiler_iar_xlink(CXX)
__compiler_check_default_language_standard(CXX 1.10 98)
- set(CMAKE_C_OUTPUT_EXTENSION ".r85")
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r85")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "8051")
__compiler_iar_xlink(CXX)
__compiler_check_default_language_standard(CXX 6.10 98)
- set(CMAKE_C_OUTPUT_EXTENSION ".r51")
+ set(CMAKE_CXX_OUTPUT_EXTENSION ".r51")
elseif("${CMAKE_CXX_COMPILER_ARCHITECTURE_ID}" STREQUAL "STM8")
__compiler_iar_ilink(CXX)
diff --git a/Modules/Compiler/IAR.cmake b/Modules/Compiler/IAR.cmake
index 32a7b3f5af..8dadb7612c 100644
--- a/Modules/Compiler/IAR.cmake
+++ b/Modules/Compiler/IAR.cmake
@@ -23,6 +23,7 @@ macro(__compiler_iar_common lang)
string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -Oh -r -DNDEBUG")
endif()
+ set(CMAKE_${lang}_OUTPUT_EXTENSION_REPLACE 1)
set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-f ")
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-f ")
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index be042e4b38..fc29347270 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,7 +1,7 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 26)
-set(CMake_VERSION_PATCH 20230515)
+set(CMake_VERSION_PATCH 20230516)
#set(CMake_VERSION_RC 0)
set(CMake_VERSION_IS_DIRTY 0)
diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 619e94a234..6eb0b1d255 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -51,6 +51,7 @@ if(WIN32)
run_cmake_script(ShowIncludes-437-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-437-German -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-437-Italian -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
+ run_cmake_script(ShowIncludes-437-WineMSVC -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-54936-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-65001-Chinese -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
run_cmake_script(ShowIncludes-65001-French -DshowIncludes=${showIncludes} ${maybe_MAKE_PROGRAM})
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
new file mode 100644
index 0000000000..d4017ab2b6
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-check.cmake
@@ -0,0 +1,3 @@
+# 'msvc-wine -showIncludes' prefix.
+set(expect "Note: including file: ")
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes-check.cmake)
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
new file mode 100644
index 0000000000..bda7eaba1f
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC-stdout.txt
@@ -0,0 +1 @@
+-- showIncludes='Note: including file: '
diff --git a/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
new file mode 100644
index 0000000000..59d3bf63b8
--- /dev/null
+++ b/Tests/RunCMake/Ninja/ShowIncludes-437-WineMSVC.cmake
@@ -0,0 +1,3 @@
+set(CODEPAGE 437)
+set(VSLANG "msvc-wine") # Special case for test, not a real VS value.
+include(${CMAKE_CURRENT_LIST_DIR}/ShowIncludes.cmake)
diff --git a/Tests/RunCMake/showIncludes.c b/Tests/RunCMake/showIncludes.c
index 5afe04a03c..7d467cfaa8 100644
--- a/Tests/RunCMake/showIncludes.c
+++ b/Tests/RunCMake/showIncludes.c
@@ -36,6 +36,14 @@ int main()
}
}
+ // msvc-wine (special case for test, not a real VS value).
+ if (strcmp(vslang, "msvc-wine") == 0) {
+ if (cp == 437 || cp == 65001) {
+ printf("Note: including file: /c/foo.h\n");
+ return 0;
+ }
+ }
+
// German.
if (strcmp(vslang, "1031") == 0) {
if (cp == 437 || cp == 65001) {