[CMake] linkage order of static libraries and object files (ENABLE_EXPORTS)

2013-11-01 Thread Ivan Sergio Borgonovo
I'm trying to convert an embedded eclipse project to CMake with a
python script.

I reached a point where everything compile as I want, everything get
listed in the linking step but libraries are in the wrong order and
linking fail.

Just reordering the libraries list and running the linking process by
hand produce the right executable.

I want to convert the project in a completely automatic way and I don't
want my python code to get too complicated to understand
inter-libraries dependencies to write smarter CMakeLists.txt files or
to order properly the libraries unless there is a very simple way to do
so. This would be sweet but I don't think there is a simple way.

Eclipse was compiling everything as objects so order of linking was not
important.

I've tried to follow
http://www.cmake.org/Wiki/CMake/Tutorials/Object_Library
I get

CMake Error at cmakedirs.cmake:118 (target_link_libraries):
  Target "serial" of type OBJECT_LIBRARY may not be linked into another
  target.  One may link only to STATIC or SHARED libraries, or to
executables with the ENABLE_EXPORTS property set.
Call Stack (most recent call first):
  CMakeLists.txt:89 (include)

for all libraries

But I can't get rid of the same error even when I add:
add_executable(project main.c)
set_target_properties(project PROPERTIES ENABLE_EXPORTS ON) #<--


-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread J Decker
sorry and I should ask; after reading a bit more context;

why are you using cmake-gui if you have -D's to pass already?

but the macro does allow you to export them to the environment
instead; it doesn't update what was configured though; and actually
most places I use the same macro but without the CACHE STRING option
on the SET().


