Re: [CMake] CMake doesn't detect Microsoft Build Tools 2015 on Windows 10

2016-10-10 Thread Gilles Khouzam via CMake
Please open a bug, I can take a look at it.

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Eduard Wirch
Sent: Monday, October 10, 2016 02:41
To: cmake@cmake.org
Subject: [CMake] CMake doesn't detect Microsoft Build Tools 2015 on Windows 10

Hi

I've installed build tools from here: 
http://landinghub.visualstudio.com/visual-cpp-build-tools
But CMake will automatically detect (and choose) Visual Studio 8 (installed 
here as well) instead.

Looking into the source:

const std::string vsregBase =
  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\";
std::vector vsVerions;
vsVerions.push_back("VisualStudio\\");
vsVerions.push_back("VCExpress\\");
vsVerions.push_back("WDExpress\\");
struct VSRegistryEntryName
{
  const char* MSVersion;
  const char* GeneratorName;
};
VSRegistryEntryName version[] = {
  /* clang-format needs this comment to break after the opening brace */
  { "7.1", "Visual Studio 7 .NET 2003" },
  { "8.0", "Visual Studio 8 2005" },
  { "9.0", "Visual Studio 9 2008" },
  { "10.0", "Visual Studio 10 2010" },
  { "11.0", "Visual Studio 11 2012" },
  { "12.0", "Visual Studio 12 2013" },
  { "14.0", "Visual Studio 14 2015" },
  { "15.0", "Visual Studio 15" },
  { 0, 0 }
};
for (int i = 0; version[i].MSVersion != 0; i++) {
  for (size_t b = 0; b < vsVerions.size(); b++) {
std::string reg = vsregBase + vsVerions[b] + version[i].MSVersion;
reg += ";InstallDir]";
cmSystemTools::ExpandRegistryValues(reg, cmSystemTools::KeyWOW64_32);
if (!(reg == "/registry")) {
  installedCompiler = version[i].GeneratorName;
  break;
}
  }
}

CMake will look for 
'HKLM\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\InstallDir'. This key is 
not present indeed. When specified explicitly:
cmake . -G "Visual Studio 14 2015"
CMake will correctly detect the compiler and build without problems.

These keys might be helpful when looking for Build Tools:


[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\Setup\VC]
"ProductDir"="C:\\Program Files (x86)\\Microsoft Visual 
Studio 14.0\\VC\\"


[HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0\Setup\SSDT]
"InstallDir"="C:\\Program Files (x86)\\Microsoft Visual 
Studio 14.0\\"
"VersionNumber"="14.0.50616.0"

Am I missing something or is this a bug which should be reported to issue 
tracker?

Cheers,
Eduard
-- 

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

Re: [cmake-developers] Problems with icons for Windows Store 10.0

2016-10-06 Thread Gilles Khouzam via cmake-developers
Hi Roman,

Glad to hear that it works.

We discussed this when I implemented the feature, the only reason the 
functionality has been implemented is to supplement the intermediate projects 
that CMake produces that cannot easily be adapted for the requirements of a 
Windows Store application.

For a user's project, the AppXManifest is a critical piece that describes the 
application. There are some fields that need to be appropriately set (publisher 
Id, application name and version), even the icons need to be properly specified 
unless you use the exact same name for the files and don't look at having 
different tile sizes.

For prototyping this might seem like an unnecessary step, but once you start 
customizing the parts of the application, it seems counter intuitive to have 
customizations only apply under certain conditions. Perhaps a better solution 
would be to give an error message if any of the defaults are replaced but a 
manifest is not specified.

-Original Message-
From: Roman Wüger [mailto:roman.wue...@gmx.at] 
Sent: Wednesday, October 5, 2016 22:39
To: Gilles Khouzam 
Cc: Brad King ; CMake Developer MailingList 
; CMake MailingList 
Subject: Re: [cmake-developers] Problems with icons for Windows Store 10.0

Thanks Gilles,

I added a custom appxmanifest as you mentioned and it works, but it would 
nevertheless very helpful to customize such things via variables and let CMake 
fill out the rest.

Regards
Roman

