Re: [CMake] Bug fix requests for the *next* release of CMake...

2012-01-16 Thread Abdelrazak Younes
http://public.kitware.com/Bug/view.php?id=12614

Even though this is not a bug fix... :-)

Thanks and regards,
Abdel.

-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
David Cole
Sent: Monday, January 02, 2012 6:12 PM
To: cmake
Subject: [CMake] Bug fix requests for the *next* release of CMake...

Hi all,

Replies requested. Short replies only. Read on. Just a short reply
with bug numbers or links to the bugs is all we need here. Please move
specific discussions into the bugs themselves or start a new thread to
talk about it... Replies on this thread should just be a collector for
bug numbers.

Example one-line reply:

  http://public.kitware.com/Bug/view.php?id=12647

We are aiming for quarterly releases from now on, scheduling them
every 3 months. That would make the next release of CMake version
2.8.8, scheduled to have an "rc1" release candidate on Wed. March 7,
2012 -- just 9 weeks from this Wednesday.

If you have a particular issue that you think should be fixed for
inclusion in 2.8.8, please bring it up within the next two weeks.
Ideally, each issue will be discussed as needed on the mailing list to
come to any consensus about what should be done to fix it, and then an
entry in the bug tracker may be used to keep it on the radar screen,
and to track activity related to it. You can see what's on the roadmap
for this release here:
http://public.kitware.com/Bug/roadmap_page.php?version_id=90

Patches are always welcome. Patches that include testing of any new
features, or tests that prove a bug is really fixed on the dashboards,
basically any patch with testing is preferred over a patch with no
testing. Also, if you are *adding* code, then you also probably need
to add *tests* of that code, so that the coverage percentage stays as
is or rises.

Please discuss issues here as needed, and add notes to existing issues
in the bug tracker that you are interested in seeing fixed -- we will
be looking at the mailing list and activity in the bug tracker to help
prioritize the bug fixes that will occur in the near future.


Thanks,
David Cole
Kitware, Inc.


P.S. - as a nice summary of what we accomplished in the CMake 2.8.7
release, see here:
http://public.kitware.com/Bug/changelog_page.php?version_id=89
-- it currently lists 43 issues that we resolved: nice job, everybody!

(Many of those were specifically addressed because somebody brought it
up in response to my similar email from just after the last release...
Don't be shy!)
--

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://www.cmake.org/mailman/listinfo/cmake
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of 
David Cole

>On Thu, Dec 22, 2011 at 6:10 AM, Rolf Eike Beer  wrote:
>>> Am Donnerstag 22 Dezember 2011, 02:23:00 schrieb Abdelrazak Younes:
>>> > > It would be nice if this work could be integrated in next release of
>>> > > CMake.>
>>> > I'll have a look.
>>> > It would be 2.8.8, 2.8.7 is basically done now.
>>>
>>> So, as 2.8.8 would be probably in more than 6 months, we'll have to find out
>>> how to patch installed version of cmake... Or we can switch to the git
>>> repo... Actually, I just cloned the cmake repo, but I only see the "master"
>>> branch in there. If I wanted to maintain our RVDS port, which branch should
>>> I track?
>>
>> Master is the best idea to use. Any patches that should be merged have to 
>> made
>> against master, and master is that stuff that will show up in the next stable
>> version.

OK, thanks.

> Just as an FYI: We will be producing the final CMake 2.8.7 next week,
> and we will plan to produce the next one (presumably 2.8.8) at the end
> of March, 2012. We have been, on average, releasing CMake every
> quarter for the last year and a half now. The future is never firmly
> predictable, but we will do our best to stick to a release every 3
> months.

Good to know, thanks.
Abdel.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-22 Thread Abdelrazak Younes
-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Wednesday, December 21, 2011 9:41 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

> > On Wednesday 21 December 2011, Abdelrazak Younes wrote:
> > Hi Alexander,
> > 
> > Just wanted to let you know that, thanks to your assistance, we did some
> > more work on this. Please refer to the issue:
> > 
> > http://public.kitware.com/Bug/view.php?id=12614
> > 
> > It would be nice if this work could be integrated in next release of CMake.
>
> I'll have a look.
> It would be 2.8.8, 2.8.7 is basically done now.

So, as 2.8.8 would be probably in more than 6 months, we'll have to find out 
how to patch installed version of cmake... Or we can switch to the git repo... 
Actually, I just cloned the cmake repo, but I only see the "master" branch in 
there. If I wanted to maintain our RVDS port, which branch should I track?

Thanks,
Abdel.

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-21 Thread Abdelrazak Younes
Hi Alexander,

Just wanted to let you know that, thanks to your assistance, we did some more 
work on this. Please refer to the issue:

http://public.kitware.com/Bug/view.php?id=12614

It would be nice if this work could be integrated in next release of CMake.

Cheers,
Abdel.


-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Thursday, December 08, 2011 9:24 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

On Thursday 08 December 2011, Abdelrazak Younes wrote:
> Hello,
> 
> We (MARVELL Switzerland) have created some CMake support files in order to
> use RVDS 4.1 ARM C/C++ and ASM compilers.

Cool !
I mean, this is really cool ! :-)