On Fri, Nov 1, 2013 at 6:41 PM, J Decker  wrote:
>  I have a macro . (maybe it has a horrible name...)
>
> macro( DEFINE_DEFAULT variable default )
> if( NOT DEFINED ${variable} )
>   #message( "variable ${variable} not defined (command line)" )
>   set( ${variable} $ENV{${variable}}  CACHE STRING "no description
> available")
>   if( "${${variable}}" STREQUAL "" )
>set( ${variable} ${default} CACHE STRING "no description available")
>  endif( "${${variable}}" STREQUAL "" )
>endif( NOT DEFINED ${variable} )
> endmacro( DEFINE_DEFAULT variable )
>
>
> usage:
>DEFINE_DEFAULT( SOME_OPTION "c:/path/to/something" )
>
> then you can...
>
> set SOME_OPTION=c:/real/path/to/thing  cmake 
>
> -or-
>
> cmake -DSOME_OPTION=C:/other/path/to/thing 
>
> -or-
>
> cmake-gui 
> (click configure)
> set the option appropriately.
>
>
> On Fri, Nov 1, 2013 at 7:47 AM, physhh .  wrote:
>> I've already searched for a feature like this but was not able to find it.
>> Then i've looked up in the cmake-gui source code but couldn't find anything
>> related.
>>
>> What I'm looking for:
>> If cmake is used directly from the command line, it's possible to pass a
>> bunch of options
>> (http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options). This
>> is nice because with this it's possible to use default settings - even if
>> the cache get deleted. I'm actually really interested in this because it
>> would be possible to set the CMAKE_MODULE_PATH variable via batch file -
>> which is neat for custom find modules in custom locations.
>>
>> My Request:
>> I would like to see a feature which makes it possible to pass command line
>> options to cmake-gui which get forwarded to cmake when it gets called. To
>> make this work the cmake-gui could look for parameters which look like
>> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>>
>> Are there any counter-arguments against this?
>> In my opinion it would make things much cleaner.
>>
>> --
>>
>> 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://www.cmake.org/mailman/listinfo/cmake
--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread J Decker
 I have a macro . (maybe it has a horrible name...)

macro( DEFINE_DEFAULT variable default )
if( NOT DEFINED ${variable} )
  #message( "variable ${variable} not defined (command line)" )
  set( ${variable} $ENV{${variable}}  CACHE STRING "no description
available")
  if( "${${variable}}" STREQUAL "" )
   set( ${variable} ${default} CACHE STRING "no description available")
 endif( "${${variable}}" STREQUAL "" )
   endif( NOT DEFINED ${variable} )
endmacro( DEFINE_DEFAULT variable )


usage:
   DEFINE_DEFAULT( SOME_OPTION "c:/path/to/something" )

then you can...

set SOME_OPTION=c:/real/path/to/thing  cmake 

-or-

cmake -DSOME_OPTION=C:/other/path/to/thing 

-or-

cmake-gui 
(click configure)
set the option appropriately.


On Fri, Nov 1, 2013 at 7:47 AM, physhh .  wrote:
> I've already searched for a feature like this but was not able to find it.
> Then i've looked up in the cmake-gui source code but couldn't find anything
> related.
>
> What I'm looking for:
> If cmake is used directly from the command line, it's possible to pass a
> bunch of options
> (http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options). This
> is nice because with this it's possible to use default settings - even if
> the cache get deleted. I'm actually really interested in this because it
> would be possible to set the CMAKE_MODULE_PATH variable via batch file -
> which is neat for custom find modules in custom locations.
>
> My Request:
> I would like to see a feature which makes it possible to pass command line
> options to cmake-gui which get forwarded to cmake when it gets called. To
> make this work the cmake-gui could look for parameters which look like
> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>
> Are there any counter-arguments against this?
> In my opinion it would make things much cleaner.
>
> --
>
> 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://www.cmake.org/mailman/listinfo/cmake
--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
The question is: What is the expected behavior?

Execute it per configure but don't overwrite variables? What if one really
wants to overwrite?
Execute it once every time the binary directory changes? Changing stuff
only through setting the path is bad.
Other possiblities?


On Sat, Nov 2, 2013 at 12:45 AM, Matthew Woehlke <
matthew.woeh...@kitware.com> wrote:

> On 2013-11-01 19:39, Matthew Woehlke wrote:
>
>> On 2013-11-01 17:35, physhh . wrote:
>>
>>> I've tried to implement it in the same way as CCMake seem to do it.
>>> Because I can't compare it =>
>>> Could somone with access to ccmake test this:
>>> - Start CCMake with -D foo=123
>>> - Configure
>>> - Question: Is foo displayed in the variable list?
>>>
>>
>> Yes.
>>
>>  - Add/Edit foo to some other value
>>> - Configure
>>> - Question: Was foo overwritten with "123"?
>>>
>>
>> Yes. Repeatedly (i.e. if I configure, then change it, it still gets
>> overwritten). And I'm going to have to call that a bug; it's hard to
>> imagine how it is desired behavior.
>>
>
> Reported here: 
> http://public.kitware.com/Bug/**view.php?id=14538
> .
>
>
> --
> Matthew
>
> --
>
> 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://www.cmake.org/mailman/**listinfo/cmake
>
--

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

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke

On 2013-11-01 19:39, Matthew Woehlke wrote:

On 2013-11-01 17:35, physhh . wrote:

I've tried to implement it in the same way as CCMake seem to do it.
Because I can't compare it =>
Could somone with access to ccmake test this:
- Start CCMake with -D foo=123
- Configure
- Question: Is foo displayed in the variable list?


Yes.


- Add/Edit foo to some other value
- Configure
- Question: Was foo overwritten with "123"?


Yes. Repeatedly (i.e. if I configure, then change it, it still gets
overwritten). And I'm going to have to call that a bug; it's hard to
imagine how it is desired behavior.


Reported here: http://public.kitware.com/Bug/view.php?id=14538.

--
Matthew

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke

On 2013-11-01 17:35, physhh . wrote:

I've tried to implement it in the same way as CCMake seem to do it.
Because I can't compare it =>
Could somone with access to ccmake test this:
- Start CCMake with -D foo=123
- Configure
- Question: Is foo displayed in the variable list?


Yes.


- Add/Edit foo to some other value
- Configure
- Question: Was foo overwritten with "123"?


Yes. Repeatedly (i.e. if I configure, then change it, it still gets 
overwritten). And I'm going to have to call that a bug; it's hard to 
imagine how it is desired behavior.


--
Matthew

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
Current patch:
http://pastebin.com/DfGZtGQT


On Fri, Nov 1, 2013 at 10:35 PM, physhh .  wrote:

> I've tried to implement it in the same way as CCMake seem to do it.
> Because I can't compare it =>
> Could somone with access to ccmake test this:
> - Start CCMake with -D foo=123
> - Configure
> - Question: Is foo displayed in the variable list?
> - Add/Edit foo to some other value
> - Configure
> - Question: Was foo overwritten with "123"?
>
> Thanks
>
>
> On Fri, Nov 1, 2013 at 7:02 PM, Matthew Woehlke <
> matthew.woeh...@kitware.com> wrote:
>
>> On 2013-11-01 11:39, physhh . wrote:
>>
>>> that's interesting. I'm currently at a windows only machine so i can't
>>> check out ccmake but can only lookup the source. It appears that ALL
>>> parameters get "forwarded" to cmake - at least that's what
>>>
>>> cmCursesMainForm.cxx:52
>>>
 this->CMakeInstance->SetArgs(**this->Args);

>>>
>>> looks to me.
>>> Why do you think that a simple forward is not enough? ccmake seems to do
>>> it
>>> exactly that way?
>>>
>>
>> I don't know enough of the guts to know how values initially specified in
>> ccmake / cmake-gui get passed to CMake. Where you could get into trouble
>> is, say, you pass -DBOOST_ROOT=/some/ptah, realize you've made a mistake
>> (e.g. 'ptah' -> 'path') and fix it in the gui before running cmake. Now
>> does cmake see the original value or the corrected value?
>>
>> That's where it *might* go sideways. But it might also be perfectly safe
>> to just pass them through, e.g. if the corrected value is passed also as a
>> -D argument later in the list.
>>
>> However, what I was mainly getting at is that cmake-gui should also
>> process the -D, etc., as I am pretty sure ccmake does, so that it can
>> display those values and/or make appropriate use of the arguments.
>>
>>
>> --
>> Matthew
>>
>> --
>>
>> 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://www.cmake.org/mailman/**listinfo/cmake
>>
>
>
--

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

Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Ivan Sergio Borgonovo
On Fri, 1 Nov 2013 20:08:05 +0100
Alexander Neundorf  wrote:

> and the name of the library target ? Still crt0 or something else ?

BTW I'm using 2.8.11.2 in Debian sid

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
I've tried to implement it in the same way as CCMake seem to do it.
Because I can't compare it =>
Could somone with access to ccmake test this:
- Start CCMake with -D foo=123
- Configure
- Question: Is foo displayed in the variable list?
- Add/Edit foo to some other value
- Configure
- Question: Was foo overwritten with "123"?

Thanks


On Fri, Nov 1, 2013 at 7:02 PM, Matthew Woehlke  wrote:

> On 2013-11-01 11:39, physhh . wrote:
>
>> that's interesting. I'm currently at a windows only machine so i can't
>> check out ccmake but can only lookup the source. It appears that ALL
>> parameters get "forwarded" to cmake - at least that's what
>>
>> cmCursesMainForm.cxx:52
>>
>>> this->CMakeInstance->SetArgs(**this->Args);
>>>
>>
>> looks to me.
>> Why do you think that a simple forward is not enough? ccmake seems to do
>> it
>> exactly that way?
>>
>
> I don't know enough of the guts to know how values initially specified in
> ccmake / cmake-gui get passed to CMake. Where you could get into trouble
> is, say, you pass -DBOOST_ROOT=/some/ptah, realize you've made a mistake
> (e.g. 'ptah' -> 'path') and fix it in the gui before running cmake. Now
> does cmake see the original value or the corrected value?
>
> That's where it *might* go sideways. But it might also be perfectly safe
> to just pass them through, e.g. if the corrected value is passed also as a
> -D argument later in the list.
>
> However, what I was mainly getting at is that cmake-gui should also
> process the -D, etc., as I am pretty sure ccmake does, so that it can
> display those values and/or make appropriate use of the arguments.
>
>
> --
> Matthew
>
> --
>
> 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://www.cmake.org/mailman/**listinfo/cmake
>
--

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

Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Ivan Sergio Borgonovo
On Fri, 1 Nov 2013 20:08:05 +0100
Alexander Neundorf  wrote:

> On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> > On Fri, 1 Nov 2013 17:36:33 +0100
> > 
> > Alexander Neundorf  wrote:
> > > > If it was supposed to work right out of the box without fiddling
> > > > with
> > > 
> > > having to set the LANGUAGE is expected for unusual file
> > > extensions. With that, it should work.
> > 
> > That's OK. I just had to understand how.
> > 
> > > Could you try to rename your target "crt0" to something different
> > > and see whether this changes something ?
> > 
> > I renamed the crt0.x file to pino.x.
> > removed add_dependencies() and set_property(...)
> > pino.x get assembled but it doesn't get linked.
 
> and the name of the library target ? Still crt0 or something else ?

Changed too. Everything is generated by a python script that take the
name of the target from the source (+ numbering if needed to avoid
duplicates in targets name).

I just had one file whose name was duplicated and coincidentally it was
an asm file too. 2 exception.x whose targets became exception and
exception1 but both of them were compiled and just 1 linked, since
just one was actually referenced in the rest of the code.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Alexander Neundorf
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> On Fri, 1 Nov 2013 17:36:33 +0100
> 
> Alexander Neundorf  wrote:
> > > If it was supposed to work right out of the box without fiddling
> > > with
> > 
> > having to set the LANGUAGE is expected for unusual file extensions.
> > With that, it should work.
> 
> That's OK. I just had to understand how.
> 
> > Could you try to rename your target "crt0" to something different and
> > see whether this changes something ?
> 
> I renamed the crt0.x file to pino.x.
> removed add_dependencies() and set_property(...)
> pino.x get assembled but it doesn't get linked.

and the name of the library target ? Still crt0 or something else ?

Alex

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke

On 2013-11-01 11:39, physhh . wrote:

that's interesting. I'm currently at a windows only machine so i can't
check out ccmake but can only lookup the source. It appears that ALL
parameters get "forwarded" to cmake - at least that's what

cmCursesMainForm.cxx:52

this->CMakeInstance->SetArgs(this->Args);


looks to me.
Why do you think that a simple forward is not enough? ccmake seems to do it
exactly that way?


I don't know enough of the guts to know how values initially specified 
in ccmake / cmake-gui get passed to CMake. Where you could get into 
trouble is, say, you pass -DBOOST_ROOT=/some/ptah, realize you've made a 
mistake (e.g. 'ptah' -> 'path') and fix it in the gui before running 
cmake. Now does cmake see the original value or the corrected value?


That's where it *might* go sideways. But it might also be perfectly safe 
to just pass them through, e.g. if the corrected value is passed also as 
a -D argument later in the list.


However, what I was mainly getting at is that cmake-gui should also 
process the -D, etc., as I am pretty sure ccmake does, so that it can 
display those values and/or make appropriate use of the arguments.


--
Matthew

--

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


Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Ivan Sergio Borgonovo
On Fri, 1 Nov 2013 17:36:33 +0100
Alexander Neundorf  wrote:

> > If it was supposed to work right out of the box without fiddling
> > with

> having to set the LANGUAGE is expected for unusual file extensions.
> With that, it should work.

That's OK. I just had to understand how.

> Could you try to rename your target "crt0" to something different and
> see whether this changes something ?

I renamed the crt0.x file to pino.x.
removed add_dependencies() and set_property(...)
pino.x get assembled but it doesn't get linked.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
Yes but not all cmake projects which I build are mine. So i would still
have to modify a CMakeLists from someone else, which is in my opinion a bad
thing.
When you have the possiblity to inject cmake stuff without modifying the
project itself you can implement a clean separation between project
dependencies and how/where to find those.


On Fri, Nov 1, 2013 at 5:28 PM, John Drescher  wrote:

> > +1 for updating cmake-gui to work equally to ccmake
> >
> > But my opinion regarding CMAKE_MODULE_PATH is different. The problem is
> that
> > alot of the default find-modules don't work because the dependency is
> not in
> > the location where the find-module expects it. Currently there are only
> two
> > workarounds:
> > - Change the find-module directly so it works in the local environment
> > - Change the CMakeLists.txt of the project - which is bad because it's
> just
> > a LOCAL problem and the CMakeLists should be mostly independent of the
> > environment.
> >
> > With the command-line option it's possible to setup a custom cmake-gui
> batch
> > file once per computer which sets e.g. the CMAKE_MODULE_PATH to a
> directory
> > with customized find modules. If one doesn't want to use custom find
> modules
> > that's fine too but I think everyone should have the option to place
> > dependent libraries wherever she/he wants.
> >
>
> For these kind of things I use environment variables in my
> CMakeLists.txt. If the environment variable is set I use it. If not I
> use the default behavior.
>
> John
>
--

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

Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Alexander Neundorf
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> On Fri, 1 Nov 2013 12:58:32 +0100
> 
> Alexander Neundorf  wrote:
> > On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> > > On Fri, 1 Nov 2013 11:37:10 +0100
> > > 
> > > Alexander Neundorf  wrote:
> > > > so crt0.x is the missing one, right ?
> > > > Are you sure it is not compiled ?
> > > 
> > > Absolutely. Once I've added
> > > add_dependencies(someotherasm crt0.x)
> > > crt0.x got compiled BUT not linked.
> > 
> > Very strange.
> > I'll see whether I can reproduce this.
> 
> If it was supposed to work right out of the box without fiddling with

having to set the LANGUAGE is expected for unusual file extensions.
With that, it should work.

> it I'll try to add some more details and a bunch code sample.
> All the code involved is part of atmel asf[1]
> The 2 files involved are trampoline.x and crt0.x.
> 
> crt0.x define _stext
> 
>   .global _stext
>   .type _stext, @function
> _stext:
> 
> 
> and trampoline.x uses it
> 
> lda.w   pc, _stext
> 
> I've a
> add_library(crt0 crt0.x)
> and a
> target_link_libraries(... crt0)
> 
> But without some help[2] crt0 doesn't get compiled and linked

Could you try to rename your target "crt0" to something different and see 
whether this changes something ?


> [1] I'm working on an older version then the one available on atmel
> site but I think you can get the idea
> 
> [2]
> add_dependencies(trampoline crt0.x)

hmm, this should actually only add dependencies between targets, and crt0.x is 
just a source file, not a target.
So this is strange too.

> make it compile
> set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0)
> make it link


usually a 
target_link_libraries(SAM3 ... crt0 ... )
should do.

Alex
--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread John Drescher
> +1 for updating cmake-gui to work equally to ccmake
>
> But my opinion regarding CMAKE_MODULE_PATH is different. The problem is that
> alot of the default find-modules don't work because the dependency is not in
> the location where the find-module expects it. Currently there are only two
> workarounds:
> - Change the find-module directly so it works in the local environment
> - Change the CMakeLists.txt of the project - which is bad because it's just
> a LOCAL problem and the CMakeLists should be mostly independent of the
> environment.
>
> With the command-line option it's possible to setup a custom cmake-gui batch
> file once per computer which sets e.g. the CMAKE_MODULE_PATH to a directory
> with customized find modules. If one doesn't want to use custom find modules
> that's fine too but I think everyone should have the option to place
> dependent libraries wherever she/he wants.
>

For these kind of things I use environment variables in my
CMakeLists.txt. If the environment variable is set I use it. If not I
use the default behavior.

John
--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
+1 for updating cmake-gui to work equally to ccmake

But my opinion regarding CMAKE_MODULE_PATH is different. The problem is
that alot of the default find-modules don't work because the dependency is
not in the location where the find-module expects it. Currently there are
only two workarounds:
- Change the find-module directly so it works in the local environment
- Change the CMakeLists.txt of the project - which is bad because it's just
a LOCAL problem and the CMakeLists should be mostly independent of the
environment.

With the command-line option it's possible to setup a custom cmake-gui
batch file once per computer which sets e.g. the CMAKE_MODULE_PATH to a
directory with customized find modules. If one doesn't want to use custom
find modules that's fine too but I think everyone should have the option to
place dependent libraries wherever she/he wants.



On Fri, Nov 1, 2013 at 4:56 PM, Bill Hoffman wrote:

> On 11/1/2013 10:47 AM, physhh . wrote:
>
>> If cmake is used directly from the command line, it's possible to pass a
>> bunch of options
>> (http://www.cmake.org/cmake/**help/v2.8.12/cmake.html#**section_Options
>> ).
>> This is nice because with this it's possible to use default settings -
>> even if the cache get deleted. I'm actually really interested in this
>> because it would be possible to set the CMAKE_MODULE_PATH variable via
>> batch file - which is neat for custom find modules in custom locations.
>>
> Branching the topic a bit.
>
> cmake-gui should most likely be updated to take the same arguments that
> ccmake and cmake take.
>
> However, if you are setting CMAKE_MODULE_PATH, the best place to do it is
> in the CMake code of your project.   That way your project will stand on
> its own and not require special command line options to build (which is bad
> IMO).
>
> -Bill
>
>
> --
>
> 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://www.cmake.org/mailman/**listinfo/cmake
>
--

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

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Bill Hoffman

On 11/1/2013 10:47 AM, physhh . wrote:

If cmake is used directly from the command line, it's possible to pass a
bunch of options
(http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options).
This is nice because with this it's possible to use default settings -
even if the cache get deleted. I'm actually really interested in this
because it would be possible to set the CMAKE_MODULE_PATH variable via
batch file - which is neat for custom find modules in custom locations.

Branching the topic a bit.

cmake-gui should most likely be updated to take the same arguments that 
ccmake and cmake take.


However, if you are setting CMAKE_MODULE_PATH, the best place to do it 
is in the CMake code of your project.   That way your project will stand 
on its own and not require special command line options to build (which 
is bad IMO).


-Bill

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
Hey Matthew,

that's interesting. I'm currently at a windows only machine so i can't
check out ccmake but can only lookup the source. It appears that ALL
parameters get "forwarded" to cmake - at least that's what

cmCursesMainForm.cxx:52
> this->CMakeInstance->SetArgs(this->Args);

looks to me.
Why do you think that a simple forward is not enough? ccmake seems to do it
exactly that way?


On Fri, Nov 1, 2013 at 4:12 PM, Matthew Woehlke  wrote:

> On 2013-11-01 10:47, physhh . wrote:
>
>> What I'm looking for:
>> If cmake is used directly from the command line, it's possible to pass a
>> bunch of options. This is nice because with this it's possible to use
>>
>> default settings - even if the cache get deleted.
>>
>
> ccmake accepts e.g. -D options to set CMake cache variables. It... does
> appear that cmake-gui does not. That seems like a bug (or at least a
> missing feature that one would naturally expect to exist).
>
>
>  I would like to see a feature which makes it possible to pass command line
>> options to cmake-gui which get forwarded to cmake when it gets called. To
>> make this work the cmake-gui could look for parameters which look like
>> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>>
>
> I'm not sure a "forward" option makes sense... what would it mean to
> "forward" e.g. -P or -E?
>
> Rather, I think cmake-gui should just accept directly those options that
> make sense, e.g. -D, -U, -C, -G, -T and probably -W[no-]dev, the same way
> that ccmake does. (Besides, these should affect cmake-gui even before cmake
> is invoked, so merely forwarding them is actually insufficient.)


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

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

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Matthew Woehlke

On 2013-11-01 10:47, physhh . wrote:

What I'm looking for:
If cmake is used directly from the command line, it's possible to pass a
bunch of options. This is nice because with this it's possible to use
default settings - even if the cache get deleted.


ccmake accepts e.g. -D options to set CMake cache variables. It... does 
appear that cmake-gui does not. That seems like a bug (or at least a 
missing feature that one would naturally expect to exist).



I would like to see a feature which makes it possible to pass command line
options to cmake-gui which get forwarded to cmake when it gets called. To
make this work the cmake-gui could look for parameters which look like
"forward-*" (where the * is a cmake option name) and pass it to cmake.


I'm not sure a "forward" option makes sense... what would it mean to 
"forward" e.g. -P or -E?


Rather, I think cmake-gui should just accept directly those options that 
make sense, e.g. -D, -U, -C, -G, -T and probably -W[no-]dev, the same 
way that ccmake does. (Besides, these should affect cmake-gui even 
before cmake is invoked, so merely forwarding them is actually 
insufficient.)


--
Matthew

--

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


Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Jean-Christophe Fillion-Robin
Hi,

More specifically, it could be an entry named "More Options ..." in the
already available "Options" menu. Or you could simply expose more command
line option directly in that menu.

Jc


On Fri, Nov 1, 2013 at 11:05 AM, physhh .  wrote:

> Hi Jean,
> I'm not quite sure I've understood your feedback correctly. You mean it
> would be nice to add a panel to the gui which lists all forwarded options
> with description text?
>
> Will try to create a patch for this.
>
> Thanks for your time
>
>
> On Fri, Nov 1, 2013 at 3:52 PM, Jean-Christophe Fillion-Robin <
> jchris.filli...@kitware.com> wrote:
>
>> Hi Physhh,
>>
>> I like the idea. Instead, a gui panel (with tooltips, doc, ...) should be
>> autogenerated from the option associated to the corresponding cmake
>> executable.
>>
>> Would be happy to review changes / patches.
>>
>> Thanks
>> Jc
>>
>>
>> On Fri, Nov 1, 2013 at 10:47 AM, physhh .  wrote:
>>
>>> I've already searched for a feature like this but was not able to find
>>> it. Then i've looked up in the cmake-gui source code but couldn't find
>>> anything related.
>>>
>>> What I'm looking for:
>>> If cmake is used directly from the command line, it's possible to pass a
>>> bunch of options (
>>> http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options).
>>> This is nice because with this it's possible to use default settings - even
>>> if the cache get deleted. I'm actually really interested in this because it
>>> would be possible to set the CMAKE_MODULE_PATH variable via batch file -
>>> which is neat for custom find modules in custom locations.
>>>
>>> My Request:
>>> I would like to see a feature which makes it possible to pass command
>>> line options to cmake-gui which get forwarded to cmake when it gets called.
>>> To make this work the cmake-gui could look for parameters which look like
>>> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>>>
>>> Are there any counter-arguments against this?
>>> In my opinion it would make things much cleaner.
>>>
>>> --
>>>
>>> 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://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>>
>>
>> --
>> +1 919 869 8849
>>
>
>


-- 
+1 919 869 8849
--

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

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
Hi Jean,
I'm not quite sure I've understood your feedback correctly. You mean it
would be nice to add a panel to the gui which lists all forwarded options
with description text?

Will try to create a patch for this.

Thanks for your time


On Fri, Nov 1, 2013 at 3:52 PM, Jean-Christophe Fillion-Robin <
jchris.filli...@kitware.com> wrote:

> Hi Physhh,
>
> I like the idea. Instead, a gui panel (with tooltips, doc, ...) should be
> autogenerated from the option associated to the corresponding cmake
> executable.
>
> Would be happy to review changes / patches.
>
> Thanks
> Jc
>
>
> On Fri, Nov 1, 2013 at 10:47 AM, physhh .  wrote:
>
>> I've already searched for a feature like this but was not able to find
>> it. Then i've looked up in the cmake-gui source code but couldn't find
>> anything related.
>>
>> What I'm looking for:
>> If cmake is used directly from the command line, it's possible to pass a
>> bunch of options (
>> http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options).
>> This is nice because with this it's possible to use default settings - even
>> if the cache get deleted. I'm actually really interested in this because it
>> would be possible to set the CMAKE_MODULE_PATH variable via batch file -
>> which is neat for custom find modules in custom locations.
>>
>> My Request:
>> I would like to see a feature which makes it possible to pass command
>> line options to cmake-gui which get forwarded to cmake when it gets called.
>> To make this work the cmake-gui could look for parameters which look like
>> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>>
>> Are there any counter-arguments against this?
>> In my opinion it would make things much cleaner.
>>
>> --
>>
>> 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://www.cmake.org/mailman/listinfo/cmake
>>
>
>
>
> --
> +1 919 869 8849
>
--

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

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread Jean-Christophe Fillion-Robin
Hi Physhh,

I like the idea. Instead, a gui panel (with tooltips, doc, ...) should be
autogenerated from the option associated to the corresponding cmake
executable.

Would be happy to review changes / patches.

Thanks
Jc


On Fri, Nov 1, 2013 at 10:47 AM, physhh .  wrote:

> I've already searched for a feature like this but was not able to find it.
> Then i've looked up in the cmake-gui source code but couldn't find anything
> related.
>
> What I'm looking for:
> If cmake is used directly from the command line, it's possible to pass a
> bunch of options (
> http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options). This
> is nice because with this it's possible to use default settings - even if
> the cache get deleted. I'm actually really interested in this because it
> would be possible to set the CMAKE_MODULE_PATH variable via batch file -
> which is neat for custom find modules in custom locations.
>
> My Request:
> I would like to see a feature which makes it possible to pass command line
> options to cmake-gui which get forwarded to cmake when it gets called. To
> make this work the cmake-gui could look for parameters which look like
> "forward-*" (where the * is a cmake option name) and pass it to cmake.
>
> Are there any counter-arguments against this?
> In my opinion it would make things much cleaner.
>
> --
>
> 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://www.cmake.org/mailman/listinfo/cmake
>



-- 
+1 919 869 8849
--

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

[CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread physhh .
I've already searched for a feature like this but was not able to find it.
Then i've looked up in the cmake-gui source code but couldn't find anything
related.

What I'm looking for:
If cmake is used directly from the command line, it's possible to pass a
bunch of options (
http://www.cmake.org/cmake/help/v2.8.12/cmake.html#section_Options). This
is nice because with this it's possible to use default settings - even if
the cache get deleted. I'm actually really interested in this because it
would be possible to set the CMAKE_MODULE_PATH variable via batch file -
which is neat for custom find modules in custom locations.

My Request:
I would like to see a feature which makes it possible to pass command line
options to cmake-gui which get forwarded to cmake when it gets called. To
make this work the cmake-gui could look for parameters which look like
"forward-*" (where the * is a cmake option name) and pass it to cmake.

Are there any counter-arguments against this?
In my opinion it would make things much cleaner.
--

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

Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Ivan Sergio Borgonovo
On Fri, 1 Nov 2013 12:58:32 +0100
Alexander Neundorf  wrote:

> On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> > On Fri, 1 Nov 2013 11:37:10 +0100
> > 
> > Alexander Neundorf  wrote:
> > > so crt0.x is the missing one, right ?
> > > Are you sure it is not compiled ?
> > 
> > Absolutely. Once I've added
> > add_dependencies(someotherasm crt0.x)
> > crt0.x got compiled BUT not linked.
> 
> Very strange.
> I'll see whether I can reproduce this.

If it was supposed to work right out of the box without fiddling with
it I'll try to add some more details and a bunch code sample.
All the code involved is part of atmel asf[1]
The 2 files involved are trampoline.x and crt0.x.

crt0.x define _stext

  .global _stext
  .type _stext, @function
_stext:


and trampoline.x uses it

lda.w   pc, _stext

I've a
add_library(crt0 crt0.x)
and a
target_link_libraries(... crt0)

But without some help[2] crt0 doesn't get compiled and linked

[1] I'm working on an older version then the one available on atmel
site but I think you can get the idea

[2]
add_dependencies(trampoline crt0.x)
make it compile
set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0)
make it link

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Alexander Neundorf
On Friday 01 November 2013, Ivan Sergio Borgonovo wrote:
> On Fri, 1 Nov 2013 11:37:10 +0100
> 
> Alexander Neundorf  wrote:
> > so crt0.x is the missing one, right ?
> > Are you sure it is not compiled ?
> 
> Absolutely. Once I've added
> add_dependencies(someotherasm crt0.x)
> crt0.x got compiled BUT not linked.

Very strange.
I'll see whether I can reproduce this.

Alex
--

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


[CMake] does cmake get dependencies between asm files? and when said so does it link them?

2013-11-01 Thread Ivan Sergio Borgonovo
On Fri, 1 Nov 2013 11:37:10 +0100
Alexander Neundorf  wrote:

> so crt0.x is the missing one, right ?
> Are you sure it is not compiled ?

Absolutely. Once I've added
add_dependencies(someotherasm crt0.x)
crt0.x got compiled BUT not linked.

But even after I succede to compile libcrt0.a and even if crt0 was
included in the target_link_libraries() list it was missing from the
list of the actually linked libraries.
That mean I had a libcrt0.a but cmake was running gcc without it in the
list of libraries to link.

I finally found a way to force cmake to link it adding 
set_property(TARGET SAM3 APPEND PROPERTY LINK_LIBRARIES crt0)
after target_link_libraries().

I don't know if this is the best way to do it but it works.

Anyway I ran into a new list of problems I'm still investigating.

So as for the

"how to make cmake recognize different asm extension"

and the

"how to force cmake to compile and link asm files when it seems it
can't get dependencies right"

the problem seems solved

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it

--

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


Re: [CMake] assembler with non standard extension with gcc compiler

2013-11-01 Thread Alexander Neundorf
On Thursday 31 October 2013, Ivan Sergio Borgonovo wrote:
> On Thu, 31 Oct 2013 21:17:11 +0100
> 
> Alexander Neundorf  wrote:
> > On Thursday 31 October 2013, Ivan Sergio Borgonovo wrote:
> > > On Thu, 31 Oct 2013 18:01:29 +0100
> > > 
> > > Alexander Neundorf  wrote:
> > > > Did you try setting the source file property "LANGUAGE" to "ASM"
> > > > for these files ?
> > > > http://www.cmake.org/cmake/help/v2.8.12/cmake.html#prop_sf:LANGUAGE
> > > 
> > > Thanks, that made the trick but I ran into another problem:
> > > 
> > > One of those asm file is somehow being ignored by cmake.
> > > 
> > > I can find the right commands greping in the build dir but they are
> > 
> > > not executed during make:
> > can you post a bit more from your cmake files, or maybe a complete
> > minimal example ?
> 
> It was automatically generated by a python script.
> The schema is:
> 
> main CMakeLists.txt
> 
> [list of include_directories()]
> 
> [list of add_subdirectory()]
> 
> add_executable(project main.c)
> 
> target_link_libraries(project [list of targets])
> 
> In each dir I've a CMakeLists.txt consisting of:
> 
> add_library(target STATIC source)
> # for asm source only:
> set_source_files_properties(source PROPERTIES LANGUAGE ASM)
> SET_TARGET_PROPERTIES(target PROPERTIES LINKER_LANGUAGE ASM)
> 
> All asm files get compiled and linked with the exception of one.
> 
> The only difference I can spot is that others contains global symbols
> that are referenced in C files[1] or in the linker options[2] while the
> only one that doesn't get compiled and linked contains symbols that are
> referenced just in another ASM file[3].


so crt0.x is the missing one, right ?
Are you sure it is not compiled ?
(let's just use "compile" although an assembler file is not actually 
"compiled")

Or is just the symbol missing when linking ?

If crt0.x is listed as a source file, I see no reason why this one file should 
not be compiled.

I would guess that it is compiled, but the object file is not included by the 
linker because nobody else references anything from it.

Can you post the complete linker command ?

Alex
--

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