> Am 05.10.2016 um 21:19 schrieb Gilles Khouzam :
> 
> That's most likely because you're missing an AppxManifest.
> 
> In order to build the CMake detection projects, we inject some necessary 
> files into the project when they aren't specified. This includes the manifest 
> and the icons. Can you add your app manifest to the project (look at 
> Tests\VSWinStorePhone if you want an example) and the icons should not be 
> overridden then.
> 
> Thanks
> 
> -Original Message-
> From: Brad King [mailto:brad.k...@kitware.com]
> Sent: Wednesday, October 5, 2016 12:09
> To: Roman Wüger ; Gilles Khouzam 
> 
> Cc: CMake Developer MailingList ; CMake 
> MailingList 
> Subject: Re: [cmake-developers] Problems with icons for Windows Store 
> 10.0
> 
>> On 10/05/2016 02:56 PM, Roman Wüger wrote:
>> I tried the following to copy the required app icons to the required 
>> destination:
>> 
>> configure_file(Logo.png
>> ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.dir/Logo.png COPYONLY)
> 
> That's a CMake-private directory whose location is an implementation detail.
> Some other interface for configuring this behavior will be needed.
> 
>> The CMake process itself overrides those files at the end with the 
>> files from the CMake's Template directory, which are empty.
> 
> From the current implementation it doesn't look like there is anyway to 
> prevent that.  We'll need to have some configuration of where it gets those 
> files.
> 
>> So, how could I use my icon files and/or what is the preferred way of doing 
>> this?
> 
> Gilles?
> 
> -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

Re: [CMake] [cmake-developers] Problems with icons for Windows Store 10.0

2016-10-06 Thread Gilles Khouzam via CMake
Hi Roman,

Glad to hear that it works.

We discussed this when I implemented the feature, the only reason the 
functionality has been implemented is to supplement the intermediate projects 
that CMake produces that cannot easily be adapted for the requirements of a 
Windows Store application.

For a user's project, the AppXManifest is a critical piece that describes the 
application. There are some fields that need to be appropriately set (publisher 
Id, application name and version), even the icons need to be properly specified 
unless you use the exact same name for the files and don't look at having 
different tile sizes.

For prototyping this might seem like an unnecessary step, but once you start 
customizing the parts of the application, it seems counter intuitive to have 
customizations only apply under certain conditions. Perhaps a better solution 
would be to give an error message if any of the defaults are replaced but a 
manifest is not specified.

-Original Message-
From: Roman Wüger [mailto:roman.wue...@gmx.at] 
Sent: Wednesday, October 5, 2016 22:39
To: Gilles Khouzam 
Cc: Brad King ; CMake Developer MailingList 
; CMake MailingList 
Subject: Re: [cmake-developers] Problems with icons for Windows Store 10.0

Thanks Gilles,

I added a custom appxmanifest as you mentioned and it works, but it would 
nevertheless very helpful to customize such things via variables and let CMake 
fill out the rest.

Regards
Roman

> Am 05.10.2016 um 21:19 schrieb Gilles Khouzam :
> 
> That's most likely because you're missing an AppxManifest.
> 
> In order to build the CMake detection projects, we inject some necessary 
> files into the project when they aren't specified. This includes the manifest 
> and the icons. Can you add your app manifest to the project (look at 
> Tests\VSWinStorePhone if you want an example) and the icons should not be 
> overridden then.
> 
> Thanks
> 
> -Original Message-
> From: Brad King [mailto:brad.k...@kitware.com]
> Sent: Wednesday, October 5, 2016 12:09
> To: Roman Wüger ; Gilles Khouzam 
> 
> Cc: CMake Developer MailingList ; CMake 
> MailingList 
> Subject: Re: [cmake-developers] Problems with icons for Windows Store 
> 10.0
> 
>> On 10/05/2016 02:56 PM, Roman Wüger wrote:
>> I tried the following to copy the required app icons to the required 
>> destination:
>> 
>> configure_file(Logo.png
>> ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.dir/Logo.png COPYONLY)
> 
> That's a CMake-private directory whose location is an implementation detail.
> Some other interface for configuring this behavior will be needed.
> 
>> The CMake process itself overrides those files at the end with the 
>> files from the CMake's Template directory, which are empty.
> 
> From the current implementation it doesn't look like there is anyway to 
> prevent that.  We'll need to have some configuration of where it gets those 
> files.
> 
>> So, how could I use my icon files and/or what is the preferred way of doing 
>> this?
> 
> Gilles?
> 
> -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

Re: [CMake] [cmake-developers] Problems with icons for Windows Store 10.0

2016-10-05 Thread Gilles Khouzam via CMake
That's most likely because you're missing an AppxManifest.