Can you please create a ticket for this on 
http://public.kitware.com/Bug/my_view_page.php
, basically with the content of this email ?
This way it is ensured that it won't get lost or forgotten.

Some comments:

Setting all the CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables in the toolchain 
file should not be necessary.

It should be enough to only set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
Then cmake tries to compile a small executable with it, and tries to detect 
the compiler, see Modules/CMakeCCompilerID.c.in.
Probably there is a macro builtin into this compiler to detect that it is the 
RVDS compiler ?
The cmake compiler ID could then be named "RVDS".

Then cmake executes Modules/CMakeFindBinUtils.cmake.
If the compiler ID has been determined successfully, you can change this file 
so that if the compiler ID is RVDS, it looks for "armar" instead of ar.

Then, once it has detected this "compiler id", it can load 
Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also the 
variables for linking etc.


Thanks a lot :-)
Alex
--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes
-Original Message-
From: Abdelrazak Younes 
> So now I will try to remove CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables
> and modify Modules/CMakeFindBinUtils.cmake; I hope I can use a local copy
> for this file.

It seems I can use a local copy of it as I got a warning about that (see 
below). So I modified my local copy with the diff below but it doesn't work, 
/usr/bin/ar is still used. One additional question: armar is apparently doing 
the job of ar and ranlib so I don't want ranlib to be used afterwards so please 
tell me how to avoid that.

Cheers,
Abdel.

The diff:

diff -u /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake 
../cmake/Modules/CMakeFindBinUtils.cmake 
--- /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake2011-07-08 
14:21:44.0 +0200
+++ ../cmake/Modules/CMakeFindBinUtils.cmake2011-12-09 10:32:04.049725221 
+0100
@@ -38,8 +38,13 @@
 
   MARK_AS_ADVANCED(CMAKE_LINKER)
 
+ELSEIF("${CMAKE_CXX_COMPILER_ID}" MATCHES "RVDS"
+   OR "${CMAKE_C_COMPILER_ID}" MATCHES "RVDS")
+
+  FIND_PROGRAM(CMAKE_AR NAMES armar HINTS ${_CMAKE_TOOLCHAIN_LOCATION})
+
 # in all other cases search for ar, ranlib, etc.
 ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC" 
 ELSE("${CMAKE_CXX_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_C_COMPILER_ID}" MATCHES "MSVC"
OR "${CMAKE_GENERATOR}" MATCHES "Visual Studio")
 

The cmake call with the warning:

cmake ../src -Drvds=1 -Dfirmware=$2 
-DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxRvdsToolchain.cmake
-- The C compiler identification is RVDS
-- The CXX compiler identification is unknown
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Compiling for ARM platform
-- The ASM-RVDS compiler identification is unknown
CMake Warning (dev) at 
/usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake:156 (INCLUDE):
  File /usr/share/cmake-2.8/Modules/CMakeDetermineASMCompiler.cmake includes
  /src/../cmake/Modules/CMakeFindBinUtils.cmake
  (found via CMAKE_MODULE_PATH) which shadows
  /usr/share/cmake-2.8/Modules/CMakeFindBinUtils.cmake.  This may cause
  errors later on .

  Policy CMP0017 is not set: Prefer files from the CMake module directory
  when including from there.  Run "cmake --help-policy CMP0017" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.
Call Stack (most recent call first):
  /cmake/Modules/CMakeDetermineASM-RVDSCompiler.cmake:3 (INCLUDE)
  /CMakeLists.txt:5 (enable_language)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found assembler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armasm
-- Configuring done
-- Generating done
-- Build files have been written to: xxx

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes

-Original Message-
From: Abdelrazak Younes 
> # The cmake compiler ID could then be named "RVDS".
> #
> # Then cmake executes Modules/CMakeFindBinUtils.cmake.
> # If the compiler ID has been determined successfully, you can change this 
> file 
> # so that if the compiler ID is RVDS, it looks for "armar" instead of ar.
> #
> # Then, once it has detected this "compiler id", it can load 
> # Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also 
> the 
> # variables for linking etc.
>
> OK, so shall I make a local copy of Modules/CMakeCCompilerID.c.in and modify
> that? I mean, would this copy take precedence if I add the local > > Module
> path like this:
> set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake/Modules" 
> ${CMAKE_MODULE_PATH})

It doesn't work with the local copy unfortunately... but it works with the 
modified installed version in /usr/share/cmake-2.8/Modules:

cmake ../src -Drvds=1 -Dfirmware=$2 
-DCMAKE_TOOLCHAIN_FILE=../cmake/LinuxRvdsToolchain.cmake
-- The C compiler identification is RVDS
-- The CXX compiler identification is unknown
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working C compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc
-- Check for working CXX compiler: 
/opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armcc -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
Compiling for ARM platform
-- The ASM-RVDS compiler identification is unknown
-- Found assembler: /opt/ARM/RVCT/Programs/4.1/462/linux-pentium/armasm
-- Configuring done
-- Generating done
-- Build files have been written to: 

I have used the __ARMCC_VERSION macro (see patch below).

So now I will try to remove CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables and 
modify Modules/CMakeFindBinUtils.cmake; I hope I can use a local copy for this 
file.

Cheers,
Abdel.

--- /usr/share/cmake-2.8/Modules/CMakeCCompilerId.c.in.original 2011-07-08 
14:21:44.0 +0200
+++ /usr/share/cmake-2.8/Modules/CMakeCCompilerId.c.in  2011-12-09 
09:57:49.565830358 +0100
@@ -85,6 +85,9 @@
 #elif defined(__hpux) || defined(__hpua)
 # define COMPILER_ID "HP"
 
+#elif defined(__ARMCC_VERSION)
+# define COMPILER_ID "RVDS"
+
 #else /* unknown compiler */
 # define COMPILER_ID "" 

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-09 Thread Abdelrazak Younes
Hi Alex,

Thanks for the quick reply.

I am using Outlook so I cannot reply inline easily, please bear with me. I will 
prefix your answer with '#'

-Original Message-
From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net] 
Sent: Thursday, December 08, 2011 9:24 PM
To: cmake@cmake.org
Cc: Abdelrazak Younes
Subject: Re: [CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

On Thursday 08 December 2011, Abdelrazak Younes wrote:
> Hello,
> 
> We (MARVELL Switzerland) have created some CMake support files in order to
> use RVDS 4.1 ARM C/C++ and ASM compilers.

# Cool !
# I mean, this is really cool ! :-)

I am very glad that you like it :-)

# Can you please create a ticket for this on 
# http://public.kitware.com/Bug/my_view_page.php
#, basically with the content of this email ?
# This way it is ensured that it won't get lost or forgotten.

Done:

http://public.kitware.com/Bug/view.php?id=12614

