Re: [cmake-developers] Developer tasks - Refactoring

2016-05-19 Thread Daniel Pfeifer
On Thu, May 19, 2016 at 11:18 PM Daniel Pfeifer 
wrote:

> On Wed, Feb 10, 2016 at 12:15 AM Stephen Kelly  wrote:
>
>> 1) Make cmLocalGenerator not inherit cmOutputConverter
>> * Change enums like cmLocalGenerator::START_OUTPUT with sed.  See
>
>
> Please see attached patch.
>

Revised patch attached. Please ignore the previous one.
This one also fully qualifies the enums that were used unqualified.
From d955e4257faae1cd5b6a1fc300583d74dce6c061 Mon Sep 17 00:00:00 2001
From: Daniel Pfeifer 
Date: Thu, 19 May 2016 23:11:40 +0200
Subject: [PATCH] Use enums defined in cmOutputConverter using their fully
 qualified name.

Mostly automated:

values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
"OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
"FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
---
 Source/cmCommonTargetGenerator.cxx |  18 ++--
 Source/cmCommonTargetGenerator.h   |   4 +-
 Source/cmDependsC.cxx  |  10 +--
 Source/cmDependsFortran.cxx|  40 -
 Source/cmExtraEclipseCDT4Generator.cxx |   2 +-
 Source/cmGlobalGenerator.cxx   |   2 +-
 Source/cmGlobalNinjaGenerator.cxx  |  10 +--
 Source/cmGlobalUnixMakefileGenerator3.cxx  |  24 ++---
 Source/cmGlobalVisualStudio7Generator.cxx  |   2 +-
 Source/cmGlobalXCodeGenerator.cxx  |   8 +-
 Source/cmLocalGenerator.cxx|   2 +-
 Source/cmLocalGenerator.h  |  12 +--
 Source/cmLocalNinjaGenerator.cxx   |  27 +++---
 Source/cmLocalNinjaGenerator.h |  12 +--
 Source/cmLocalUnixMakefileGenerator3.cxx   | 106 --
 Source/cmLocalUnixMakefileGenerator3.h |  12 +--
 Source/cmLocalVisualStudio7Generator.cxx   |  41 +
 Source/cmMakefileExecutableTargetGenerator.cxx |  55 ++--
 Source/cmMakefileLibraryTargetGenerator.cxx|  84 +-
 Source/cmMakefileTargetGenerator.cxx   | 118 -
 Source/cmMakefileUtilityTargetGenerator.cxx|   4 +-
 Source/cmNinjaNormalTargetGenerator.cxx|  22 ++---
 Source/cmNinjaTargetGenerator.cxx  |  12 +--
 Source/cmNinjaUtilityTargetGenerator.cxx   |   4 +-
 Source/cmVisualStudio10TargetGenerator.cxx |   4 +-
 25 files changed, 333 insertions(+), 302 deletions(-)

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 6b2d1e3..c630971 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -43,8 +43,8 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const
 }
 
 std::string cmCommonTargetGenerator::Convert(
-  std::string const& source, cmLocalGenerator::RelativeRoot relative,
-  cmLocalGenerator::OutputFormat output)
+  std::string const& source, cmOutputConverter::RelativeRoot relative,
+  cmOutputConverter::OutputFormat output)
 {
   return this->LocalGenerator->Convert(source, relative, output);
 }
@@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
   std::string mod_dir = this->GetFortranModuleDirectory();
   if (!mod_dir.empty()) {
 mod_dir =
-  this->Convert(mod_dir, this->WorkingDirectory, cmLocalGenerator::SHELL);
+  this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
   } else {
 mod_dir =
   this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
@@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
  idi != includes.end(); ++idi) {
   std::string flg = modpath_flag;
   flg +=
-this->Convert(*idi, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
+this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL);
   this->LocalGenerator->AppendFlags(flags, flg);
 }
   }