In order to build the CMake detection projects, we inject some necessary files 
into the project when they aren't specified. This includes the manifest and the 
icons. Can you add your app manifest to the project (look at 
Tests\VSWinStorePhone if you want an example) and the icons should not be 
overridden then.

Thanks

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Wednesday, October 5, 2016 12:09
To: Roman Wüger ; Gilles Khouzam 

Cc: CMake Developer MailingList ; CMake MailingList 

Subject: Re: [cmake-developers] Problems with icons for Windows Store 10.0

On 10/05/2016 02:56 PM, Roman Wüger wrote:
> I tried the following to copy the required app icons to the required 
> destination:
> 
> configure_file(Logo.png 
> ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.dir/Logo.png COPYONLY)

That's a CMake-private directory whose location is an implementation detail.
Some other interface for configuring this behavior will be needed.

> The CMake process itself overrides those files at the end with the 
> files from the CMake's Template directory, which are empty.

>From the current implementation it doesn't look like there is anyway to 
>prevent that.  We'll need to have some configuration of where it gets those 
>files.

> So, how could I use my icon files and/or what is the preferred way of doing 
> this?

Gilles?

-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


Re: [CMake] Visual Studios platform choice

2016-09-08 Thread Gilles Khouzam via CMake
When Visual Studio creates a project, by default it will create it for multiple 
architectures. When running through CMake, only 1 platform is generated. 
Therefore Visual Studio shows the platform options but only the available 
platforms are shown. We wrote a prototype to support creating multiple 
platforms for Windows Store apps in CMake a while back that’s available on 
https://github.com/Microsoft/CMake/tree/feature/MSMultiPlatform but hasn’t been 
updated in some time. There are issues with it as some things don’t port well 
when switching architectures.

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Dvir Yitzchaki
Sent: Thursday, September 8, 2016 01:21
To: 'Jack Stalnaker' ; cmake@cmake.org
Subject: Re: [CMake] Visual Studios platform choice

We’re generating both 32 bit and 64 bit solutions and the drop down only shows 
one architecture on each solution.
Checked on VS 2013 and 2015.

Regards,

