>> Exists some rules for tempary variables names used in scripts?
>
> There is no official rule but the convention has tended to be
> a leading "_" for internal variables. For those that have fully
> local scope (i.e. not across files or functions) use all lower
> case names.
>
> In this case I think we agree that the scope will be local to
> InstallRequiredSystemLibraries.
>
> Thanks,
> -Brad
>
Brad,
I enclosed new updated version of patch.
It contains change of InstallRequiredSystemLibraries only.
Regards
Jiri
>From 806a6dee73fe919c41184ab526f3109cb46a0bef Mon Sep 17 00:00:00 2001
From: Jiri Malak <[email protected]>
Date: Mon, 3 Mar 2014 21:36:09 +0100
Subject: [PATCH] Remove hard coded version of RTDLL for Open Watcom
Version number for RTDLL can be calculated from compiler version.
Code will be working properly with any new version of OW without
need any code change.
---
Modules/InstallRequiredSystemLibraries.cmake | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/Modules/InstallRequiredSystemLibraries.cmake b/Modules/InstallRequiredSystemLibraries.cmake
index 013a028..92b4343 100644
--- a/Modules/InstallRequiredSystemLibraries.cmake
+++ b/Modules/InstallRequiredSystemLibraries.cmake
@@ -366,18 +366,22 @@ endif()
if(WATCOM)
get_filename_component( CompilerPath ${CMAKE_C_COMPILER} PATH )
- if(WATCOM17)
- set( __install__libs ${CompilerPath}/clbr17.dll
- ${CompilerPath}/mt7r17.dll ${CompilerPath}/plbr17.dll )
- endif()
- if(WATCOM18)
- set( __install__libs ${CompilerPath}/clbr18.dll
- ${CompilerPath}/mt7r18.dll ${CompilerPath}/plbr18.dll )
+ if(CMAKE_C_COMPILER_VERSION)
+ set(_compiler_version ${CMAKE_C_COMPILER_VERSION})
+ else()
+ set(_compiler_version ${CMAKE_CXX_COMPILER_VERSION})
endif()
- if(WATCOM19)
- set( __install__libs ${CompilerPath}/clbr19.dll
- ${CompilerPath}/mt7r19.dll ${CompilerPath}/plbr19.dll )
+ string(REGEX MATCHALL "[0-9]+" _watcom_version_list "${_compiler_version}")
+ list(GET _watcom_version_list 0 _watcom_major)
+ list(GET _watcom_version_list 1 _watcom_minor)
+ if(${_watcom_major} > 11)
+ set(_watcom_major ${_watcom_major} - 11)
endif()
+ set(_watcom_minor ${_watcom_minor} / 10)
+ set( __install__libs
+ ${CompilerPath}/clbr${_watcom_major}${_watcom_minor}.dll
+ ${CompilerPath}/mt7r${_watcom_major}${_watcom_minor}.dll
+ ${CompilerPath}/plbr${_watcom_major}${_watcom_minor}.dll )
foreach(lib
${__install__libs}
)
--
1.8.1.4--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers