Re: [cmake-developers] Windows 10 Store App - deploy content

2016-02-25 Thread Gilles Khouzam
We have a pull request on our branch that might be helpful by make them 
extensions.

https://github.com/Microsoft/CMake/pull/15


From: Robert Goulet [mailto:robert.gou...@autodesk.com]
Sent: Thursday, February 25, 2016 07:48
To: cmake-developers@cmake.org; Gilles Khouzam 
Subject: Windows 10 Store App - deploy content

Hi everyone,

When creating a Windows 10 Store App using CMake, how do we add DLL files that 
we do not build (provided by external packages) to the list of content files 
for deployment if they get copied to the output directory by the INSTALL step? 
We currently use install commands to copy dependencies to binaries output 
directory, and it looks like this won't work for Windows 10 Store App because 
they need to be part of the content deployment? i.e. 
set_source_files_properties(${FILES} PROPERTIES VS_DEPLOYMENT_CONTENT 1)

Any idea how I can solve that?

Thanks!

-Robert Goulet
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH] Add target property VS_CONFIGURATION_TYPE to Visual Studio 10 target generator

2016-02-25 Thread Brad King
On 02/25/2016 10:36 AM, fabian.o...@rohde-schwarz.com wrote:
> thanks for your feedback. I added a test for the feature.

Thanks.  It looks like your mailer mangled the original patch.
Please re-send both patches as attachments.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] [CMake 0015988]: No parse error message on double 'else' contruction

2016-02-25 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15988 
== 
Reported By:Ruslan Baratov
Assigned To:
== 
Project:CMake
Issue ID:   15988
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-02-25 12:16 EST
Last Modified:  2016-02-25 12:16 EST
== 
Summary:No parse error message on double 'else' contruction
Description: 
This invalid construction doesn't produce any error/warning message:

if(A EQUAL B)
  message("1")
else() # error, should be elseif with some condition
  message("2")
else()
  message("3") # never will be printed
endif()
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-02-25 12:16 Ruslan Baratov New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] Add target property VS_CONFIGURATION_TYPE to Visual Studio 10 target generator

2016-02-25 Thread Fabian . Otto
Hi Brad,

thanks for your feedback. I added a test for the feature.

Best regards,
Fabian


---
 Tests/RunCMake/CMakeLists.txt  |  5 +
 Tests/RunCMake/VS10Project/CMakeLists.txt  |  3 +++
 Tests/RunCMake/VS10Project/RunCMakeTest.cmake  |  2 ++
 .../VS10Project/VsConfigurationType-check.cmake| 24 
++
 .../RunCMake/VS10Project/VsConfigurationType.cmake |  3 +++
 Tests/RunCMake/VS10Project/foo.cpp |  1 +
 6 files changed, 38 insertions(+)
 create mode 100644 Tests/RunCMake/VS10Project/CMakeLists.txt
 create mode 100644 Tests/RunCMake/VS10Project/RunCMakeTest.cmake
 create mode 100644 
Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
 create mode 100644 Tests/RunCMake/VS10Project/VsConfigurationType.cmake
 create mode 100644 Tests/RunCMake/VS10Project/foo.cpp

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 0a388c5..81df69f 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -236,6 +236,11 @@ if("${CMAKE_GENERATOR}" MATCHES "Visual Studio [^6]")
   add_RunCMake_test(SolutionGlobalSections)
 endif()
 
+if(MSVC AND MSVC_VERSION GREATER 1500)
+  # Visual Studio 2010 or newer
+  add_RunCMake_test(VS10Project)
+endif()
+
 if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 3)
   add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION})
 endif()