@@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
   std::string& flags, cmSourceFile const& source)
 {
   const char* srcfmt = source.GetProperty("Fortran_FORMAT");
-  cmLocalGenerator::FortranFormat format =
+  cmOutputConverter::FortranFormat format =
 this->LocalGenerator->GetFortranFormat(srcfmt);
-  if (format == cmLocalGenerator::FortranFormatNone) {
+  if (format == cmOutputConverter::FortranFormatNone) {
 const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
 format = this->LocalGenerator->GetFortranFormat(tgtfmt);
   }
   const char* var = 0;
   switch (format) {
-case cmLocalGenerator::FortranFormatFixed:
+case cmOutputConverter::FortranFormatFixed:
   var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
   break;
-case 

Re: [cmake-developers] Developer tasks - Refactoring

2016-05-19 Thread Daniel Pfeifer
On Wed, Feb 10, 2016 at 12:12 AM, Stephen Kelly  wrote:
> 1) Make cmLocalGenerator not inherit cmOutputConverter
> * Change enums like cmLocalGenerator::START_OUTPUT with sed.  See
>
>https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eac15298
>
>   for a similar sed command to achieve this.
>
> * Remove inheritance. Implement Convert() methods in cmLocalGenerator for
>   source compatibility which instantiate and use a cmOutputConverter as in
>
>https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4d8b79ad

That may change behavior because the LinkScriptShell member may have
the wrong value.
I am currently digging deeper.
-- 

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] Developer tasks - Refactoring

2016-05-19 Thread Daniel Pfeifer
On Wed, Feb 10, 2016 at 12:15 AM Stephen Kelly  wrote:

> 1) Make cmLocalGenerator not inherit cmOutputConverter
> * Change enums like cmLocalGenerator::START_OUTPUT with sed.  See


Please see attached patch.
From 9e1203308ad79d62b24fe6930501e1013b4e52ec Mon Sep 17 00:00:00 2001
From: Daniel Pfeifer 
Date: Thu, 19 May 2016 23:11:40 +0200
Subject: [PATCH] Use enums defined in cmOutputConverter using their fully
 qualified name.

Mostly automated:

values=("RelativeRoot" "NONE" "FULL" "HOME" "START" "HOME_OUTPUT" "START_OUTPUT"
"OutputFormat" "UNCHANGED" "MAKERULE" "SHELL" "WATCOMQUOTE" "RESPONSE"
"FortranFormat" "FortranFormatNone" "FortranFormatFixed" "FortranFormatFree")
for i in "${values[@]}"; do git grep -l cmLocalGenerator::$i | xargs sed -i "s|cmLocalGenerator::$i|cmOutputConverter::$i|g"; done
---
 Source/cmCommonTargetGenerator.cxx |  18 ++--
 Source/cmCommonTargetGenerator.h   |   4 +-
 Source/cmDependsC.cxx  |  10 +--
 Source/cmDependsFortran.cxx|  40 -
 Source/cmExtraEclipseCDT4Generator.cxx |   2 +-
 Source/cmGlobalGenerator.cxx   |   2 +-
 Source/cmGlobalNinjaGenerator.cxx  |  10 +--
 Source/cmGlobalUnixMakefileGenerator3.cxx  |  24 ++---
 Source/cmGlobalVisualStudio7Generator.cxx  |   2 +-
 Source/cmGlobalXCodeGenerator.cxx  |   8 +-
 Source/cmLocalGenerator.cxx|   2 +-
 Source/cmLocalGenerator.h  |  12 +--
 Source/cmLocalUnixMakefileGenerator3.cxx   |  50 +--
 Source/cmLocalUnixMakefileGenerator3.h |   6 +-
 Source/cmLocalVisualStudio7Generator.cxx   |  16 ++--
 Source/cmMakefileExecutableTargetGenerator.cxx |  55 ++--
 Source/cmMakefileLibraryTargetGenerator.cxx|  84 +-
 Source/cmMakefileTargetGenerator.cxx   | 118 -
 Source/cmMakefileUtilityTargetGenerator.cxx|   4 +-
 Source/cmNinjaNormalTargetGenerator.cxx|  22 ++---
 Source/cmNinjaTargetGenerator.cxx  |  12 +--
 Source/cmNinjaUtilityTargetGenerator.cxx   |   4 +-
 Source/cmVisualStudio10TargetGenerator.cxx |   4 +-
 23 files changed, 257 insertions(+), 252 deletions(-)

diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 6b2d1e3..c630971 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -43,8 +43,8 @@ std::string const& cmCommonTargetGenerator::GetConfigName() const
 }
 
 std::string cmCommonTargetGenerator::Convert(
-  std::string const& source, cmLocalGenerator::RelativeRoot relative,
-  cmLocalGenerator::OutputFormat output)
+  std::string const& source, cmOutputConverter::RelativeRoot relative,
+  cmOutputConverter::OutputFormat output)
 {
   return this->LocalGenerator->Convert(source, relative, output);
 }
