Relative Paths for CMakeLists.txt ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
tty
Reply | Threaded
Open this post in threaded view
|

Relative Paths for CMakeLists.txt ?

tty
 
Hi Pharo team.

I just learned that the generators in CMakeVMMaker do not produce a relative path. I learned this when I attempted to build a generated CMakeConfiguration  on a SunOS partition where my build path is not the same as my Linux partition's.

Have you guys had to deal with this?

I have done some lite browsing on the topic, but wanted to check with you first.


thx.

tty

Reply | Threaded
Open this post in threaded view
|

Re: Relative Paths for CMakeLists.txt ?

Holger Freyther
 
On Mon, May 26, 2014 at 03:04:18PM -0700, gettimothy wrote:
>  

> I just learned that the generators in CMakeVMMaker do not produce a relative path. I learned this when I attempted to build a generated CMakeConfiguration  on a SunOS partition where my build path is not the same as my Linux partition's.
>
>
> Have you guys had to deal with this?

sure, in a similar way to you. Generate the VM on Linux, build it on
a FreeBSD system. And later to create proper debian source packages.

Check here[1] for my various changes to CMakeVMMaker. From my point
of view it is unfortunate that the generated CMakeLists.txt is using
absolute paths and that the platform differences are handled inside
CMakeVMMaker and not inside CMakeLists.txt.

cheers
        holger


[1] http://smalltalkhub.com/#!/~hfreyther2/sctp/versions/
Reply | Threaded
Open this post in threaded view
|

Re: Relative Paths for CMakeLists.txt ?

EstebanLM


On 27 May 2014, at 05:11, Holger Hans Peter Freyther <[hidden email]> wrote:

>
> On Mon, May 26, 2014 at 03:04:18PM -0700, gettimothy wrote:
>>
>
>> I just learned that the generators in CMakeVMMaker do not produce a relative path. I learned this when I attempted to build a generated CMakeConfiguration  on a SunOS partition where my build path is not the same as my Linux partition's.
>>
>>
>> Have you guys had to deal with this?
>
> sure, in a similar way to you. Generate the VM on Linux, build it on
> a FreeBSD system. And later to create proper debian source packages.
>
> Check here[1] for my various changes to CMakeVMMaker. From my point
> of view it is unfortunate that the generated CMakeLists.txt is using
> absolute paths and that the platform differences are handled inside
> CMakeVMMaker and not inside CMakeLists.txt.

I agree… paths should be relative and is in my todo list since… well, more than a year now :)
So if someone wants to work on it, it would be supercool.

cheers,
Esteban

>
> cheers
> holger
>
>
> [1] http://smalltalkhub.com/#!/~hfreyther2/sctp/versions/

tty
Reply | Threaded
Open this post in threaded view
|

Re: Relative Paths for CMakeLists.txt ?

tty
 
Hi Estaban and Holger.


There *may* be a way to do this by just adding a cmake command to the build.sh file that is transparent to the end-user and accomplishes the same thing. I will research that this morning.
If that strategy does not pan out, then I will address the relative paths in the CMakeVMMaker source code.

Cheers.

tty

tty
Reply | Threaded
Open this post in threaded view
|

Re: Relative Paths for CMakeLists.txt ?

tty
In reply to this post by Holger Freyther
 
Hi Holger and Estaban


I am typing this from my OpenIndiana parition, so I don't have Squeak in front of me as a reference.

However, by simply setting the CMake variable CMAKE_USE_RELATIVE_PATHS to true in CMakeGenerator>>generate (?)  I was able to get rid of the path problem on SunOS/OpenSolaris and start the build.




wm@henry:~$ cmake --help-variable CMAKE_USE_RELATIVE_PATHS
cmake version 2.6-patch 2
------------------------------------------------------------------------------
SingleItem

CMAKE_USE_RELATIVE_PATHS
Use relative paths (May not work!).

If this is set to TRUE, then the CMake will use relative paths between
the source and binary tree. This option does not work for more
complicated projects, and relative paths are used when possible. In
general, it is not possible to move CMake generated makefiles to a
different location regardless of the value of this variable.



At this point, I am going to consider this resolved on Unix platform that supports relative paths. I will deal with Windows/Dos when I get around to booting up a windows box.

cheers.

tty