[cmake-developers] [CMake 0014845]: invalid generated -I path for JNI includes on cygwin

2014-03-27 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=14845 
== 
Reported By:FrancisANDRE
Assigned To:
== 
Project:CMake
Issue ID:   14845
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   high
Status: new
== 
Date Submitted: 2014-03-27 08:52 EDT
Last Modified:  2014-03-27 08:52 EDT
== 
Summary:invalid generated -I path for JNI includes on cygwin
Description: 
Hi

Below is a copy of the generated flags which includes the path for the java JNI
headers. The C:/Progra~1/Java/jdk1.7.0_51/include is concatenated to the
previous path while it should be set as a standalone include path as

-IC:/Progra~1/Java/jdk1.7.0_51/include

# CMAKE generated file: DO NOT EDIT!
# Generated by Unix Makefiles Generator, CMake Version 2.8

# compile C with /usr/bin/cc
C_FLAGS = -I/usr/local/include
-I/cygdrive/z/dev/llvm/x64/jllvm/src/org/jllvm/bindings/C:/Progra~1/Java/jdk1.7.0_51/include
-I/cygdrive/z/dev/llvm/x64/jllvm/src/org/jllvm/bindings/C:/Progra~1/Java/jdk1.7.0_51/include/win32

C_DEFINES = -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -Djllvm_EXPORTS


Steps to Reproduce: 
Under cygwin, rnu cmake with this CMakeLists.txt

$ cat CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
FIND_PACKAGE(JNI REQUIRED)

== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2014-03-27 08:52 FrancisANDRE   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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] Better find module developer documentation

2014-03-27 Thread Brad King
On 03/26/2014 03:02 PM, Alex Merry wrote:
 I wrote some documentation on how to write a find module for KDE's
 extra-cmake-modules project, and Stephen suggested upstreaming it.  So
 attached is a patch that does that.

Thanks for working on this.  I like the tutorial-style presentation.

First, a few reST style comments:

* Paragraphs ending in : :: can be simplified to ::.

* CMake code blocks should use .. code-block:: cmake rather
  than a plain literal block if the code in the block is valid
  CMake code (as against containing placeholders as in command
  signature documentation).

* Indented blocks where the amount of indentation can be chosen
  should use 2 spaces instead of 1.

 Note that this changes the recommendations from the Foo_LIBRARIES,
 Foo_INCLUDES and Foo_DEFINITIONS variables to creating imported targets
 (which are much easier and less error-prone to use).

Providing imported targets is nice, and preferred by KDE, but is
not a requirement for upstream modules.  Most existing modules
have not been updated to provide them.  Using imported targets
throughout a project requires additional effort when creating
package configuration files to ensure dependencies that name
imported targets have them available.

The docs should explain both approaches.  Then explain why
imported targets are preferred but that since the approach
is newer not all existing modules have been updated.

We need to maintain the list of example variable names.  The
difference between Foo_LIBRARY and Foo_LIBRARIES needs to be
clearly explained, and not just in the sample module section.

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/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] [PATCH] cleanup Watcom Windows configuration

2014-03-27 Thread Jiri Malak
I atached patch which cleanup Watcom Windows configuration

It includes following changes.

remove Watcom linker caseexact options already defined in linker system 
definition
use win_dll system for SHARED_LIBRARY and SHARED_MODULE
use explicit target definition -bt=.. option for proper initialization of 
compiler Windows
environment (predefined macros)
reorganize compiler options to global and configuration specific part
correct debug related compilers options and linker options
use -s option to optimize out stack checking code for release versionFrom 871c36f7d7cb42147ba5c9c5cb9bdf8d83384078 Mon Sep 17 00:00:00 2001
From: Jiri Malak malak.j...@gmail.com
Date: Thu, 27 Mar 2014 15:20:23 +0100
Subject: [PATCH] cleanup Watcom Windows configuration

remove Watcom linker caseexact options already defined in system definition
use win_dll system for SHARED_LIBRARY and SHARED_MODULE
use explicit target definition -bt=.. option for proper initialization of 
compiler Windows environment (predefined macros)
reorganize compiler options to global options and configuration specific options
use option to optimize out stack checking code for release version
---
 Modules/Platform/Windows-wcl386.cmake | 53 ---
 1 file changed, 30 insertions(+), 23 deletions(-)

diff --git a/Modules/Platform/Windows-wcl386.cmake 
b/Modules/Platform/Windows-wcl386.cmake
index 6b1cfd1..6857db9 100644
--- a/Modules/Platform/Windows-wcl386.cmake
+++ b/Modules/Platform/Windows-wcl386.cmake
@@ -12,13 +12,15 @@ else()
   set(CMAKE_LIB_QUIET -q)
 endif()
 
+set(CMAKE_EXE_LINKER_FLAGS_INIT)
 set(CMAKE_CREATE_WIN32_EXE system nt_win )
 set(CMAKE_CREATE_CONSOLE_EXE system nt )
-
-set (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT debug all )
-set (CMAKE_SHARED_LINKER_FLAGS_DEBUG_INIT debug all )
-set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT debug all )
-set (CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO_INIT debug all )
+set(CMAKE_SHARED_LINKER_FLAGS_INIT system nt_dll)
+set(CMAKE_MODULE_LINKER_FLAGS_INIT system nt_dll)
+foreach(type SHARED MODULE EXE)
+  set(CMAKE_${type}_LINKER_FLAGS_DEBUG_INIT debug all opt map, symfile)
+  set(CMAKE_${type}_LINKER_FLAGS_RELWITHDEBINFO_INIT debug all opt map, 
symfile)
+endforeach()
 
 set(CMAKE_C_COMPILE_OPTIONS_DLL -bd) # Note: This variable is a ';' 
separated list
 set(CMAKE_SHARED_LIBRARY_C_FLAGS -bd) # ... while this is a space separated 
string.
@@ -26,47 +28,52 @@ set(CMAKE_SHARED_LIBRARY_C_FLAGS -bd) # ... while this is 
a space separated st
 set(CMAKE_RC_COMPILER rc )
 
 set(CMAKE_BUILD_TYPE_INIT Debug)
-set (CMAKE_CXX_FLAGS_INIT -w=3 -xs)
-set (CMAKE_CXX_FLAGS_DEBUG_INIT -br -bm -d2)
-set (CMAKE_CXX_FLAGS_MINSIZEREL_INIT -br -bm -os -dNDEBUG)
-set (CMAKE_CXX_FLAGS_RELEASE_INIT -br -bm -ot -dNDEBUG)
-set (CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT -br -bm  -d2 -ot -dNDEBUG)
-set (CMAKE_C_FLAGS_INIT -w=3 )
-set (CMAKE_C_FLAGS_DEBUG_INIT -br -bm -d2 -od)
-set (CMAKE_C_FLAGS_MINSIZEREL_INIT -br -bm -os -dNDEBUG)
-set (CMAKE_C_FLAGS_RELEASE_INIT -br -bm -ot -dNDEBUG)
-set (CMAKE_C_FLAGS_RELWITHDEBINFO_INIT -br -bm -d2 -ot -dNDEBUG)
-set (CMAKE_C_STANDARD_LIBRARIES_INIT library clbrdll.lib library plbrdll.lib  
library kernel32.lib library user32.lib library gdi32.lib library winspool.lib 
library comdlg32.lib library advapi32.lib library shell32.lib library ole32.lib 
library oleaut32.lib library uuid.lib library odbc32.lib library odbccp32.lib)
-set (CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES_INIT})
+
+# single/multi-threaded /-bm
+# static/DLL run-time libraries /-br
+# default is setup for multi-threaded + DLL run-time libraries
+set (CMAKE_C_FLAGS_INIT -bt=nt -w3 -dWIN32 -br -bm)
+set (CMAKE_CXX_FLAGS_INIT -bt=nt -xs -w3 -dWIN32 -br -bm)
+foreach(lang C CXX)
+  set (CMAKE_${lang}_FLAGS_DEBUG_INIT -d2)
+  set (CMAKE_${lang}_FLAGS_MINSIZEREL_INIT -s -os -d0 -dNDEBUG)
+  set (CMAKE_${lang}_FLAGS_RELEASE_INIT -s -ot -d0 -dNDEBUG)
+  set (CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT -s -ot -d1 -dNDEBUG)
+endforeach()
+
+foreach(type CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
+  set(CMAKE_C_${type}_USE_SINGLE_QUOTE 1)
+  set(CMAKE_CXX_${type}_USE_SINGLE_QUOTE 1)
+endforeach()
 
 set(CMAKE_C_CREATE_IMPORT_LIBRARY
   wlib -c -q -n -b TARGET_IMPLIB +TARGET_QUOTED)
 set(CMAKE_CXX_CREATE_IMPORT_LIBRARY ${CMAKE_C_CREATE_IMPORT_LIBRARY})
 
 set(CMAKE_C_LINK_EXECUTABLE
-wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name 
'TARGET_UNQUOTED' LINK_FLAGS option caseexact file {OBJECTS} 
LINK_LIBRARIES ${CMAKE_END_TEMP_FILE})
+wlink ${CMAKE_START_TEMP_FILE} ${CMAKE_WLINK_QUIET} name 
'TARGET_UNQUOTED' LINK_FLAGS file {OBJECTS} LINK_LIBRARIES 
${CMAKE_END_TEMP_FILE})
 
 
 set(CMAKE_CXX_LINK_EXECUTABLE ${CMAKE_C_LINK_EXECUTABLE})
 
 # compile a C++ file into an object file
 set(CMAKE_CXX_COMPILE_OBJECT
-CMAKE_CXX_COMPILER ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} FLAGS 
-dWIN32 -d+ DEFINES -foOBJECT -c -cc++ SOURCE${CMAKE_END_TEMP_FILE})
+   

Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Daniele E. Domenichelli
Hello all,