@@ -140,7 +140,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
   std::string mod_dir = this->GetFortranModuleDirectory();
   if (!mod_dir.empty()) {
 mod_dir =
-  this->Convert(mod_dir, this->WorkingDirectory, cmLocalGenerator::SHELL);
+  this->Convert(mod_dir, this->WorkingDirectory, cmOutputConverter::SHELL);
   } else {
 mod_dir =
   this->Makefile->GetSafeDefinition("CMAKE_Fortran_MODDIR_DEFAULT");
@@ -167,7 +167,7 @@ void cmCommonTargetGenerator::AddFortranFlags(std::string& flags)
  idi != includes.end(); ++idi) {
   std::string flg = modpath_flag;
   flg +=
-this->Convert(*idi, cmLocalGenerator::NONE, cmLocalGenerator::SHELL);
+this->Convert(*idi, cmOutputConverter::NONE, cmOutputConverter::SHELL);
   this->LocalGenerator->AppendFlags(flags, flg);
 }
   }
@@ -177,18 +177,18 @@ void cmCommonTargetGenerator::AppendFortranFormatFlags(
   std::string& flags, cmSourceFile const& source)
 {
   const char* srcfmt = source.GetProperty("Fortran_FORMAT");
-  cmLocalGenerator::FortranFormat format =
+  cmOutputConverter::FortranFormat format =
 this->LocalGenerator->GetFortranFormat(srcfmt);
-  if (format == cmLocalGenerator::FortranFormatNone) {
+  if (format == cmOutputConverter::FortranFormatNone) {
 const char* tgtfmt = this->GeneratorTarget->GetProperty("Fortran_FORMAT");
 format = this->LocalGenerator->GetFortranFormat(tgtfmt);
   }
   const char* var = 0;
   switch (format) {
-case cmLocalGenerator::FortranFormatFixed:
+case cmOutputConverter::FortranFormatFixed:
   var = "CMAKE_Fortran_FORMAT_FIXED_FLAG";
   break;
-case cmLocalGenerator::FortranFormatFree:
+case cmOutputConverter::FortranFormatFree:
   var = "CMAKE_Fortran_FORMAT_FREE_FLAG";
   break;
 default:
@@ -244,7 +244,7 @@ std::string cmCommonTargetGenerator::GetFrameworkFlags(std::string const& l)
   if (emitted.insert(*i).second) {
 flags += fwSearchFlag;
 flags += 

Re: [cmake-developers] Custom commands with Ninja on Windows

2016-05-19 Thread Brad King
On 05/19/2016 04:31 PM, Martin Ankerl wrote:
> I didn't think about just writing a .cmd (or .bat?) with cmake

The ".cmd" extension is a modern version of ".bat".

> that sounds like the simplest solution!

Yes, assuming we never have a need for ninja placeholder substitution.
Why are one-line response files generated by Ninja not a solution?
Does cmd support them?

> if %errorlevel% neq 0 exit /b %errorlevel%

Yes.

> I have no experience with cmake implementation though, how would you
> find a name for the filename?

First, it can be made conditional on when the command line is really long.
Second, you could just put it in CMakeFiles/ and name it using a hash
of its content (or of the list of outputs).  See Source/cmCryptoHash.h
for example.

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


Re: [cmake-developers] Custom commands with Ninja on Windows

2016-05-19 Thread Martin Ankerl
I didn't think about just writing a .cmd (or .bat?) with cmake, that sounds
like the simplest solution!
After each each custom command we just need to add something like this to
have the same behaviour as the &&:

if %errorlevel% neq 0 exit /b %errorlevel%

I have no experience with cmake implementation though, how would you find a
name for the filename?

Martin

On Thu, May 19, 2016 at 4:03 PM Brad King  wrote:

> On 05/19/2016 01:43 AM, Martin Ankerl wrote:
> > It seems to me that there are two possible solution:
> >
> > * use a response file (rspfile and rspfile_content).
>
> Can cmd.exe /C even use a response file?  Perhaps the whole command could
> simply be written to a .cmd file instead.  I don't think our generated
> custom commands ever use ninja placeholders so we could have CMake write
> the commands to a file instead.  Ninja would only see a call to that file.
> The drawback is that we may not see the whole command from `ninja -v`.
>
> > only possible when modifying ninja to support multiline response files
>
> In what case do we end up with a multiline command?  Isn't it just
> one long command line with && chaining?
>
> > * Add a build target for each custom command, e.g. instead of
>
> It may be tricky to get the same build semantics with that approach.
>
> Thanks,
> -Brad
>
> --
Martin
-- 

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] ExternalProject: fix retry logic if error occurs

2016-05-19 Thread Brad King
On 05/19/2016 09:49 AM, Ruslan Baratov wrote:
> It's a little bit tricky to split refactor/new functionality exact but 
> I've created several patches with step-by-step changes. Hope this helps 
> in review.

Nice, thanks.  I've applied the changes and merged to 'next' for testing:

 ExternalProject: Use uppercase placeholders for script generation
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d610407c

 ExternalProject: Remove unused 'retries' argument from verify script
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e5409d1e

 ExternalProject: Remove unused verify script logic
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33218f6a

 ExternalProject: Avoid repeating download verification
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ebcc7027

 ExternalProject: Re-implement download verification as a dedicated script
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7d5e4b4

 ExternalProject: Re-implement download logic as a dedicated script
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89113e12

-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-developers] Custom commands with Ninja on Windows

2016-05-19 Thread Brad King
On 05/19/2016 01:43 AM, Martin Ankerl wrote:
> It seems to me that there are two possible solution:
> 
> * use a response file (rspfile and rspfile_content).

Can cmd.exe /C even use a response file?  Perhaps the whole command could
simply be written to a .cmd file instead.  I don't think our generated
custom commands ever use ninja placeholders so we could have CMake write
the commands to a file instead.  Ninja would only see a call to that file.
The drawback is that we may not see the whole command from `ninja -v`.

> only possible when modifying ninja to support multiline response files

In what case do we end up with a multiline command?  Isn't it just
one long command line with && chaining?

> * Add a build target for each custom command, e.g. instead of

It may be tricky to get the same build semantics with that approach.

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


Re: [cmake-developers] [Patch] ExternalProject: fix retry logic if error occurs

2016-05-19 Thread Ruslan Baratov via cmake-developers
It's a little bit tricky to split refactor/new functionality exact but 
I've created several patches with step-by-step changes. Hope this helps 
in review.


Ruslo

On 18-May-16 22:50, Brad King wrote:

On 05/18/2016 03:30 PM, Ruslan Baratov via cmake-developers wrote:

I've attached patch with applying retry logic in cases when status code
is not zero.

Thanks.  Please split the patch to perform the refactoring into
the ExternalProject-$step.cmake.in files first and then make the
logic changes as a second patch.  Also please add an explanation
of the logic change to the second commit message similar to what
you wrote in the original email.

-Brad



>From 5b4149ddc436f83bff4b7636884f86e9200b9fe7 Mon Sep 17 00:00:00 2001
From: Ruslan Baratov 
Date: Thu, 19 May 2016 14:38:06 +0300
Subject: [PATCH 1/6] ExternalProject refactoring: uppercase variables

Use uppercase variables for future 'configure_file' command.
---
 Modules/ExternalProject.cmake | 54 +--
 1 file changed, 27 insertions(+), 27 deletions(-)

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 7dad6e5..a7fc1f9 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -847,25 +847,25 @@ endif()
 
 endfunction(_ep_write_gitupdate_script)
 
-function(_ep_write_downloadfile_script script_filename remote local timeout no_progress hash tls_verify tls_cainfo)
+function(_ep_write_downloadfile_script script_filename REMOTE LOCAL timeout no_progress hash tls_verify tls_cainfo)
   if(timeout)
-set(timeout_args TIMEOUT ${timeout})
-set(timeout_msg "${timeout} seconds")
+set(TIMEOUT_ARGS TIMEOUT ${timeout})
+set(TIMEOUT_MSG "${timeout} seconds")
   else()
-set(timeout_args "# no TIMEOUT")
-set(timeout_msg "none")
+set(TIMEOUT_ARGS "# no TIMEOUT")
+set(TIMEOUT_MSG "none")
   endif()
 
   if(no_progress)
-set(show_progress "")
+set(SHOW_PROGRESS "")
   else()
-set(show_progress "SHOW_PROGRESS")
+set(SHOW_PROGRESS "SHOW_PROGRESS")
   endif()
 
   if("${hash}" MATCHES "${_ep_hash_regex}")
 string(CONCAT hash_check
-  "if(EXISTS \"${local}\")\n"
-  "  file(\"${CMAKE_MATCH_1}\" \"${local}\" hash_value)\n"
+  "if(EXISTS \"${LOCAL}\")\n"
+  "  file(\"${CMAKE_MATCH_1}\" \"${LOCAL}\" hash_value)\n"
   "  if(\"x\${hash_value}\" STREQUAL \"x${CMAKE_MATCH_2}\")\n"
   "return()\n"
   "  endif()\n"
@@ -875,15 +875,15 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
 set(hash_check "")
   endif()
 
-  set(tls_verify_code "")
-  set(tls_cainfo_code "")
+  set(TLS_VERIFY_CODE "")
+  set(TLS_CAINFO_CODE "")
 
   # check for curl globals in the project
   if(DEFINED CMAKE_TLS_VERIFY)
-set(tls_verify_code "set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})")
+set(TLS_VERIFY_CODE "set(CMAKE_TLS_VERIFY ${CMAKE_TLS_VERIFY})")
   endif()
   if(DEFINED CMAKE_TLS_CAINFO)
-set(tls_cainfo_code "set(CMAKE_TLS_CAINFO \"${CMAKE_TLS_CAINFO}\")")
+set(TLS_CAINFO_CODE "set(CMAKE_TLS_CAINFO \"${CMAKE_TLS_CAINFO}\")")
   endif()
 
   # now check for curl locals so that the local values
@@ -892,28 +892,28 @@ function(_ep_write_downloadfile_script script_filename remote local timeout no_p
   # check for tls_verify argument
   string(LENGTH "${tls_verify}" tls_verify_len)
   if(tls_verify_len GREATER 0)
-set(tls_verify_code "set(CMAKE_TLS_VERIFY ${tls_verify})")
+set(TLS_VERIFY_CODE "set(CMAKE_TLS_VERIFY ${tls_verify})")
   endif()
   # check for tls_cainfo argument
   string(LENGTH "${tls_cainfo}" tls_cainfo_len)
   if(tls_cainfo_len GREATER 0)
-set(tls_cainfo_code "set(CMAKE_TLS_CAINFO \"${tls_cainfo}\")")
+set(TLS_CAINFO_CODE "set(CMAKE_TLS_CAINFO \"${tls_cainfo}\")")
   endif()
 
   file(WRITE ${script_filename}
 "${hash_check}message(STATUS \"downloading...
- src='${remote}'
- dst='${local}'
- timeout='${timeout_msg}'\")
+ src='${REMOTE}'
+ dst='${LOCAL}'
+ timeout='${TIMEOUT_MSG}'\")
 
-${tls_verify_code}
-${tls_cainfo_code}
+${TLS_VERIFY_CODE}
+${TLS_CAINFO_CODE}
 
 file(DOWNLOAD
-  \"${remote}\"
-  \"${local}\"
-  ${show_progress}
-  ${timeout_args}
+  \"${REMOTE}\"
+  \"${LOCAL}\"
+  ${SHOW_PROGRESS}
+  ${TIMEOUT_ARGS}
   STATUS status
   LOG log)
 
@@ -921,7 +921,7 @@ list(GET status 0 status_code)
 list(GET status 1 status_string)
 
 if(NOT status_code EQUAL 0)
-  message(FATAL_ERROR \"error: downloading '${remote}' failed
+  message(FATAL_ERROR \"error: downloading '${REMOTE}' failed
   status_code: \${status_code}
   status_string: \${status_string}
   log: \${log}
@@ -935,7 +935,7 @@ message(STATUS \"downloading... done\")
 endfunction()
 
 
-function(_ep_write_verifyfile_script script_filename local hash retries download_script)
+function(_ep_write_verifyfile_script script_filename LOCAL hash retries download_script)
   if("${hash}" MATCHES "${_ep_hash_regex}")
 set(algo "${CMAKE_MATCH_1}")

[cmake-developers] [CMake 0016106]: Error generating UWP project with latest Visual Studio 2015

2016-05-19 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=16106 
== 
Reported By:Merlin1st
Assigned To:
== 
Project:CMake
Issue ID:   16106
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-05-19 09:03 EDT
Last Modified:  2016-05-19 09:03 EDT
== 
Summary:Error generating UWP project with latest Visual
Studio 2015
Description: 
Command

cmake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore
-DCMAKE_SYSTEM_VERSION=10.0

Always fails.

Steps to Reproduce: 
Create cmake project file CMakeLists.txt with content:

project(test)
add_library(${PROJECT_NAME} STATIC test.cpp)

then run command
cmake -G "Visual Studio 14 2015" -DCMAKE_SYSTEM_NAME=WindowsStore
-DCMAKE_SYSTEM_VERSION=10.0

Generating fails.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-05-19 09:03 Merlin1st  New Issue
2016-05-19 09:03 Merlin1st  File Added: CMakeError.log
==

-- 

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