diff options
author | Wil Stark <wil_stark@keysight.com> | 2018-11-28 17:51:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-10 18:06:25 (GMT) |
commit | 5e4887e67305c2973155dc763701f7d22c08ff55 (patch) | |
tree | 8a5c6ffcbc51e543014fa3fb48fe6097d38fd8ea /Tests/RunCMake/VS10ProjectWinCE | |
parent | a4332cac4bd178fd1b771154413565ae0b0ce61f (diff) | |
download | CMake-5e4887e67305c2973155dc763701f7d22c08ff55.zip CMake-5e4887e67305c2973155dc763701f7d22c08ff55.tar.gz CMake-5e4887e67305c2973155dc763701f7d22c08ff55.tar.bz2 |
VS: Honor WinCE deployment properties in VS 2010+
Previously only VS 2008 was supported.
Diffstat (limited to 'Tests/RunCMake/VS10ProjectWinCE')
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake | 8 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake | 34 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake | 13 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/foo.cpp | 3 | ||||
-rw-r--r-- | Tests/RunCMake/VS10ProjectWinCE/foo.cs | 3 |
6 files changed, 64 insertions, 0 deletions
diff --git a/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt b/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt new file mode 100644 index 0000000..91baae7 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.5.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake new file mode 100644 index 0000000..b35ee90 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +set(RunCMake_GENERATOR "Visual Studio 12 2013") +set(RunCMake_GENERATOR_TOOLSET CE800) +set(RunCMake_GENERATOR_INSTANCE "") +set(RunCMake_TEST_OPTIONS -DCMAKE_SYSTEM_NAME=WindowsCE ) + +run_cmake(VsCEDebuggerDeploy) diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake new file mode 100644 index 0000000..c66676f --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy-check.cmake @@ -0,0 +1,34 @@ +set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj") +if(NOT EXISTS "${vcProjectFile}") + set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not exist.") + return() +endif() + + +if( NOT ${CMAKE_SYSTEM_NAME} STREQUAL "WindowsCE" ) + set(RunCMake_TEST_FAILED "Test only valid for WindowsCE") + return() +endif() + + +set(FoundCEAdditionalFiles FALSE) +set(FoundRemoteDirectory FALSE) + +file(STRINGS "${vcProjectFile}" lines) +foreach(line IN LISTS lines) + if(line MATCHES "^ *<CEAdditionalFiles> *foo\\.dll\\|\\\\foo\\\\src\\\\dir\\\\on\\\\host\\|\\$\\(RemoteDirectory\\)\\|0;bar\\.dll\\|\\\\bar\\\\src\\\\dir\\|\\$\\(RemoteDirectory\\)bardir\\|0.*</CEAdditionalFiles> *$") + set(FoundCEAdditionalFiles TRUE) + elseif(line MATCHES " *<RemoteDirectory>[A-Za-z0-9\\]+</RemoteDirectory> *$") + set(FoundRemoteDirectory TRUE) + endif() +endforeach() + +if(NOT FoundCEAdditionalFiles) + set(RunCMake_TEST_FAILED "CEAddionalFiles not found or not set correctly.") + return() +endif() + +if(NOT FoundRemoteDirectory) + set(RunCMake_TEST_FAILED "RemoteDirectory not found or not set correctly.") + return() +endif() diff --git a/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake new file mode 100644 index 0000000..948f14c --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/VsCEDebuggerDeploy.cmake @@ -0,0 +1,13 @@ +enable_language(CXX) + +set(DEPLOY_DIR + "temp\\foodir" +) + +add_library(foo foo.cpp) + +set_target_properties(foo + PROPERTIES + DEPLOYMENT_ADDITIONAL_FILES "foo.dll|\\foo\\src\\dir\\on\\host|$(RemoteDirectory)|0;bar.dll|\\bar\\src\\dir|$(RemoteDirectory)bardir|0" + DEPLOYMENT_REMOTE_DIRECTORY ${DEPLOY_DIR} +) diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cpp b/Tests/RunCMake/VS10ProjectWinCE/foo.cpp new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/foo.cpp @@ -0,0 +1,3 @@ +void foo() +{ +} diff --git a/Tests/RunCMake/VS10ProjectWinCE/foo.cs b/Tests/RunCMake/VS10ProjectWinCE/foo.cs new file mode 100644 index 0000000..3695dc9 --- /dev/null +++ b/Tests/RunCMake/VS10ProjectWinCE/foo.cs @@ -0,0 +1,3 @@ +void foo() +{ +} |