Dvir Yitzchaki
Debugger Software Engineer, SDT
[cid:image001.png@01D209C3.2089CC20][cid:image002.png@01D209C3.2089CC20]
 [https://g.twimg.com/twitter-bird-16x16.png]   
[http://img2.wikia.nocookie.net/__cb20100109182754/half-life/en/images/e/ec/YouTube_favicon.png]
   
[http://developer.linkedin.com/sites/default/files/LinkedIn_Logo16px.png] 


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Jack Stalnaker
Sent: Wednesday, September 07, 2016 7:31 PM
To: cmake@cmake.org
Subject: [CMake] Visual Studios platform choice

Hi,

I understand from reading this newgroup (e.g. 
https://cmake.org/pipermail/cmake/2013-March/053775.html) that the only way to 
support multiple platforms in Visual Studio is to run CMake multiple times, 
once for each platform.

I'm porting some linux based code to the Windows world, and the Windows dev 
showed me that in Visual Studio, platform choice is a pulldown menu at the top 
of the screen. This pulldown appears even if we run CMake without specifying a 
64 bit platform. This is a bit confusing, because we've only generated a 
solution and project file for 32 bit. So what happens when someone selects 64 
bit on the pulldown menu? What's being built?

Thanks
-- 

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

Re: [CMake] Windows path too long

2016-09-08 Thread Gilles Khouzam via CMake
It’s a little more complicated than just saying Windows 10 and turning on a 
regkey. There are other changes that need to be enabled in order to get the 
whole scenario working. The main one being that MSBuild needs to be updated and 
manifested to be able to use paths longer than 260 characters. Even if the 
files were created properly, they couldn’t be read or written without the tool 
that was using them being updated.

Many pieces of the system have assumptions on the 260 character limit and they 
all need to be moved forward for this to work properly. This will be a staged 
migration.

Thanks

From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of mike lojkovic
Sent: Thursday, September 8, 2016 06:58
To: Cmake@cmake.org
Subject: Re: [CMake] Windows path too long


Can you change to windows 10? If you are on 10, you can turn the restriction 
off. Otherwise, I believe there's complicated ways to shorten the path.

http://m.slashdot.org/story/311861

On Sep 7, 2016 8:07 AM, "David Cole via CMake" 
> wrote:
I suppose the obvious "use shorter paths and names" is not possible or hard to 
enforce?


David


> On Sep 7, 2016, at 2:55 AM, Robert Bielik 
> > wrote:
>
> I have a problem with a VS 2015 project, where the build state path becomes 
> too long:
>
> SeverityCodeDescriptionProjectFileLineSuppression 
> State
> ErrorMSB3491Could not write lines to file 
> "processor_withAVeryVeryLongName.dir\Release\processo.92BD73FC.tlog\processor_withAVeryVeryLongName.lastbuildstate".
>  The specified path, file name, or both are too long. The fully qualified 
> file name must be less than 260 characters, and the directory name must be 
> less than 248 characters.processor_withAVeryVeryLongNameC:\Program 
> Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppBuild.targets312
>
> The line in Microsoft.CppBuild.targets is:
>
>  Lines="$(ProjectStateLine);$(ProjectEvaluationFingerprint)"/>
>
> I've set CMAKE_OBJECT_PATH_MAX to 240, but I don't think it will affect 
> this...
>
> Ideas ?
>
> This is with CMake 3.5.2.
>
> Regards
> /Robert
>
> --
>
> 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

--

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
-- 

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

Re: [CMake] Bash on ubuntu on windows as target

2016-08-22 Thread Gilles Khouzam via CMake
I’ve looked more in depth at the issue, and while this doesn’t work yet, we’re 
looking to enable this in a future Windows Insider Flight for better 
windows/linux interop.

From: Gilles Khouzam
Sent: Monday, August 15, 2016 13:24
To: 'Tiago Macarios' ; csiga.b...@aol.com
Cc: CMake ML 
Subject: RE: [CMake] Bash on ubuntu on windows as target

That’s an interesting idea,

I’m not sure why cmd is failing to invoke bash properly, but I will try and 
figure it out.

Also, for addressing invoking bash.exe without copying it to SysWow64, you can 
reference it by C:\Windows\Sysnative\bash.exe from a 32-bit process. It still 
doesn’t make the target succeed, but at least it removes the need to copy the 
file around.

Thanks
~Gilles


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Tiago Macarios
Sent: Thursday, August 11, 2016 10:12
To: csiga.b...@aol.com
Cc: CMake ML >
Subject: Re: [CMake] Bash on ubuntu on windows as target

Well what I was trying to do was to actually have a target inside the windows 
build that would trigger the linux build so to build both at the same time. 
imagine you have a VS project one of the "projects" would be the linux build. 
So as long as the build folder is different I could have both building in sync 
everytime. Get the idea?

If I just do a full build inside bash everything works great =)

On Wed, Aug 10, 2016 at 11:23 PM, <"Máté Ferenc Nagy-Egri via CMake 
>
 wrote:
+1 for the initiative. Wouldn’t it make more sense however to make it a 
CMAKE_SYSTEM_NAME? If I remember correctly that’s how MinGW works, and this 
should be something very similar.


Feladó: Tiago Macarios
Elküldve: 2016. augusztus 11., csütörtök 1:51
Címzett: CMake ML
Tárgy: [CMake] Bash on ubuntu on windows as target

Hi All,

Windows 10 anniversary edition comes with support to execute Linux binaries. I 
have been trying to use it with one of our projects, but I have been getting a 
weird error. Maybe someone can help me?

The target is pretty simple:

set(BASH "C:\\Windows\\System32\\bash.exe")
set(ARGS "--help")
add_custom_target(linux ${BASH} ${ARGS})

If I then build that project in visual studio (with some extra verbosity) I get:

Target "CustomBuild" in file "C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets" from project 
"C:\_Working\delegate\build\linux.vcxproj" (target 
"_BuildGenerateSourcesAction" depends on it):
Using "CustomBuild" task from assembly "C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build.CppTasks.Common.dll".
Task "CustomBuild"
  Write Tracking Logs:
   x64\Debug\linux\linux.tlog\custombuild.write.1.tlog
  Read Tracking Logs:
   x64\Debug\linux\linux.tlog\custombuild.read.1.tlog
  No output for 
C:\_WORKING\DELEGATE\BUILD\CMAKEFILES\3FA5525E877A7559336C7D412E1B43B0\LINUX.RULE|C:\_WORKING\DELEGATE\CMAKELISTS.TXT
 was found in the tracking log; source compilation required.
  C:\_Working\delegate\CMakeLists.txt will be compiled as it was not found in 
the tracking log.
  
C:\_Working\delegate\build\CMakeFiles\3fa5525e877a7559336c7d412e1b43b0\linux.rule
 will be compiled as it was not found in the tracking log.
  setlocal
  "C:\Program Files (x86)\CMake\bin\cmake.exe" -HC:/_Working/delegate 
-BC:/_Working/delegate/build --check-stamp-file 
C:\_Working\delegate\build\CMakeFiles\generate.stamp
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  setlocal
  C:\Windows\System32\bash.exe --help
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  Building Custom Rule C:/_Working/delegate/CMakeLists.txt
  CMake does not need to re-run because 
C:\_Working\delegate\build\CMakeFiles\generate.stamp is up-to-date.
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error 
MSB6006: "cmd.exe" exited with code -1073740791.
Done executing task "CustomBuild" -- FAILED.
Done building target "CustomBuild" in project "linux.vcxproj" -- FAILED.


The command line seems correct. If I just copy it to the windows prompt it 
works fine:

C:\Users\tmc>  C:\Windows\System32\bash.exe --help
GNU bash, version 4.3.11(1)-release-(x86_64-pc-linux-gnu)
Usage:  /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc

Re: [CMake] Bash on ubuntu on windows as target

2016-08-15 Thread Gilles Khouzam via CMake
That’s an interesting idea,

I’m not sure why cmd is failing to invoke bash properly, but I will try and 
figure it out.

Also, for addressing invoking bash.exe without copying it to SysWow64, you can 
reference it by C:\Windows\Sysnative\bash.exe from a 32-bit process. It still 
doesn’t make the target succeed, but at least it removes the need to copy the 
file around.

Thanks
~Gilles


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Tiago Macarios
Sent: Thursday, August 11, 2016 10:12
To: csiga.b...@aol.com
Cc: CMake ML 
Subject: Re: [CMake] Bash on ubuntu on windows as target

Well what I was trying to do was to actually have a target inside the windows 
build that would trigger the linux build so to build both at the same time. 
imagine you have a VS project one of the "projects" would be the linux build. 
So as long as the build folder is different I could have both building in sync 
everytime. Get the idea?

If I just do a full build inside bash everything works great =)

On Wed, Aug 10, 2016 at 11:23 PM, <"Máté Ferenc Nagy-Egri via CMake 
>
 wrote:
+1 for the initiative. Wouldn’t it make more sense however to make it a 
CMAKE_SYSTEM_NAME? If I remember correctly that’s how MinGW works, and this 
should be something very similar.


Feladó: Tiago Macarios
Elküldve: 2016. augusztus 11., csütörtök 1:51
Címzett: CMake ML
Tárgy: [CMake] Bash on ubuntu on windows as target

Hi All,

Windows 10 anniversary edition comes with support to execute Linux binaries. I 
have been trying to use it with one of our projects, but I have been getting a 
weird error. Maybe someone can help me?

The target is pretty simple:

set(BASH "C:\\Windows\\System32\\bash.exe")
set(ARGS "--help")
add_custom_target(linux ${BASH} ${ARGS})

If I then build that project in visual studio (with some extra verbosity) I get:

Target "CustomBuild" in file "C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets" from project 
"C:\_Working\delegate\build\linux.vcxproj" (target 
"_BuildGenerateSourcesAction" depends on it):
Using "CustomBuild" task from assembly "C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Build.CppTasks.Common.dll".
Task "CustomBuild"
  Write Tracking Logs:
   x64\Debug\linux\linux.tlog\custombuild.write.1.tlog
  Read Tracking Logs:
   x64\Debug\linux\linux.tlog\custombuild.read.1.tlog
  No output for 
C:\_WORKING\DELEGATE\BUILD\CMAKEFILES\3FA5525E877A7559336C7D412E1B43B0\LINUX.RULE|C:\_WORKING\DELEGATE\CMAKELISTS.TXT
 was found in the tracking log; source compilation required.
  C:\_Working\delegate\CMakeLists.txt will be compiled as it was not found in 
the tracking log.
  
C:\_Working\delegate\build\CMakeFiles\3fa5525e877a7559336c7d412e1b43b0\linux.rule
 will be compiled as it was not found in the tracking log.
  setlocal
  "C:\Program Files (x86)\CMake\bin\cmake.exe" -HC:/_Working/delegate 
-BC:/_Working/delegate/build --check-stamp-file 
C:\_Working\delegate\build\CMakeFiles\generate.stamp
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  setlocal
  C:\Windows\System32\bash.exe --help
  if %errorlevel% neq 0 goto :cmEnd
  :cmEnd
  endlocal & call :cmErrorLevel %errorlevel% & goto :cmDone
  :cmErrorLevel
  exit /b %1
  :cmDone
  if %errorlevel% neq 0 goto :VCEnd
  Building Custom Rule C:/_Working/delegate/CMakeLists.txt
  CMake does not need to re-run because 
C:\_Working\delegate\build\CMakeFiles\generate.stamp is up-to-date.
C:\Program Files 
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error 
MSB6006: "cmd.exe" exited with code -1073740791.
Done executing task "CustomBuild" -- FAILED.
Done building target "CustomBuild" in project "linux.vcxproj" -- FAILED.


The command line seems correct. If I just copy it to the windows prompt it 
works fine:

C:\Users\tmc>  C:\Windows\System32\bash.exe --help
GNU bash, version 4.3.11(1)-release-(x86_64-pc-linux-gnu)
Usage:  /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--rcfile
--restricted
--verbose
--version
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
Type `/bin/bash -c "help set"' for more information about shell options.
Type `/bin/bash -c help' for more information about shell builtin commands.
Use the `bashbug' command to report bugs.


I also tried to use it 

Re: [CMake] [Visual Studio] Universal Windows Platform projects

2016-08-15 Thread Gilles Khouzam via CMake
Hi Adam, Nagy-Egri

I’ve written most of the code to support Windows Universal Apps and would be 
happy to help you get this working. We have some very prominent customers who 
are using this functionality to publish their apps and games to the Windows 
Store. The support is not a pilot project and we try to address the issues that 
people are facing when something is not fully supported.

The first example to look at would be in Tests\VSWinStorePhone, this is the 
validation project that builds a Windows project that can be targeted to the 
Windows Store. It has examples of content files, shaders, manifest, resources, 
tool overrides.

If you have questions, I’m here to help.

Thanks

Gilles Khouzam
Engineering Lead
Microsoft Windows
gilles.khou...@microsoft.com


From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Nagy-Egri Máté Ferenc 
via CMake
Sent: Tuesday, August 2, 2016 01:17
To: cmake@cmake.org
Subject: Re: [CMake] [Visual Studio] Universal Windows Platform projects

I would also very much like to see a tutorial on this. There are just too darn 
many options to set for me to believe CMake could ever get the job done. 
Release notes for Publishing to the store, age rating for my app, can it 
correctly set source types to be DX resources, DX shaders, etc… there are too 
many things I have not even heard about relating to CMake.

I have a feeling that the WindowsStore CMAKE_SYSTEM_NAME started out as a pilot 
project but then did not wish to keep up with the evolution of the Microsoft 
ecosystem. It’s a shame really, because I really did want to prove to collegues 
of mine, that the MVVM model employed by the canonical design pattern of 
Windows Store apps has a 1-to-1 mapping in the Qt ecosystem.

XAML >> QML
events-delegates >> signal-slot

The best choice of a build generator would be CMake. However, not having met 
all the neccessary components, VS project files with the Qt Add-In currently 
seem to be a better choice.

The foundations are very-very similar and I wanted to build a simple 
application that relies on Qt for the Linux build and pure WinRT for the 
Windows build. Also, I would also be very much interested in additions to CMake 
where CTest could take care of Pester tests for PowerShell scripts and as such 
is able to test PS scripts I wrote which load C++/CX Assemblies. (For those who 
do not know of C++/CX, it is managed C++, a language extension that can act as 
a mediator between native C++ and all the .NET family of languages. One may 
wrap FFTW with managed C++ and load the compiled library (referred to as 
Assemblies) from C#, F# or PowerShell even and consume it. The ABI of the .NET 
languages are stable and interoperable.)


If someone has a working prototype of CMake compiling a simple UWP Store app 
that could actually be published… do not hesitate to share!



Feladó: Adam Rankin
Elküldve: 2016. július 6., szerda 16:42
Címzett: cmake@cmake.org
Tárgy: [CMake] [Visual Studio] Universal Windows Platform projects

Hello all,

I’ve been trying to identify the correct variables to set to create a UWP 
project using VS2015, and the projects generated are missing a few critical 
tags.

I’m using CMAKE_SYSTEM_NAME=WindowsStore and CMAKE_SYSTEM_VERSION=10.0. This 
correctly identifies and sets the target platform tag, but does not set the 
following ‘Globals’ Properties in the PropertyGroup of the .vcxproj file

true
Windows Store
10.0.10240.0
10.0

Has anyone successfully created a UWP project using CMake?

Regards,
Adam

-- 

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

Re: [cmake-developers] Patch: Add the ability to specify SDK_REFERENCES for Visual Studio

2016-06-21 Thread Gilles Khouzam via cmake-developers
I've changed it to the Debug Universal C-Runtime which should be included with 
the SDK.

This also leverages the version of the SDK to match the other extensions 
reducing the risk of failures.

-Original Message-
From: Brad King [mailto:brad.k...@kitware.com] 
Sent: Tuesday, June 21, 2016 07:32
To: Gilles Khouzam 
Cc: cmake-developers@cmake.org
Subject: Re: Patch: Add the ability to specify SDK_REFERENCES for Visual Studio

On 06/20/2016 10:48 AM, Brad King wrote:
>  VS: Add VS_SDK_REFERENCES target property to reference external SDKs  
> https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccc6270d

This caused the VSWinStorePhone tests to fail, e.g.:

 https://open.cdash.org/testDetails.php?test=457508384=4422066
 (ResolveSDKReferences target) ->
  C:\Program Files 
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2049,5): error 
MSB3774: Could not find SDK "Microsoft.NET.Native.Runtime.1.1, Version=1.1".

The problem is that the hard-coded VS_SDK_REFERENCES value in the test names a 
SDK that does not exist on the test machine.  Some other approach will be 
needed to know what SDK can be referenced by the test.

Thanks,
-Brad



0001-FixVS_SDK_REFERENCES.PATCH
Description: 0001-FixVS_SDK_REFERENCES.PATCH
-- 

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 the ability to specify SDK_REFERENCES for Visual Studio

2016-06-21 Thread Gilles Khouzam via cmake-developers
I'll take a look to find an sdk that is included.



Sent from my Windows 10 phone



From: Brad King
Sent: Tuesday, June 21, 2016 7:31
To: Gilles Khouzam
Cc: cmake-developers@cmake.org
Subject: Re: Patch: Add the ability to specify SDK_REFERENCES for Visual Studio



On 06/20/2016 10:48 AM, Brad King wrote:
>  VS: Add VS_SDK_REFERENCES target property to reference external SDKs
>  https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ccc6270d

This caused the VSWinStorePhone tests to fail, e.g.:

 https://open.cdash.org/testDetails.php?test=457508384=4422066
 (ResolveSDKReferences target) ->
  C:\Program Files 
(x86)\MSBuild\14.0\bin\Microsoft.Common.CurrentVersion.targets(2049,5): error 
MSB3774: Could not find SDK "Microsoft.NET.Native.Runtime.1.1, Version=1.1".

The problem is that the hard-coded VS_SDK_REFERENCES value in the
test names a SDK that does not exist on the test machine.  Some other
approach will be needed to know what SDK can be referenced by the test.

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] Patch: Add the ability to specify SDK_REFERENCES for Visual Studio

2016-06-17 Thread Gilles Khouzam via cmake-developers
This patch is to add the ability with Visual Studio generators to add 
references to SDKs. This is similar to the DESKTOP, IOT and MOBILE extensions 
for Windows 10, but makes the process more generic, using the Property 
VS_SDK_REFERENCES as a semi-colon separated list.

For example, adding a reference to the AdMediatorSDK would look something like 
this:

set_property(TARGET ${EXE_NAME} PROPERTY VS_SDK_REFERENCES 
"Microsoft.AdMediatorWindows81, Version=1.0")


0001-VS_SDK_REFERENCES.patch
Description: 0001-VS_SDK_REFERENCES.patch
-- 

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] Patch: Add ability to override the default Visual Studio tool

2016-06-17 Thread Gilles Khouzam via cmake-developers
This patch is to add the ability to override the default tool assigned by the 
Visual Studio generator based on the extension, by using a new source property 
VS_TOOL_OVERRIDE. This also allows for new tools to be defined without having 
to teach CMake how to handle them.

For example, this allows to have resource support (.resw) files and specifying 
that they are processed with the PRIResource tool.


0001-VS_TOOL_OVERRIDE.PATCH
Description: 0001-VS_TOOL_OVERRIDE.PATCH
-- 

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