Sorry for bringing up an old thread, you can find the original thread
here:

  http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8658

I pushed the topic again with no changes (just a rebase), I've been
using it for a while with no issues at all.

Is it ok to merge it to next?


Cheers,
 Daniele
-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Daniele E. Domenichelli
Hello again,

Sorry for bringing up another old thread, you can find the original
thread here:

http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/8837

I pushed the topic again with no changes (just a rebase), I've been
using it for a while with no issues at all.

Is it ok to merge it to next?

By the way, sorry for abandoning these branches, but I've been very
busy for a while.

Cheers,
 Daniele



-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Brad King
On 03/27/2014 11:16 AM, Daniele E. Domenichelli wrote:
 Is it ok to merge it to next?

Yes, but let's do only one change to ExternalProject per day so
we can see how the tests do.

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] cleanup Watcom Windows configuration

2014-03-27 Thread Brad King
On 03/27/2014 10:47 AM, Jiri Malak wrote:
 I atached patch which cleanup Watcom Windows configuration

Thanks.  Since this touches Windows-wcl386.cmake it is tangled
with the link line quoting change.  Once that is in 'master'
please rebase this on it and re-send.

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] wlink command-line parsing

2014-03-27 Thread Brad King
On 03/26/2014 06:38 PM, Jiri Malak wrote:
 It is correct version of patch.

Thanks.

 +  if( useSingleQuote)
 +{
 +#if defined(_WIN32)  !defined(__CYGWIN__)
 +result = ';
 +#else
 +result = \';
 +#endif

This quoting style is now very specific to Watcom.  Please
add another patch on top of this to rename:

 useSingleQuote = useWatcomQuote
 _USE_SINGLE_QUOTE = _USE_WATCOM_QUOTE

I will squash them all together and update the commit message
accordingly.

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Brad King
On 03/27/2014 11:34 AM, Brad King wrote:
 A simpler way to look for the argument:
 
  if(;${ARGN}; MATCHES ;EXCLUDE_FROM_ALL;([^;]*);)
# ... test CMAKE_MATCH_1
  endif()

Actually you don't need to parse the arg ahead of time.
The ALL option to add_custom_target just tells it to
*not* set the EXCLUDE_FROM_ALL target property.  Instead
you can leave out ALL, parse the args as normal, and
then add

 set_property(TARGET ... PROPERTY EXCLUDE_FROM_ALL FALSE)

when the EXCLUDE_FROM_ALL option is not set.

-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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Daniele E. Domenichelli
On 27/03/14 16:53, Brad King wrote:
 Actually you don't need to parse the arg ahead of time.
 The ALL option to add_custom_target just tells it to
 *not* set the EXCLUDE_FROM_ALL target property.  Instead
 you can leave out ALL, parse the args as normal, and
 then add
 
  set_property(TARGET ... PROPERTY EXCLUDE_FROM_ALL FALSE)
 
 when the EXCLUDE_FROM_ALL option is not set.

This is way easier, thanks!

I merged the other topic and updated this one, can you please review it
again?


Daniele
-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] wlink command-line parsing

