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  b4087a23538f87efebcc8e4ece248416c242167f (commit)
       via  4dc8c153ec40c48f88e74beb127949395dfbcf55 (commit)
       via  481070a78a90a7e6c0bfc433fec842c78d63d9de (commit)
       via  acdb326610416ea3a559740fa79ad807a44838ee (commit)
      from  28a2613dd291c641f17940e3f996bd4cc9b9888d (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=b4087a23538f87efebcc8e4ece248416c242167f
commit b4087a23538f87efebcc8e4ece248416c242167f
Merge: 28a2613 4dc8c15
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Thu Sep 26 14:43:16 2019 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Thu Sep 26 10:43:27 2019 -0400

    Merge topic 'vs-ReferenceOutputAssembly-conditions'
    
    4dc8c153ec Tests: Teach VSWinStorePhone to verify the content of generated 
xap
    481070a78a Tests: Teach VSWinStorePhone to verify the content of generated 
appx/msix
    acdb326610 VS: Do not reference output assemblies of targets with no output
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !3778


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4dc8c153ec40c48f88e74beb127949395dfbcf55
commit 4dc8c153ec40c48f88e74beb127949395dfbcf55
Author:     Vedran Vujinovic <vedran.vujino...@gmail.com>
AuthorDate: Wed Sep 25 20:57:47 2019 +0200
Commit:     Vedran Vujinovic <vedran.vujino...@gmail.com>
CommitDate: Wed Sep 25 20:57:47 2019 +0200

    Tests: Teach VSWinStorePhone to verify the content of generated xap
    
    XAP format was used as app package format on Windows Phone 7 and 8.
    It was replaced by APPX format since Windows Phone 8.1.

diff --git a/Tests/VSWinStorePhone/VerifyAppPackage.cmake 
b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
index f1cf030..f9440d7 100644
--- a/Tests/VSWinStorePhone/VerifyAppPackage.cmake
+++ b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
@@ -8,8 +8,8 @@ set(EXPECTED_APP_PKG_CONTENT
   JusticeLeagueWinRT.dll
 )
 
-# Windows app package formats can be either appx or msix
-file(GLOB_RECURSE ALL_APP_PKG_FILES ${APP_PACKAGE_DIR}/AppPackages 
${APP_PKG_NAME}*.appx ${APP_PKG_NAME}*.msix)
+# Windows app package formats can be either msix, appx or xap
+file(GLOB_RECURSE ALL_APP_PKG_FILES ${APP_PACKAGE_DIR} ${APP_PKG_NAME}*.msix 
${APP_PKG_NAME}*.appx ${APP_PKG_NAME}*.xap)
 
 # There can be only one generated app package
 list(LENGTH ALL_APP_PKG_FILES APP_PKG_COUNT)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=481070a78a90a7e6c0bfc433fec842c78d63d9de
commit 481070a78a90a7e6c0bfc433fec842c78d63d9de
Author:     Vedran Vujinovic <vedran.vujino...@gmail.com>
AuthorDate: Wed Sep 4 11:32:10 2019 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Sep 24 10:12:43 2019 -0400

    Tests: Teach VSWinStorePhone to verify the content of generated appx/msix
    
    Add a test to verify the content of generated UWP app package - appx/msix.
    MSIX format was introduced Visual Studio 2017 version 15.9.0 and
    Windows SDK version 17763.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 78ae7aa..c284603 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -2079,6 +2079,9 @@ ${CMake_SOURCE_DIR}/Utilities/Release/push.bash --dir dev 
-- '${CMake_BUILD_NIGH
         --build-config $<CONFIGURATION>
         --build-options -DCMAKE_SYSTEM_NAME=${systemName}
                         -DCMAKE_SYSTEM_VERSION=${systemVersion}
+        --test-command
+          ${CMAKE_CMAKE_COMMAND} 
-DAPP_PACKAGE_DIR="${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}"
+                                 -P 
"${CMake_SOURCE_DIR}/Tests/VSWinStorePhone/VerifyAppPackage.cmake"
         )
       list(APPEND TEST_BUILD_DIRS 
"${CMake_BINARY_DIR}/Tests/VSWinStorePhone/${name}")
     endmacro()
diff --git a/Tests/VSWinStorePhone/CMakeLists.txt 
b/Tests/VSWinStorePhone/CMakeLists.txt
index efc7760..b8e157d 100644
--- a/Tests/VSWinStorePhone/CMakeLists.txt
+++ b/Tests/VSWinStorePhone/CMakeLists.txt
@@ -9,6 +9,7 @@ elseif(MSVC_VERSION GREATER 1600)
 endif()
 
 add_subdirectory(WinRT)
+add_subdirectory(CxxDLL)
 
 set (APP_MANIFEST_NAME Package.appxmanifest)
 if("${CMAKE_SYSTEM_NAME}" STREQUAL "WindowsPhone")
@@ -151,4 +152,4 @@ if("${SHORT_VERSION}" STREQUAL "10.0")
   set_property(TARGET ${EXE_NAME} PROPERTY VS_SDK_REFERENCES 
"Microsoft.UniversalCRT.Debug, 
Version=${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
 endif()
 
-target_link_libraries(${EXE_NAME} d3d11 JusticeLeagueWinRT)
+target_link_libraries(${EXE_NAME} d3d11 JusticeLeagueWinRT CxxDll)
diff --git a/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt 
b/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt
new file mode 100644
index 0000000..6bd32a2
--- /dev/null
+++ b/Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt
@@ -0,0 +1,3 @@
+project(CxxDll CXX)
+
+add_library(CxxDll SHARED cxxdll.cpp)
diff --git a/Tests/VSWinStorePhone/CxxDLL/cxxdll.cpp 
b/Tests/VSWinStorePhone/CxxDLL/cxxdll.cpp
new file mode 100644
index 0000000..d82a792
--- /dev/null
+++ b/Tests/VSWinStorePhone/CxxDLL/cxxdll.cpp
@@ -0,0 +1,7 @@
+#include "cxxdll.h"
+#include <iostream>
+
+void CxxDllClass::SomeMethod()
+{
+  std::cout << "CxxDllClass::SomeMethod\n";
+}
diff --git a/Tests/VSWinStorePhone/CxxDLL/cxxdll.h 
b/Tests/VSWinStorePhone/CxxDLL/cxxdll.h
new file mode 100644
index 0000000..86edceb
--- /dev/null
+++ b/Tests/VSWinStorePhone/CxxDLL/cxxdll.h
@@ -0,0 +1,5 @@
+class __declspec(dllexport) CxxDllClass
+{
+public:
+  static void SomeMethod();
+};
diff --git a/Tests/VSWinStorePhone/VerifyAppPackage.cmake 
b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
new file mode 100644
index 0000000..f1cf030
--- /dev/null
+++ b/Tests/VSWinStorePhone/VerifyAppPackage.cmake
@@ -0,0 +1,34 @@
+set(APP_PKG_NAME Direct3DApp1)
+
+# List of files that are expected to be present in the generated app package
+set(EXPECTED_APP_PKG_CONTENT
+  ${APP_PKG_NAME}.exe
+  CxxDll.dll
+  JusticeLeagueWinRT.winmd
+  JusticeLeagueWinRT.dll
+)
+
+# Windows app package formats can be either appx or msix
+file(GLOB_RECURSE ALL_APP_PKG_FILES ${APP_PACKAGE_DIR}/AppPackages 
${APP_PKG_NAME}*.appx ${APP_PKG_NAME}*.msix)
+
+# There can be only one generated app package
+list(LENGTH ALL_APP_PKG_FILES APP_PKG_COUNT)
+if(NOT APP_PKG_COUNT EQUAL 1)
+  message(FATAL_ERROR "Expected 1 generated app package, but detected 
${APP_PKG_COUNT}: ${ALL_APP_PKG_FILES}")
+endif()
+
+execute_process(COMMAND ${CMAKE_COMMAND} -E tar tf ${ALL_APP_PKG_FILES}
+  OUTPUT_VARIABLE APP_PKG_CONTENT_OUTPUT
+  ERROR_VARIABLE error
+  RESULT_VARIABLE result)
+
+if(NOT result EQUAL 0)
+  message(FATAL_ERROR "Listing app package content failed with: ${error}")
+endif()
+
+foreach(app_pkg_item ${EXPECTED_APP_PKG_CONTENT})
+  string(FIND ${APP_PKG_CONTENT_OUTPUT} ${app_pkg_item} _found)
+  if(_found EQUAL -1)
+    message(FATAL_ERROR "Generated app package is missing an expected item: 
${app_pkg_item}")
+  endif()
+endforeach()

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=acdb326610416ea3a559740fa79ad807a44838ee
commit acdb326610416ea3a559740fa79ad807a44838ee
Author:     Vedran Vujinovic <vedran.vujino...@gmail.com>
AuthorDate: Wed Sep 4 11:11:45 2019 +0200
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Thu Sep 19 11:47:15 2019 -0400

    VS: Do not reference output assemblies of targets with no output
    
    Our logic that sets `ReferenceOutputAssembly` in `ProjectReference` has
    accumulated a series of conditions for different cases in which the
    referenced target has no output.  Simplify the condition to check
    `GetManagedType` directly for cases with no output.
    
    This will explicitly turn off `ReferenceOutputAssembly` in
    `ProjectReference` for utility (i.e. `add_custom_target`) and special
    targets (i.e. `ZERO_CHECK`, etc.), and allowing reference of target
    dependencies that produce some output.
    
    Fixes: #19665

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx 
b/Source/cmVisualStudio10TargetGenerator.cxx
index ba72294..b1acccb 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -4092,32 +4092,8 @@ void 
cmVisualStudio10TargetGenerator::WriteProjectReferences(Elem& e0)
     e2.Element("Name", name);
     this->WriteDotNetReferenceCustomTags(e2, name);
 
-    // If the dependency target is not managed (compiled with /clr or
-    // C# target) and not a WinRT component we cannot reference it and
-    // have to set 'ReferenceOutputAssembly' to false.
-    auto referenceNotManaged =
-      dt->GetManagedType("") < cmGeneratorTarget::ManagedType::Mixed;
-    // Workaround to check for manually set /clr flags.
-    if (referenceNotManaged) {
-      if (const auto* flags = dt->GetProperty("COMPILE_OPTIONS")) {
-        std::string flagsStr = flags;
-        if (flagsStr.find("clr") != std::string::npos) {
-          // There is a warning already issued when building the flags.
-          referenceNotManaged = false;
-        }
-      }
-    }
-    // Workaround for static library C# targets
-    if (referenceNotManaged && dt->GetType() == cmStateEnums::STATIC_LIBRARY) {
-      referenceNotManaged = !dt->IsCSharpOnly();
-    }
-
-    // Referencing WinRT components is okay.
-    if (referenceNotManaged) {
-      referenceNotManaged = !dt->GetPropertyAsBool("VS_WINRT_COMPONENT");
-    }
-
-    if (referenceNotManaged) {
+    // Don't reference targets that don't produce any output.
+    if (dt->GetManagedType("") == cmGeneratorTarget::ManagedType::Undefined) {
       e2.Element("ReferenceOutputAssembly", "false");
       e2.Element("CopyToOutputDirectory", "Never");
     }

-----------------------------------------------------------------------

Summary of changes:
 Source/cmVisualStudio10TargetGenerator.cxx   | 28 ++---------------------
 Tests/CMakeLists.txt                         |  3 +++
 Tests/VSWinStorePhone/CMakeLists.txt         |  3 ++-
 Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt  |  3 +++
 Tests/VSWinStorePhone/CxxDLL/cxxdll.cpp      |  7 ++++++
 Tests/VSWinStorePhone/CxxDLL/cxxdll.h        |  5 ++++
 Tests/VSWinStorePhone/VerifyAppPackage.cmake | 34 ++++++++++++++++++++++++++++
 7 files changed, 56 insertions(+), 27 deletions(-)
 create mode 100644 Tests/VSWinStorePhone/CxxDLL/CMakeLists.txt
 create mode 100644 Tests/VSWinStorePhone/CxxDLL/cxxdll.cpp
 create mode 100644 Tests/VSWinStorePhone/CxxDLL/cxxdll.h
 create mode 100644 Tests/VSWinStorePhone/VerifyAppPackage.cmake


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to