diff --git a/Tests/RunCMake/VS10Project/CMakeLists.txt 
b/Tests/RunCMake/VS10Project/CMakeLists.txt
new file mode 100644
index 000..91baae7
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/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/VS10Project/RunCMakeTest.cmake 
b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
new file mode 100644
index 000..cc2cc2e
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/RunCMakeTest.cmake
@@ -0,0 +1,2 @@
+include(RunCMake)
+run_cmake(VsConfigurationType)
diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake 
b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
new file mode 100644
index 000..69df345
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsConfigurationType-check.cmake
@@ -0,0 +1,24 @@
+set(vcProjectFile "${RunCMake_TEST_BINARY_DIR}/foo.vcxproj")
+if(NOT EXISTS "${vcProjectFile}")
+  set(RunCMake_TEST_FAILED "Project file ${vcProjectFile} does not 
exist.")
+  return()
+endif()
+
+set(propertyFound FALSE)
+file(STRINGS "${vcProjectFile}" lines)
+foreach(line IN LISTS lines)
+  if(line MATCHES "^ *([^<]*)$")
+set(propertyFound TRUE)
+set(expectedValue "MyValue")
+set(actualValue ${CMAKE_MATCH_1})
+if(NOT (${actualValue} STREQUAL ${expectedValue}))
+  set(RunCMake_TEST_FAILED "ConfigurationType \"${actualValue}\" 
differs from expected value \"${expectedValue}\".")
+  return()
+endif()
+  endif()
+endforeach()
+
+if(NOT propertyFound)
+  set(RunCMake_TEST_FAILED "Property ConfigurationType not found in 
project file.")
+  return()
+endif()
diff --git a/Tests/RunCMake/VS10Project/VsConfigurationType.cmake 
b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake
new file mode 100644
index 000..a73dfe8
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/VsConfigurationType.cmake
@@ -0,0 +1,3 @@
+enable_language(CXX)
+add_library(foo foo.cpp)
+set_target_properties(foo PROPERTIES VS_CONFIGURATION_TYPE "MyValue")
diff --git a/Tests/RunCMake/VS10Project/foo.cpp 
b/Tests/RunCMake/VS10Project/foo.cpp
new file mode 100644
index 000..2fb55ee
--- /dev/null
+++ b/Tests/RunCMake/VS10Project/foo.cpp
@@ -0,0 +1 @@
+void foo() { }
-- 
2.7.1.windows.2




Von:Brad King 
An: fabian.o...@rohde-schwarz.com, 
Kopie:  cmake-developers@cmake.org
Datum:  24.02.2016 17:09
Betreff:Re: [cmake-developers] [PATCH] Add target property 
VS_CONFIGURATION_TYPE to Visual Studio 10 target generator



On 02/22/2016 11:35 AM, fabian.o...@rohde-schwarz.com wrote:
> The patch adds the target property VS_CONFIGURATION_TYPE. It allows to
> set an arbitrary value to the "ConfigurationType" property
> 
> This is useful if you want to build a Windows Kernel Mode Driver.

This looks okay to me.  Please extend the test suite to cover this
feature.  So far all VS features that we test have effects on the
generation that we can test explicitly.  In this case it looks like
we might not be able to test actually building such a project.  For
that, take a look at these test directories:

 Tests/RunCMake/SolutionGlobalSections
 Tests/RunCMake/XcodeProject

It tests running CMake and then parses the actual project file content
to check that it is as expected.  A similar test could be added for
VS .vcxproj content testing and used to cover this feature.

Thanks,
-Brad

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers 

[cmake-developers] [CMake 0015987]: STATUS variable to FILE(DOWNLOAD) does not consider HASH mismatch failures

2016-02-25 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15987 
== 
Reported By:Tobias Hieta
Assigned To:
== 
Project:CMake
Issue ID:   15987
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-02-25 09:06 EST
Last Modified:  2016-02-25 09:06 EST
== 
Summary:STATUS variable to FILE(DOWNLOAD) does not consider
HASH mismatch failures
Description: 
This threw me for a bit of a loop when working with our cmake lists that
download dependencies. It seems like the STATUS variable to file(download) only
records errors if they happen when downloading the file. If the has mismatches
the STATUS variable will still be set to 0 and "No error" as the error string.
The only thing that does happen is that it prints a error message.

This makes it very hard to handle errors where the HASH is not correct since you
can't use the status variable to abort the the processing like:

file(DOWNLOAD  STATUS DL_STATUS)
if(NOT DL_STATUS EQUAL 0)
  message(FATAL_ERROR "Failed")
endif()

I would expect the STATUS variable to be set to "1;HASH MISMATCH" or something
when the has mismatches.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-02-25 09:06 Tobias Hieta   New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [cmake-developers] C# support ready for review

2016-02-25 Thread Stuermer, Michael SP/HZA-ZSEP
Hi Gilles,

good to hear C# support is working not only for me and some people are actually 
interested in it :-).

Thanks for the patch, I already added to my github. All the changes make 
perfectly sense for me.

Let me explain a bit more about things like hardcoding LangVersion in the 
module scripts etc. (in short, there is no reason for hardcoding langversion 3):

The current C# support was developed by plain trial-and-error. I started out 
copying the CXX compiler module scripts, finding out the relevant/necessary 
variables, trying to find reasonable values etc. By starting with a copy of the 
CXX scripts I am quite sure there are some leftovers that do not make sense 
there. To adapt everything for C# I started by looking at a existing .csproj 
file and changing the target generator until everything went as expected. 
Initial values like the flags in CMakeCSharpInformation.cmake where copied as 
is from my first simple reference .csproj files. Also the special handling of 
.xaml, .xaml.cs and .Designer.cs files with the  tags was just 
introduced when I realized I need it somewhere in our new project.

Putting it all together I just want to say that the current state of 
development leaves room for a lot of improvement and if something seems like it 
could be done better, this is most probably the case. I really only pushed it 
to a level where I feel it's working well enough for me and I can focus on my 
actual job.

The part that probably needs most additional work is all the C# detection and 
configuration part in the module scripts. I got it all up and running so we can 
develop our C/C++/C# cross-platform software here, but it's still some steps 
away from a perfectly configurable solution where everyone could be happy.

best regards,
Michael


From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com] 
Sent: Thursday, February 25, 2016 8:44 AM
To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
Subject: RE: C# support ready for review