2014-03-27 Thread Jiri Malak
I did it.
New patch is enclosed.

Regards

Jiri

 On 03/26/2014 06:38 PM, Jiri Malak wrote:
 It is correct version of patch.

 Thanks.

 +  if( useSingleQuote)
 +{
 +#if defined(_WIN32)  !defined(__CYGWIN__)
 +result = ';
 +#else
 +result = \';
 +#endif

 This quoting style is now very specific to Watcom.  Please
 add another patch on top of this to rename:

  useSingleQuote = useWatcomQuote
  _USE_SINGLE_QUOTE = _USE_WATCOM_QUOTE

 I will squash them all together and update the commit message
 accordingly.

 Thanks,
 -Brad


From 0f1c62699401046f204a7c7d9de3cafa552b252e Mon Sep 17 00:00:00 2001
From: Jiri Malak malak.j...@gmail.com
Date: Thu, 27 Mar 2014 18:20:03 +0100
Subject: [PATCH] Correct single quote processing for Watcom linker.

---
 Modules/Platform/Windows-wcl386.cmake  |  4 ++--
 Source/cmLocalUnixMakefileGenerator3.cxx   |  6 +++---
 Source/cmLocalUnixMakefileGenerator3.h |  2 +-
 Source/cmMakefileExecutableTargetGenerator.cxx |  4 ++--
 Source/cmMakefileLibraryTargetGenerator.cxx|  4 ++--
 Source/cmMakefileTargetGenerator.cxx   | 10 +-
 Source/cmMakefileTargetGenerator.h |  4 ++--
 7 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/Modules/Platform/Windows-wcl386.cmake 
b/Modules/Platform/Windows-wcl386.cmake
index 359097f..617761b 100644
--- a/Modules/Platform/Windows-wcl386.cmake
+++ b/Modules/Platform/Windows-wcl386.cmake
@@ -40,8 +40,8 @@ set (CMAKE_C_STANDARD_LIBRARIES_INIT library clbrdll.lib 
library plbrdll.lib  l
 set (CMAKE_CXX_STANDARD_LIBRARIES_INIT ${CMAKE_C_STANDARD_LIBRARIES_INIT})
 
 foreach(type CREATE_SHARED_LIBRARY CREATE_SHARED_MODULE LINK_EXECUTABLE)
-  set(CMAKE_C_${type}_USE_SINGLE_QUOTE 1)
-  set(CMAKE_CXX_${type}_USE_SINGLE_QUOTE 1)
+  set(CMAKE_C_${type}_USE_WATCOM_QUOTE 1)
+  set(CMAKE_CXX_${type}_USE_WATCOM_QUOTE 1)
 endforeach()
 
 set(CMAKE_C_CREATE_IMPORT_LIBRARY
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx 
b/Source/cmLocalUnixMakefileGenerator3.cxx
index fa81913..9fe9843 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -2182,14 +2182,14 @@ cmLocalUnixMakefileGenerator3
 //
 std::string
 cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
- bool useSingleQuote)
+ bool useWatcomQuote)
 {
   // Split the path into its components.
   std::vectorstd::string components;
   cmSystemTools::SplitPath(p, components);
 
   // Open the quoted result.
-  if( useSingleQuote)
+  if( useWatcomQuote)
 {
 #if defined(_WIN32)  !defined(__CYGWIN__)
 std::string result = ';
@@ -2244,7 +2244,7 @@ 
cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p,
 }
 
   // Close the quoted result.
-  if( useSingleQuote)
+  if( useWatcomQuote)
 {
 #if defined(_WIN32)  !defined(__CYGWIN__)
 result += ';
diff --git a/Source/cmLocalUnixMakefileGenerator3.h 
b/Source/cmLocalUnixMakefileGenerator3.h
index 0aa804a..99974ee 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -187,7 +187,7 @@ public:
cmLocalGenerator::RelativeRoot returnDir);
 
   static std::string ConvertToQuotedOutputPath(const char* p,
-   bool useSingleQuote);
+   bool useWatcomQuote);
 
   std::string CreateMakeVariable(const std::string sin,
  const std::string s2in);
diff --git a/Source/cmMakefileExecutableTargetGenerator.cxx 
b/Source/cmMakefileExecutableTargetGenerator.cxx
index a392780..701d5a0 100644
--- a/Source/cmMakefileExecutableTargetGenerator.cxx
+++ b/Source/cmMakefileExecutableTargetGenerator.cxx
@@ -290,7 +290,7 @@ void 
cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   linkRuleVar += linkLanguage;
   linkRuleVar += _LINK_EXECUTABLE;
   std::string linkRule = this-GetLinkRule(linkRuleVar);
-  bool useSingleQuote = this-Makefile-IsOn(linkRuleVar+_USE_SINGLE_QUOTE);
+  bool useWatcomQuote = this-Makefile-IsOn(linkRuleVar+_USE_WATCOM_QUOTE);
   std::vectorstd::string commands1;
   cmSystemTools::ExpandListArgument(linkRule, real_link_commands);
   if(this-Target-IsExecutableWithExports())
@@ -345,7 +345,7 @@ void 
cmMakefileExecutableTargetGenerator::WriteExecutableRule(bool relink)
   std::string buildObjs;
   this-CreateObjectLists(useLinkScript, false,
   useResponseFileForObjects, buildObjs, depends,
-  useSingleQuote);
+  useWatcomQuote);
 
   cmLocalGenerator::RuleVariables vars;
   vars.RuleLauncher = RULE_LAUNCH_LINK;
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx 
b/Source/cmMakefileLibraryTargetGenerator.cxx
index eea1b02..754f62f 