# Setting all the CMAKE_(C|CXX)_CREATE_* and ARCHIVE variables in the toolchain 
# file should not be necessary.
# 
# It should be enough to only set CMAKE_C_COMPILER and CMAKE_CXX_COMPILER.
# Then cmake tries to compile a small executable with it, and tries to detect 
# the compiler, see Modules/CMakeCCompilerID.c.in.
# Probably there is a macro builtin into this compiler to detect that it is the 
# RVDS compiler ?

Yes, see here:

http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0041c/Babbacdb.html

So I guess I can either use __arm or __ARMCC_VERSION

# The cmake compiler ID could then be named "RVDS".
#
# Then cmake executes Modules/CMakeFindBinUtils.cmake.
# If the compiler ID has been determined successfully, you can change this file 
# so that if the compiler ID is RVDS, it looks for "armar" instead of ar.
#
# Then, once it has detected this "compiler id", it can load 
# Modules/Compiler/RVDS-C.cmake and RVDS-CXX.cmake. There you can put also the 
# variables for linking etc.

OK, so shall I make a local copy of Modules/CMakeCCompilerID.c.in and modify 
that? I mean, would this copy take precedence if I add the local Module path 
like this:

  set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../cmake/Modules" 
${CMAKE_MODULE_PATH})

# Thanks a lot :-)

And thanks to you for your support.

Cheers,
Abdel.

--

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://www.cmake.org/mailman/listinfo/cmake


[CMake] Support for RVDS 4.1: ARM C/C++ and ASM compilers.

2011-12-08 Thread Abdelrazak Younes
Hello,

We (MARVELL Switzerland) have created some CMake support files in order to use 
RVDS 4.1 ARM C/C++ and ASM compilers.

What works:

* The ASM compilation works just fine, except for , we don't know how to 
use that so we just hardcoded the flags in the CMakeASM-RVDSInformation.cmake 
file.

* The C and C++ compilation and static libraries generation work with one 
caveat: we hardcoded "armar" in CMAKE_C_CREATE_STATIC_LIBRARY and 
CMAKE_CXX_CREATE_STATIC_LIBRARY because setting CMAKE_AR doesn't work for us.

What doesn't work:

* We cannot use armcc for linking because we need to  use a scatter file for 
memory and this requires using armlink. Unfortunately, setting 
CMAKE_CXX_LINK_EXECUTABLE doesn't work for us because:
1) we did not find how to set the arguments of armlink correctly
2) armlink requires an object file as first input, giving only static libraries 
doesn't work

So, as a workaround, we install our static libraries in a dedicated "archive" 
folder and we use a build script for the final linking step thanks to a custom 
target:

  file(GLOB archives ${CMAKE_BINARY_DIR}/archive/*.a)

  add_custom_target(fw ${CMAKE_SOURCE_DIR}/../cmake/link.sh ${CMAKE_BINARY_DIR} 
${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/archive)

I also attach our build script for reference.

This works for us but obviously is far from optimal. So we are contributing 
this in the hope that it is useful to you and also that it can be improved. If 
some CMake developer can help us improve this, we would be happy to test and 
help of course.

Thanks in advance and regards,
Abdel

Abdelrazak Younes | Marvell Switzerland SARL - Etoy
Office +41 21 821 0086 | Fax +41 21 612 8052 | 
ayou...@marvell.com<mailto:ayou...@marvell.com>
M A R V E L L   | www.marvell.com<http://www.marvell.com/>



build.sh
Description: build.sh


link.sh
Description: link.sh


LinuxRvdsToolchain.cmake
Description: LinuxRvdsToolchain.cmake


CMakeASM-RVDSInformation.cmake
Description: CMakeASM-RVDSInformation.cmake


CMakeTestASM-RVDSCompiler.cmake
Description: CMakeTestASM-RVDSCompiler.cmake


CMakeDetermineASM-RVDSCompiler.cmake
Description: CMakeDetermineASM-RVDSCompiler.cmake
--

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://www.cmake.org/mailman/listinfo/cmake