Hi Michael,

Things are looking really good, I've just converted one of my personal projects 
to using CMake in very little time.

I've included a small patch for your CSharp implementation.

The first change is to add support to specify C# 6.0 in the flag table.
The second removes the exception handling tag and the precompiled header tags 
since they don't make sense for C#, as well as adding a space between the 
platform comparisons. The space is not necessary for the project, but is you 
make any change in the property page inside of VS, a new property group is 
created instead of modifying the existing one. While this would not be a 
typical CMake scenario, it might be better to stay consistent with how VS and 
MSBuild process the file.

The next thing that I want to start looking at, is to make this work for 
Windows Phone and Windows Store apps, so that it can match the support that we 
have with C++ in this regards.

From: Gilles Khouzam 
Sent: Wednesday, February 24, 2016 14:47
To: 'Stuermer, Michael SP/HZA-ZSEP' ; CMake 
Developers 
Subject: RE: C# support ready for review

Hi Michael,

I've had more time to try this, what is the reasoning to hardcode the default 
LangVersion to 3 in Modules\CMakeCSharpInformation.cmake? Can we remove it? I'm 
trying this on some projects of mine.

From: Stuermer, Michael SP/HZA-ZSEP [mailto:michael.stuer...@schaeffler.com] 
Sent: Thursday, February 18, 2016 03:44
To: Gilles Khouzam ; CMake Developers 

Subject: RE: C# support ready for review

Hi Gilles,

you are right about the specific user path. I already fixed this in my github 
"csharp" branch. Sorry for the inconvenience.

As for the discrepancies: I just found out that my TortoiseGitMerge tool was 
not configured correctly: changes in comments where ignored (which is not what 
I wanted). I'll go over the patch again and remove the changes that are 
irrelevant to the C# features.

Thanks for the hint on using MSBuild detection. I currently use the msbuild 
version that is provided automatically by visual studio, so I do not need any 
real detection. I didn't dig too deep into MSBuild versions, .NET framework 
versions, what can be configured etc. The configuration possibilities and what 
would make sense especially for other developers as well is something that 
should be discussed.

My main aim was to be able to work with C# and .NET in a similar way as Visual 
Studio provides it. I only started C# development during the last year, so many 
things concerning configuration etc. could probably be improved.

I'll post a new version of the patch later (or tomorrow) with the mentioned 
changes.

best regards,
Michael


From: Gilles Khouzam [mailto:gilles.khou...@microsoft.com] 
Sent: Thursday, February 18, 2016 8:17 AM
To: Stuermer, Michael SP/HZA-ZSEP; CMake Developers
Subject: RE: C# support ready for review

Hi Michael,

Great work, this looks