Re: [cmake-developers] wlink command-line parsing

2014-03-27 Thread Brad King
On 03/27/2014 01:22 PM, Jiri Malak wrote:
 I did it.
 New patch is enclosed.

Thanks.  I've squashed all the changes into:

 Makefile: Generate single-quoted object lists for Watcom
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=423009c1

-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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Brad King
On 03/27/2014 12:24 PM, Daniele E. Domenichelli wrote:
 +  if(;${ARGN}; MATCHES ;EXCLUDE_FROM_ALL;([^;]*);)
 +set(exclude_from_all ${CMAKE_MATCH_1})
 +  endif()
 +  if(NOT exclude_from_all)
 +set(all ALL)
 +  endif()

We need to be robust against variables set in outer scopes:

 set(all ALL)
 if(;${ARGN}; MATCHES ;EXCLUDE_FROM_ALL;([^;]*);)
   if(CMAKE_MATCH_1)
 set(all )
   endif()
 endif()

-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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] cleanup Watcom Windows configuration

2014-03-27 Thread Jiri Malak
OK. I will do it as soon as it will be possible.

Jiri

 On 03/27/2014 10:47 AM, Jiri Malak wrote:
 I atached patch which cleanup Watcom Windows configuration

 Thanks.  Since this touches Windows-wcl386.cmake it is tangled
 with the link line quoting change.  Once that is in 'master'
 please rebase this on it and re-send.

 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/cgi-bin/mailman/listinfo/cmake-developers



-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Daniele E. Domenichelli
On 27/03/14 18:50, Brad King wrote:
 On 03/27/2014 12:24 PM, Daniele E. Domenichelli wrote:
 +  if(;${ARGN}; MATCHES ;EXCLUDE_FROM_ALL;([^;]*);)
 +set(exclude_from_all ${CMAKE_MATCH_1})
 +  endif()
 +  if(NOT exclude_from_all)
 +set(all ALL)
 +  endif()

Sorry, I made 2 force-pushes (after each of your e-mails) and perhaps
you fetched the branch in the time between the first and the second
one...
The updated code after your second e-mail should be this:

+  get_property(exclude_from_all TARGET ${name} PROPERTY _EP_EXCLUDE_FROM_ALL)
+  if(exclude_from_all)
+set_property(TARGET ${name} PROPERTY EXCLUDE_FROM_ALL TRUE)
+  endif()


Daniele
-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_exclude-from-all

2014-03-27 Thread Brad King
On 03/27/2014 02:23 PM, Daniele E. Domenichelli wrote:
 The updated code after your second e-mail should be this:
 
 +  get_property(exclude_from_all TARGET ${name} PROPERTY _EP_EXCLUDE_FROM_ALL)
 +  if(exclude_from_all)
 +set_property(TARGET ${name} PROPERTY EXCLUDE_FROM_ALL TRUE)
 +  endif()

