[Cmake-commits] CMake branch, next, updated. v3.0.1-4873-g2ba239f
Brad King
brad.king at kitware.com
Tue Aug 12 10:14:35 EDT 2014
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, next has been updated
via 2ba239f0a6fffcb3e165aa3c4dc69893566a071c (commit)
via aa21001bd3c723f79e74407a2ba315d5988804a0 (commit)
via 6fe770e163daf005cd151798c18b89ad50c17125 (commit)
via 9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7 (commit)
via f063a914c649b1dfbcd1a02d381b4e94ad01ceaa (commit)
via 2b20110f681d180f12f4c200df1489eeb242d1b2 (commit)
via 2dfcf0ed079119cb25f6520100083270873503f5 (commit)
via dbb5a7ee315948b4f16e5c6a549db090e266e51d (commit)
from 3e510c4e348f3d029cf56f3774eec97b609aa544 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ba239f0a6fffcb3e165aa3c4dc69893566a071c
commit 2ba239f0a6fffcb3e165aa3c4dc69893566a071c
Merge: 3e510c4 aa21001
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 12 10:14:34 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Aug 12 10:14:34 2014 -0400
Merge topic 'vs-special-source-file-properties' into next
aa21001b Help: Add notes for topic 'vs-special-source-file-properties'
6fe770e1 VS: Add a source file property to set the hlsl shader type
9b4dc2ad VS: Add a source file property to mark content for Windows App deployment
f063a914 VS: Re-arrange WriteExtraSource to support tool configuration
2b20110f MSVC: Select default standard libraries for ARM platform
2dfcf0ed VS: Fix generation of desktop applications for ARM
dbb5a7ee CMakeDetermineCompilerId: Fix detection for VS ARM platform
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aa21001bd3c723f79e74407a2ba315d5988804a0
commit aa21001bd3c723f79e74407a2ba315d5988804a0
Author: Brad King <brad.king at kitware.com>
AuthorDate: Wed Aug 6 09:35:24 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:09:20 2014 -0400
Help: Add notes for topic 'vs-special-source-file-properties'
diff --git a/Help/release/dev/vs-special-source-file-properties.rst b/Help/release/dev/vs-special-source-file-properties.rst
new file mode 100644
index 0000000..166c4b3
--- /dev/null
+++ b/Help/release/dev/vs-special-source-file-properties.rst
@@ -0,0 +1,11 @@
+vs-special-source-file-properties
+---------------------------------
+
+* A :prop_sf:`VS_DEPLOYMENT_CONTENT` source file property was added
+ to tell the Visual Studio generators to mark content for deployment
+ in Windows Phone and Windows Store projects.
+
+* The Visual Studio generators learned to treat ``.hlsl`` source
+ files as High Level Shading Language sources (using ``FXCompile``
+ in ``.vcxproj`` files). A :prop_sf:`VS_SHADER_TYPE` source file
+ property was added to specify the Shader Type.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6fe770e163daf005cd151798c18b89ad50c17125
commit 6fe770e163daf005cd151798c18b89ad50c17125
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 29 14:48:20 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:49 2014 -0400
VS: Add a source file property to set the hlsl shader type
Create a VS_SHADER_TYPE source file property.
Inspired-by: Gilles Khouzam <gillesk at microsoft.com>
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 3b7436a..81b00fa 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -288,6 +288,7 @@ Properties on Source Files
/prop_sf/OBJECT_OUTPUTS
/prop_sf/SYMBOLIC
/prop_sf/VS_DEPLOYMENT_CONTENT
+ /prop_sf/VS_SHADER_TYPE
/prop_sf/WRAP_EXCLUDE
/prop_sf/XCODE_EXPLICIT_FILE_TYPE
/prop_sf/XCODE_LAST_KNOWN_FILE_TYPE
diff --git a/Help/prop_sf/VS_SHADER_TYPE.rst b/Help/prop_sf/VS_SHADER_TYPE.rst
new file mode 100644
index 0000000..6880256
--- /dev/null
+++ b/Help/prop_sf/VS_SHADER_TYPE.rst
@@ -0,0 +1,4 @@
+VS_SHADER_TYPE
+--------------
+
+Set the VS shader type of a ``.hlsl`` source file.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 01a3b37..6989c51 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1020,11 +1020,22 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
bool toolHasSettings = false;
std::string tool = "None";
+ std::string shaderType;
std::string const& ext = sf->GetExtension();
if(ext == "appxmanifest")
{
tool = "AppxManifest";
}
+ else if(ext == "hlsl")
+ {
+ tool = "FXCompile";
+ // Figure out the type of shader compiler to use.
+ if(const char* st = sf->GetProperty("VS_SHADER_TYPE"))
+ {
+ shaderType = st;
+ toolHasSettings = true;
+ }
+ }
else if(ext == "jpg" ||
ext == "png")
{
@@ -1078,6 +1089,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
}
}
}
+ if(!shaderType.empty())
+ {
+ this->WriteString("<ShaderType>", 3);
+ (*this->BuildFileStream) << cmVS10EscapeXML(shaderType)
+ << "</ShaderType>\n";
+ }
this->WriteString("</", 2);
(*this->BuildFileStream) << tool << ">\n";
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7
commit 9b4dc2ad4a82b233520015fdc5cbf5df1ed540f7
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 29 14:03:35 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:47 2014 -0400
VS: Add a source file property to mark content for Windows App deployment
Create a VS_DEPLOYMENT_CONTENT source file property, supporting
generator expressions, to compute whether a source file should be marked
as DeploymentContent or ExcludedFromBuild in Windows Phone and Windows
Store projects.
Inspired-by: Minmin Gong <minmin.gong at gmail.com>
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index 17dadc2..3b7436a 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -287,6 +287,7 @@ Properties on Source Files
/prop_sf/OBJECT_DEPENDS
/prop_sf/OBJECT_OUTPUTS
/prop_sf/SYMBOLIC
+ /prop_sf/VS_DEPLOYMENT_CONTENT
/prop_sf/WRAP_EXCLUDE
/prop_sf/XCODE_EXPLICIT_FILE_TYPE
/prop_sf/XCODE_LAST_KNOWN_FILE_TYPE
diff --git a/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst
new file mode 100644
index 0000000..9fb3ba3
--- /dev/null
+++ b/Help/prop_sf/VS_DEPLOYMENT_CONTENT.rst
@@ -0,0 +1,11 @@
+VS_DEPLOYMENT_CONTENT
+---------------------
+
+Mark a source file as content for deployment with a Windows Phone or
+Windows Store application when built with a Visual Studio generator.
+The value must evaluate to either ``1`` or ``0`` and may use
+:manual:`generator expressions <cmake-generator-expressions(7)>`
+to make the choice based on the build configuration.
+The ``.vcxproj`` file entry for the source file will be
+marked either ``DeploymentContent`` or ``ExcludedFromBuild``
+for values ``1`` and ``0``, respectively.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 3dadd52..01a3b37 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1035,10 +1035,50 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
tool = "XML";
}
+ std::string deployContent;
+ if(this->GlobalGenerator->TargetsWindowsPhone() ||
+ this->GlobalGenerator->TargetsWindowsStore())
+ {
+ const char* content = sf->GetProperty("VS_DEPLOYMENT_CONTENT");
+ if(content && *content)
+ {
+ toolHasSettings = true;
+ deployContent = content;
+ }
+ }
+
if(toolHasSettings)
{
this->WriteSource(tool, sf, ">\n");
+ if(!deployContent.empty())
+ {
+ std::vector<std::string> const* configs =
+ this->GlobalGenerator->GetConfigurations();
+ cmGeneratorExpression ge;
+ cmsys::auto_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(deployContent);
+ for(size_t i = 0; i != configs->size(); ++i)
+ {
+ if(0 == strcmp(cge->Evaluate(this->Makefile, (*configs)[i]), "1"))
+ {
+ this->WriteString("<DeploymentContent Condition=\""
+ "'$(Configuration)|$(Platform)'=='", 3);
+ (*this->BuildFileStream) << (*configs)[i] << "|"
+ << this->Platform << "'\">true";
+ this->WriteString("</DeploymentContent>\n", 0);
+ }
+ else
+ {
+ this->WriteString("<ExcludedFromBuild Condition=\""
+ "'$(Configuration)|$(Platform)'=='", 3);
+ (*this->BuildFileStream) << (*configs)[i] << "|"
+ << this->Platform << "'\">true";
+ this->WriteString("</ExcludedFromBuild>\n", 0);
+ }
+ }
+ }
+
this->WriteString("</", 2);
(*this->BuildFileStream) << tool << ">\n";
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f063a914c649b1dfbcd1a02d381b4e94ad01ceaa
commit f063a914c649b1dfbcd1a02d381b4e94ad01ceaa
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 29 14:41:03 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:44 2014 -0400
VS: Re-arrange WriteExtraSource to support tool configuration
Add a code path to write the tool open and close elements separately
so that we can add content in between to configure it.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 1e9e8e8..3dadd52 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1018,6 +1018,7 @@ void cmVisualStudio10TargetGenerator::WriteHeaderSource(cmSourceFile const* sf)
void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
+ bool toolHasSettings = false;
std::string tool = "None";
std::string const& ext = sf->GetExtension();
if(ext == "appxmanifest")
@@ -1033,7 +1034,18 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
{
tool = "XML";
}
- this->WriteSource(tool, sf);
+
+ if(toolHasSettings)
+ {
+ this->WriteSource(tool, sf, ">\n");
+
+ this->WriteString("</", 2);
+ (*this->BuildFileStream) << tool << ">\n";
+ }
+ else
+ {
+ this->WriteSource(tool, sf);
+ }
}
void cmVisualStudio10TargetGenerator::WriteSource(
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2b20110f681d180f12f4c200df1489eeb242d1b2
commit 2b20110f681d180f12f4c200df1489eeb242d1b2
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 5 15:02:49 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:42 2014 -0400
MSVC: Select default standard libraries for ARM platform
For Windows ARM targets, only kernel32.lib and user32.lib are standard.
diff --git a/Modules/Platform/Windows-MSVC.cmake b/Modules/Platform/Windows-MSVC.cmake
index 9d4aca2..0c2e21b 100644
--- a/Modules/Platform/Windows-MSVC.cmake
+++ b/Modules/Platform/Windows-MSVC.cmake
@@ -167,13 +167,17 @@ elseif(WINDOWS_PHONE OR WINDOWS_STORE)
set(_FLAGS_CXX " /DUNICODE /D_UNICODE /GR /EHsc")
if(WINDOWS_PHONE)
set(CMAKE_C_STANDARD_LIBRARIES_INIT "WindowsPhoneCore.lib RuntimeObject.lib PhoneAppModelHost.lib")
+ elseif(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM)
+ set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib")
else()
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib")
endif()
else()
set(_PLATFORM_DEFINES "/DWIN32")
- if(MSVC_VERSION GREATER 1310)
+ if(MSVC_C_ARCHITECTURE_ID STREQUAL ARM OR MSVC_CXX_ARCHITECTURE_ID STREQUAL ARM)
+ set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib")
+ elseif(MSVC_VERSION GREATER 1310)
set(_RTC1 "/RTC1")
set(_FLAGS_CXX " /GR /EHsc")
set(CMAKE_C_STANDARD_LIBRARIES_INIT "kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib")
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2dfcf0ed079119cb25f6520100083270873503f5
commit 2dfcf0ed079119cb25f6520100083270873503f5
Author: Gilles Khouzam <gillesk at microsoft.com>
AuthorDate: Tue Aug 5 15:00:09 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:40 2014 -0400
VS: Fix generation of desktop applications for ARM
Add WindowsSDKDesktopARMSupport to the .vcxproj to avoid 'error MSB8022:
Compiling Desktop applications for the ARM platform is not supported.'
from VS.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 291827a..1e9e8e8 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -2133,4 +2133,9 @@ void cmVisualStudio10TargetGenerator::WriteApplicationTypeSettings()
"</MinimumVisualStudioVersion>\n", 2);
}
}
+ if (this->Platform == "ARM")
+ {
+ this->WriteString("<WindowsSDKDesktopARMSupport>true"
+ "</WindowsSDKDesktopARMSupport>", 2);
+ }
}
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dbb5a7ee315948b4f16e5c6a549db090e266e51d
commit dbb5a7ee315948b4f16e5c6a549db090e266e51d
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Aug 5 14:44:12 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Aug 12 10:08:37 2014 -0400
CMakeDetermineCompilerId: Fix detection for VS ARM platform
Add WindowsSDKDesktopARMSupport to the compiler id .vcxproj to
avoid 'error MSB8022: Compiling Desktop applications for the ARM
platform is not supported.' from VS.
Inspired-by: Minmin Gong <minmin.gong at gmail.com>
Inspired-by: Gilles Khouzam <gillesk at microsoft.com>
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index a780fa6..1fca55d 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -180,6 +180,11 @@ Id flags: ${testflags}
else()
set(id_system_version "")
endif()
+ if(id_platform STREQUAL ARM)
+ set(id_WindowsSDKDesktopARMSupport "<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>")
+ else()
+ set(id_WindowsSDKDesktopARMSupport "")
+ endif()
if(CMAKE_VS_WINCE_VERSION)
set(id_entrypoint "mainACRTStartup")
if("${vs_version}" VERSION_LESS 9)
diff --git a/Modules/CompilerId/VS-10.vcxproj.in b/Modules/CompilerId/VS-10.vcxproj.in
index bacbca4..a17d03d 100644
--- a/Modules/CompilerId/VS-10.vcxproj.in
+++ b/Modules/CompilerId/VS-10.vcxproj.in
@@ -12,6 +12,7 @@
<Keyword>Win32Proj</Keyword>
@id_system@
@id_system_version@
+ @id_WindowsSDKDesktopARMSupport@
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@id_platform@'" Label="Configuration">
-----------------------------------------------------------------------
Summary of changes:
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list