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

2014-04-02 Thread Brad King
On 04/01/2014 03:26 PM, Jiri Malak wrote:
 I enclosed updated patch, based to current master.

Applied, thanks:

 Watcom: Cleanup Windows-wcl386 configuration
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e22b23c

I verified by local testing that even without caseexact the
symbols are still case sensitive.

-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-04-01 Thread Jiri Malak
 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


Hi Brad,

I enclosed updated patch, based to current master.

Regards

Jiri

From 9c9176806df26e5a7f6c9e839091434af3cbec0b Mon Sep 17 00:00:00 2001
From: Jiri Malak malak.j...@gmail.com
Date: Tue, 1 Apr 2014 21:20:41 +0200
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 | 50 +++
 1 file changed, 27 insertions(+), 23 deletions(-)

diff --git a/Modules/Platform/Windows-wcl386.cmake 
b/Modules/Platform/Windows-wcl386.cmake
index 617761b..72a5929 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,18 +28,18 @@ 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_WATCOM_QUOTE 1)
@@ -49,29 +51,29 @@ set(CMAKE_C_CREATE_IMPORT_LIBRARY
 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})
+CMAKE_CXX_COMPILER ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} FLAGS 
-d+ DEFINES -foOBJECT -c -cc++ SOURCE${CMAKE_END_TEMP_FILE})
 
 # compile a C file into an object file
 set(CMAKE_C_COMPILE_OBJECT
-CMAKE_C_COMPILER ${CMAKE_START_TEMP_FILE} ${CMAKE_WCL_QUIET} FLAGS 
-dWIN32 -d+ DEFINES -foOBJECT -c -cc 

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