Looks good, 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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Brad King
On 03/27/2014 11:34 AM, Brad King wrote:
 On 03/27/2014 11:16 AM, Daniele E. Domenichelli wrote:
 Is it ok to merge it to next?
 
 Yes, but let's do only one change to ExternalProject per day so
 we can see how the tests do.

Please take a look at the failure on the continuous test submissions.

 fatal: Couldn't find remote ref origin/master
 fatal: The remote end hung up unexpectedly

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Brad King
On 03/27/2014 02:35 PM, Brad King wrote:
 Please take a look at the failure on the continuous test submissions.
 
  fatal: Couldn't find remote ref origin/master
  fatal: The remote end hung up unexpectedly

Is there a particular version requirement on Git?

Also I just noticed this line:

 +COMMAND \${git_EXECUTABLE}\ stash --all --quiet

That should be stash save --all --quiet because git stash may
some day do nothing without the explicit save command.

-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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [PATCH] cleanup Watcom Windows configuration

2014-03-27 Thread J Decker
On Thu, Mar 27, 2014 at 7:47 AM, Jiri Malak malak.j...@gmail.com wrote:

 I atached patch which cleanup Watcom Windows configuration

 It includes following changes.

 remove Watcom linker caseexact options already defined in linker system
 definition


what do you mean 'defined in linker system definition'?  This option
caseexact was previously not present and had to be added.

Functions 'scale' and 'Scale' would collide and mislink.



 use win_dll system for SHARED_LIBRARY and SHARED_MODULE
 use explicit target definition -bt=.. option for proper initialization of
 compiler Windows
 environment (predefined macros)
 reorganize compiler options to global and configuration specific part
 correct debug related compilers options and linker options
 use -s option to optimize out stack checking code for release version
 --

 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/cgi-bin/mailman/listinfo/cmake-developers

-- 

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/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [PATCH] cleanup Watcom Windows configuration

2014-03-27 Thread Jiri Malak
 On Thu, Mar 27, 2014 at 7:47 AM, Jiri Malak malak.j...@gmail.com wrote:

 I atached patch which cleanup Watcom Windows configuration

 It includes following changes.

 remove Watcom linker caseexact options already defined in linker system
 definition


 what do you mean 'defined in linker system definition'?  This option
 caseexact was previously not present and had to be added.

 Functions 'scale' and 'Scale' would collide and mislink.

If it is not there in this case this option is default and need not be defined.
Generaly if system is used it setup all necesary definition specific to the 
appropriate system.
nt.. systems use case sensitive link.
If you look on script file link.lnk then you can see that only system using 
nocaseexact is Windows
(16-bit).

CASEEXACT is Open Watcom linker default from OW 1.0.

Jiri

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Brad King
On 03/27/2014 02:35 PM, Brad King wrote:
 Please take a look at the failure on the continuous test submissions.
 
  fatal: Couldn't find remote ref origin/master
  fatal: The remote end hung up unexpectedly

I see this fix, thanks:

 ExternalProject: Strip out origin/ from git tag
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40bf640c

 +  if(${git_tag} MATCHES ^origin/(.+)$)
 +set(git_tag ${CMAKE_MATCH_1})
 +  endif()

Until now we made no assumption about the name of the remote.
What guarantee do we have that it is called origin?  Perhaps
instead the logic that sets is_remote_ref can determine the
name of the remote since it checks the refs/remotes namespace.

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Review Request: Topic ExternalProject_GitUpdate

2014-03-27 Thread Daniele E. Domenichelli
On 27/03/14 19:45, Brad King wrote:
 On 03/27/2014 02:35 PM, Brad King wrote:
 Please take a look at the failure on the continuous test submissions.

  fatal: Couldn't find remote ref origin/master
  fatal: The remote end hung up unexpectedly
 
 Is there a particular version requirement on Git?

I don't think so. I believe the problem was the origin/ in the tag. I
just pushed a fix that strips origin/ from the tag to see if this
fixes the tests, but I'm not sure if this is correct, what if the
tag/branch name is actually origin/something?

I think I can do something better by parsing the output of
git show-ref ${git_tag}. I will try later.


 Also I just noticed this line:
 
 +COMMAND \${git_EXECUTABLE}\ stash --all --quiet
 
 That should be stash save --all --quiet because git stash may
 some day do nothing without the explicit save command.

Fixed.


Daniele

-- 

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/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] A goal for a simple Android toolchain file.

2014-03-27 Thread Eric Wing
On 3/26/14, Stephen Kelly steve...@gmail.com wrote:
 Eric Wing wrote:
 I have been using my fork of the Android-CMake (originally from
 OpenCV) that you want to obsolete. My fork contains a lot of fixes to
 deal with more recent NDK updates and more complicated requirements
 that I have.
 https://bitbucket.org/ewing/android-cmake

 It's great to have someone here who is both familiar with cmake and with
 Android!


 It is completely reliant on the Android standalone toolchain
 technique which I vastly dislike,

 Sorry, I don't know what you're referring to. What is a standalone
 toolchain? This:

 https://www.assembla.com/code/android-gb-for-sharp-is01/git/nodes/debug/ndk/docs/STANDALONE-TOOLCHAIN.html

 ?

 It looks like the primary usefulness of that is to avoid the caller having
 to specify the -sysroot. Do I misunderstand? With CMAKE_SYSROOT in CMake
 3.0, and with the platform file I proposed, I don't see what makes that
 standalone toolchain stuff useful.

 Can you explain?


Yes, I think that one. In the docs/ directory of the Android NDK you
download, you can find the file: STANDALONE-TOOLCHAIN.html

As I understand it, it basically copies selected things out of the
Android NDK into another directory with a layout more consistent with
typical distributions so you can more easily use 3rd party tools like
CMake. Since Android overloads things like the architectures, the
compiler, and the standard libraries, each permutation you care about
must be copied out into a separate standalone toolchain instance. This
is one of the things that is annoying about it; depending on Android
NDK version, you may have 4 different compilers, each with 4 different
C++ standard libraries (all of which are not necessarily compatible
with each other). That means 4x4=16 permutations. If you want to
distinguish between dynamic and static linking, then you may need to
multiply by 2.

Additionally, each architecture is a permutation, so you need to
multiply another 2 or 3. Then if you can about specific ARM features
not available on all chips (e.g. NEON), you add a bunch more for that.
(The current Android-CMake toolchain seems to have some settings for
those which I've mostly ignored so far.)

Oh yeah, I think each API version needs its own standalone toolchain.

It also looks like the latest Android NDK (r9d) made some additions/changes.
https://developer.android.com/tools/sdk/ndk/index.html


I think it is theoretically possible to invoke the Android build
process without using the standalone toolchain, but the file/directory
layout doesn't necessarily follow normal conventions. I think the
original Android-CMake toolchain did support this, but somewhere
around the 64-bit toolchain release, things broke pretty badly and I
never got it to work. Android is free to re-arrange things and rename
things and they seem to be emboldened to do so in the non-standalone
toolchain.

Additionally, because things are overloaded, you need to be very
careful about not invoking the wrong options on the toolchain. I am
mostly in middleware, so I need to build libraries that other people
use. This means I am extremely sensitive to ABI issues and things like
dynamic linking of C++ standard libraries or specific architecture
optimizations that are not portable are huge no-no's and I need to
trust what the toolchain is doing.

There was also an alternative Android/CMake toolchain somebody wrote
which I think didn't use the standalone toolchain and I tried to work
with, but I started hitting a lot of the above problems which is what
led me back to the more complicated OpenCV one.


 So while I'm not opposed to a brand new Android toolchain file, I want
 to assert that it needs to be correct and it does need to handle a
 variety of cases. So learn as much as you can from the existing ones.

 My aim is to put the things which should be in a Android.cmake platform file

 shipped with CMake into such a file. Some things belong in such a file, I
 think, and others belong in a toolchain file maintained externally.

 In my fork, I spent a lot of time re-reverse-engineering the
 standard/default Android flags passed to the compiler. OpenCV took too
 many liberties with changing what Android passes normally which
 resulted in unexpected/broken behavior for some of my other projects.
 I think a very conservative, deferential approach should be taken.

 If you can provide details, I think that would be useful.

I wrote some comments in the changelog history in the comments of the
file. My Mercurial history also has some stuff. There are too many
details for me to remember. However, my general conclusion was try to
match watch Android does by default (i.e. same flags). Another example
is, I would defer to using the official stable compiler unless
overridden. I think it is still gcc 4.6, not 4.8. I presume there is a
reasoning behind the one they pick as the default/stable.


 I
 would also like it to understand multiple architectures which would
 also go a