A couple of things about CMake

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

A couple of things about CMake

Mariano Martinez Peck
 
Hi Igor. I was thinking a couple of things:

1) So...once I hace download anything from GIT, what I always need to do is:
a) take a pharo core 1.3
b) open the LoadVMMaker.st  so that I can see which versions of metacello and cmake I need.
c) evaluate that over the pharo image
d) move my image to /build  so that it finds the /src and /platform by default

So...I wonder what are the reason of not having such PharoCore image already commited in GIT under /image.  You can even save it with a workspace opened with the code of LoadVMMaker.st
is it just the size of it?

If I want to do it for myself, what is the best strategy?  clone to my own fork, add the image there and then just pull the changes?

2) #prepareVMMaker does this:

prepareVMMaker

    | maker allPlugins |
   
    maker := VMMaker forPlatform: 'Cross'.
    maker sourceDirectoryName: (self srcDir assureExistence fullName).
    maker platformRootDirectoryName: (self topDir / 'platforms' ) fullName.
   
And

srcDir
    "Answer the value of srcDir"

    ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]

This is cool because I can script the cong to use another src. But you don't do the same for 'platform'. So I cannot do:

CogDebugMacOSConfig  new
    srcDir: 'myFolder';
 platformsDir: 'myPlatofrm';
     generateSources;
    generate.

Since the platform directory will be overwritten.



Cheers

Mariano
Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Igor Stasenko

On 3 April 2011 11:45, Mariano Martinez Peck <[hidden email]> wrote:

>
> Hi Igor. I was thinking a couple of things:
>
> 1) So...once I hace download anything from GIT, what I always need to do is:
> a) take a pharo core 1.3
> b) open the LoadVMMaker.st  so that I can see which versions of metacello and cmake I need.
> c) evaluate that over the pharo image
> d) move my image to /build  so that it finds the /src and /platform by default
>
> So...I wonder what are the reason of not having such PharoCore image already commited in GIT under /image.  You can even save it with a workspace opened with the code of LoadVMMaker.st
> is it just the size of it?
>
> If I want to do it for myself, what is the best strategy?  clone to my own fork, add the image there and then just pull the changes?
>
> 2) #prepareVMMaker does this:
>
> prepareVMMaker
>
>     | maker allPlugins |
>
>     maker := VMMaker forPlatform: 'Cross'.
>     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>     maker platformRootDirectoryName: (self topDir / 'platforms' ) fullName.
>
> And
>
> srcDir
>     "Answer the value of srcDir"
>
>     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>
> This is cool because I can script the cong to use another src. But you don't do the same for 'platform'. So I cannot do:
>
> CogDebugMacOSConfig  new
>     srcDir: 'myFolder';
>  platformsDir: 'myPlatofrm';
>      generateSources;
>     generate.
>
> Since the platform directory will be overwritten.
>
>
probably a mistake. platforms dir should also be configurable. and it
should use it if it set.

>
> Cheers
>
> Mariano
>
>



--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Mariano Martinez Peck
 
Ok. I will commit later the fix.
Cheers

Mariano

On Mon, Apr 4, 2011 at 3:00 AM, Igor Stasenko <[hidden email]> wrote:

On 3 April 2011 11:45, Mariano Martinez Peck <[hidden email]> wrote:
>
> Hi Igor. I was thinking a couple of things:
>
> 1) So...once I hace download anything from GIT, what I always need to do is:
> a) take a pharo core 1.3
> b) open the LoadVMMaker.st  so that I can see which versions of metacello and cmake I need.
> c) evaluate that over the pharo image
> d) move my image to /build  so that it finds the /src and /platform by default
>
> So...I wonder what are the reason of not having such PharoCore image already commited in GIT under /image.  You can even save it with a workspace opened with the code of LoadVMMaker.st
> is it just the size of it?
>
> If I want to do it for myself, what is the best strategy?  clone to my own fork, add the image there and then just pull the changes?
>
> 2) #prepareVMMaker does this:
>
> prepareVMMaker
>
>     | maker allPlugins |
>
>     maker := VMMaker forPlatform: 'Cross'.
>     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>     maker platformRootDirectoryName: (self topDir / 'platforms' ) fullName.
>
> And
>
> srcDir
>     "Answer the value of srcDir"
>
>     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>
> This is cool because I can script the cong to use another src. But you don't do the same for 'platform'. So I cannot do:
>
> CogDebugMacOSConfig  new
>     srcDir: 'myFolder';
>  platformsDir: 'myPlatofrm';
>      generateSources;
>     generate.
>
> Since the platform directory will be overwritten.
>
>
probably a mistake. platforms dir should also be configurable. and it
should use it if it set.

>
> Cheers
>
> Mariano
>
>



--
Best regards,
Igor Stasenko AKA sig.



--
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Mariano Martinez Peck
 


On Mon, Apr 4, 2011 at 10:48 AM, Igor Stasenko <[hidden email]> wrote:
On 4 April 2011 09:42, Mariano Martinez Peck <[hidden email]> wrote:
> Ok. I will commit later the fix.

Yes, please do.
I cannot manage to do everything, so a help from people is much appreciated :)

I know. I didn't commit before because I wanted to know your opinion before comminting.

I have modified a couple of things so that now you can do something like this and it works:

CogMacOSConfig new 
    srcDir: '/Users/mariano/src';
    platformsDir: '/Users/mariano/bin/platforms';
    buildDir: '/Users/mariano/Movies/build';
    generateSources; generate.

I tested in MacOS and it works. I couldn't test in the rest of the OS. I am afraid I have broken something, so, just in case, I attach here the mcz. I would really appreaciate if you can take a look and if works, upload it to the VMMaker repo.

Name: CMakeVMMaker-MarianoMartinezPeck.66
Author: MarianoMartinezPeck
Time: 4 April 2011, 11:27:55 pm
UUID: ab7eacee-e6e8-4149-8507-60235f871297
Ancestors: CMakeVMMaker-MarianoMartinezPeck.65

Fixed the CMMake so that #srcDir:  #platformsDir:  and #buildDir:   works.
Example:

CogMacOSConfig new 
    srcDir: '/Users/mariano/src';
    platformsDir: '/Users/mariano/bin/platforms';
    buildDir: '/Users/mariano/Movies/build';
    generateSources; generate.



Thanks

Mariano

 

> Cheers
>
> Mariano
>
> On Mon, Apr 4, 2011 at 3:00 AM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 3 April 2011 11:45, Mariano Martinez Peck <[hidden email]>
>> wrote:
>> >
>> > Hi Igor. I was thinking a couple of things:
>> >
>> > 1) So...once I hace download anything from GIT, what I always need to do
>> > is:
>> > a) take a pharo core 1.3
>> > b) open the LoadVMMaker.st  so that I can see which versions of
>> > metacello and cmake I need.
>> > c) evaluate that over the pharo image
>> > d) move my image to /build  so that it finds the /src and /platform by
>> > default
>> >
>> > So...I wonder what are the reason of not having such PharoCore image
>> > already commited in GIT under /image.  You can even save it with a workspace
>> > opened with the code of LoadVMMaker.st
>> > is it just the size of it?
>> >
>> > If I want to do it for myself, what is the best strategy?  clone to my
>> > own fork, add the image there and then just pull the changes?
>> >
>> > 2) #prepareVMMaker does this:
>> >
>> > prepareVMMaker
>> >
>> >     | maker allPlugins |
>> >
>> >     maker := VMMaker forPlatform: 'Cross'.
>> >     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>> >     maker platformRootDirectoryName: (self topDir / 'platforms' )
>> > fullName.
>> >
>> > And
>> >
>> > srcDir
>> >     "Answer the value of srcDir"
>> >
>> >     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>> >
>> > This is cool because I can script the cong to use another src. But you
>> > don't do the same for 'platform'. So I cannot do:
>> >
>> > CogDebugMacOSConfig  new
>> >     srcDir: 'myFolder';
>> >  platformsDir: 'myPlatofrm';
>> >      generateSources;
>> >     generate.
>> >
>> > Since the platform directory will be overwritten.
>> >
>> >
>> probably a mistake. platforms dir should also be configurable. and it
>> should use it if it set.
>>
>> >
>> > Cheers
>> >
>> > Mariano
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>
>
> --
> http://marianopeck.wordpress.com
>
>



--
Best regards,
Igor Stasenko AKA sig.



--
Mariano
http://marianopeck.wordpress.com


CMakeVMMaker-MarianoMartinezPeck.66.mcz (95K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Igor Stasenko

On 4 April 2011 23:28, Mariano Martinez Peck <[hidden email]> wrote:

>
>
>
> On Mon, Apr 4, 2011 at 10:48 AM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 4 April 2011 09:42, Mariano Martinez Peck <[hidden email]> wrote:
>> > Ok. I will commit later the fix.
>>
>> Yes, please do.
>> I cannot manage to do everything, so a help from people is much appreciated :)
>
> I know. I didn't commit before because I wanted to know your opinion before comminting.
>
> I have modified a couple of things so that now you can do something like this and it works:
>
> CogMacOSConfig new
>     srcDir: '/Users/mariano/src';
>     platformsDir: '/Users/mariano/bin/platforms';
>     buildDir: '/Users/mariano/Movies/build';
>     generateSources; generate.
>

Yes, it was designed to work like that. Sure not well tested, because
most of the times it is used by taking defaults :)


> I tested in MacOS and it works. I couldn't test in the rest of the OS. I am afraid I have broken something, so, just in case, I attach here the mcz. I would really appreaciate if you can take a look and if works, upload it to the VMMaker repo.
>

Thanks, Mariano.
I will take a look. But you just upload it there, and if it works i
will just put it in use.


> Name: CMakeVMMaker-MarianoMartinezPeck.66
> Author: MarianoMartinezPeck
> Time: 4 April 2011, 11:27:55 pm
> UUID: ab7eacee-e6e8-4149-8507-60235f871297
> Ancestors: CMakeVMMaker-MarianoMartinezPeck.65
>
> Fixed the CMMake so that #srcDir:  #platformsDir:  and #buildDir:   works.
> Example:
>
> CogMacOSConfig new
>     srcDir: '/Users/mariano/src';
>     platformsDir: '/Users/mariano/bin/platforms';
>     buildDir: '/Users/mariano/Movies/build';
>     generateSources; generate.
>
>
>
> Thanks
>
> Mariano
>
>
>>
>> > Cheers
>> >
>> > Mariano
>> >
>> > On Mon, Apr 4, 2011 at 3:00 AM, Igor Stasenko <[hidden email]> wrote:
>> >>
>> >> On 3 April 2011 11:45, Mariano Martinez Peck <[hidden email]>
>> >> wrote:
>> >> >
>> >> > Hi Igor. I was thinking a couple of things:
>> >> >
>> >> > 1) So...once I hace download anything from GIT, what I always need to do
>> >> > is:
>> >> > a) take a pharo core 1.3
>> >> > b) open the LoadVMMaker.st  so that I can see which versions of
>> >> > metacello and cmake I need.
>> >> > c) evaluate that over the pharo image
>> >> > d) move my image to /build  so that it finds the /src and /platform by
>> >> > default
>> >> >
>> >> > So...I wonder what are the reason of not having such PharoCore image
>> >> > already commited in GIT under /image.  You can even save it with a workspace
>> >> > opened with the code of LoadVMMaker.st
>> >> > is it just the size of it?
>> >> >
>> >> > If I want to do it for myself, what is the best strategy?  clone to my
>> >> > own fork, add the image there and then just pull the changes?
>> >> >
>> >> > 2) #prepareVMMaker does this:
>> >> >
>> >> > prepareVMMaker
>> >> >
>> >> >     | maker allPlugins |
>> >> >
>> >> >     maker := VMMaker forPlatform: 'Cross'.
>> >> >     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>> >> >     maker platformRootDirectoryName: (self topDir / 'platforms' )
>> >> > fullName.
>> >> >
>> >> > And
>> >> >
>> >> > srcDir
>> >> >     "Answer the value of srcDir"
>> >> >
>> >> >     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>> >> >
>> >> > This is cool because I can script the cong to use another src. But you
>> >> > don't do the same for 'platform'. So I cannot do:
>> >> >
>> >> > CogDebugMacOSConfig  new
>> >> >     srcDir: 'myFolder';
>> >> >  platformsDir: 'myPlatofrm';
>> >> >      generateSources;
>> >> >     generate.
>> >> >
>> >> > Since the platform directory will be overwritten.
>> >> >
>> >> >
>> >> probably a mistake. platforms dir should also be configurable. and it
>> >> should use it if it set.
>> >>
>> >> >
>> >> > Cheers
>> >> >
>> >> > Mariano
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Best regards,
>> >> Igor Stasenko AKA sig.
>> >
>> >
>> >
>> > --
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>



--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Mariano Martinez Peck
 


On Tue, Apr 5, 2011 at 9:31 AM, Igor Stasenko <[hidden email]> wrote:

On 4 April 2011 23:28, Mariano Martinez Peck <[hidden email]> wrote:
>
>
>
> On Mon, Apr 4, 2011 at 10:48 AM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 4 April 2011 09:42, Mariano Martinez Peck <[hidden email]> wrote:
>> > Ok. I will commit later the fix.
>>
>> Yes, please do.
>> I cannot manage to do everything, so a help from people is much appreciated :)
>
> I know. I didn't commit before because I wanted to know your opinion before comminting.
>
> I have modified a couple of things so that now you can do something like this and it works:
>
> CogMacOSConfig new
>     srcDir: '/Users/mariano/src';
>     platformsDir: '/Users/mariano/bin/platforms';
>     buildDir: '/Users/mariano/Movies/build';
>     generateSources; generate.
>

Yes, it was designed to work like that. Sure not well tested, because
most of the times it is used by taking defaults :)


Yes, I can imagine. But to do that, I always need to move a PharoCore image to /build.
I have the git/src repository always in a specific directory. And my current Pharo image is somewhere (each time is different). So I just evaluate something like the above and that's all :)
 

> I tested in MacOS and it works. I couldn't test in the rest of the OS. I am afraid I have broken something, so, just in case, I attach here the mcz. I would really appreaciate if you can take a look and if works, upload it to the VMMaker repo.
>

Thanks, Mariano.
I will take a look. But you just upload it there, and if it works i
will just put it in use.

Done.
I couldn't test anywhere than MacOS.
 


> Name: CMakeVMMaker-MarianoMartinezPeck.66
> Author: MarianoMartinezPeck
> Time: 4 April 2011, 11:27:55 pm
> UUID: ab7eacee-e6e8-4149-8507-60235f871297
> Ancestors: CMakeVMMaker-MarianoMartinezPeck.65
>
> Fixed the CMMake so that #srcDir:  #platformsDir:  and #buildDir:   works.
> Example:
>
> CogMacOSConfig new
>     srcDir: '/Users/mariano/src';
>     platformsDir: '/Users/mariano/bin/platforms';
>     buildDir: '/Users/mariano/Movies/build';
>     generateSources; generate.
>
>
>
> Thanks
>
> Mariano
>
>
>>
>> > Cheers
>> >
>> > Mariano
>> >
>> > On Mon, Apr 4, 2011 at 3:00 AM, Igor Stasenko <[hidden email]> wrote:
>> >>
>> >> On 3 April 2011 11:45, Mariano Martinez Peck <[hidden email]>
>> >> wrote:
>> >> >
>> >> > Hi Igor. I was thinking a couple of things:
>> >> >
>> >> > 1) So...once I hace download anything from GIT, what I always need to do
>> >> > is:
>> >> > a) take a pharo core 1.3
>> >> > b) open the LoadVMMaker.st  so that I can see which versions of
>> >> > metacello and cmake I need.
>> >> > c) evaluate that over the pharo image
>> >> > d) move my image to /build  so that it finds the /src and /platform by
>> >> > default
>> >> >
>> >> > So...I wonder what are the reason of not having such PharoCore image
>> >> > already commited in GIT under /image.  You can even save it with a workspace
>> >> > opened with the code of LoadVMMaker.st
>> >> > is it just the size of it?
>> >> >
>> >> > If I want to do it for myself, what is the best strategy?  clone to my
>> >> > own fork, add the image there and then just pull the changes?
>> >> >
>> >> > 2) #prepareVMMaker does this:
>> >> >
>> >> > prepareVMMaker
>> >> >
>> >> >     | maker allPlugins |
>> >> >
>> >> >     maker := VMMaker forPlatform: 'Cross'.
>> >> >     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>> >> >     maker platformRootDirectoryName: (self topDir / 'platforms' )
>> >> > fullName.
>> >> >
>> >> > And
>> >> >
>> >> > srcDir
>> >> >     "Answer the value of srcDir"
>> >> >
>> >> >     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>> >> >
>> >> > This is cool because I can script the cong to use another src. But you
>> >> > don't do the same for 'platform'. So I cannot do:
>> >> >
>> >> > CogDebugMacOSConfig  new
>> >> >     srcDir: 'myFolder';
>> >> >  platformsDir: 'myPlatofrm';
>> >> >      generateSources;
>> >> >     generate.
>> >> >
>> >> > Since the platform directory will be overwritten.
>> >> >
>> >> >
>> >> probably a mistake. platforms dir should also be configurable. and it
>> >> should use it if it set.
>> >>
>> >> >
>> >> > Cheers
>> >> >
>> >> > Mariano
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Best regards,
>> >> Igor Stasenko AKA sig.
>> >
>> >
>> >
>> > --
>> > http://marianopeck.wordpress.com
>> >
>> >
>>
>>
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>



--
Best regards,
Igor Stasenko AKA sig.



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Mariano Martinez Peck
In reply to this post by Mariano Martinez Peck
 


On Sun, Apr 3, 2011 at 11:45 AM, Mariano Martinez Peck <[hidden email]> wrote:
Hi Igor. I was thinking a couple of things:

1) So...once I hace download anything from GIT, what I always need to do is:
a) take a pharo core 1.3
b) open the LoadVMMaker.st  so that I can see which versions of metacello and cmake I need.
c) evaluate that over the pharo image
d) move my image to /build  so that it finds the /src and /platform by default

So...I wonder what are the reason of not having such PharoCore image already commited in GIT under /image.  You can even save it with a workspace opened with the code of LoadVMMaker.st
is it just the size of it?

If I want to do it for myself, what is the best strategy?  clone to my own fork, add the image there and then just pull the changes?


Igor, and this question ?  do you know ?


 
2) #prepareVMMaker does this:

prepareVMMaker

    | maker allPlugins |
   
    maker := VMMaker forPlatform: 'Cross'.
    maker sourceDirectoryName: (self srcDir assureExistence fullName).
    maker platformRootDirectoryName: (self topDir / 'platforms' ) fullName.
   
And

srcDir
    "Answer the value of srcDir"

    ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]

This is cool because I can script the cong to use another src. But you don't do the same for 'platform'. So I cannot do:

CogDebugMacOSConfig  new
    srcDir: 'myFolder';
 platformsDir: 'myPlatofrm';
     generateSources;
    generate.

Since the platform directory will be overwritten.



Cheers

Mariano



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: A couple of things about CMake

Igor Stasenko

On 7 April 2011 00:33, Mariano Martinez Peck <[hidden email]> wrote:

>
>
>
> On Sun, Apr 3, 2011 at 11:45 AM, Mariano Martinez Peck <[hidden email]> wrote:
>>
>> Hi Igor. I was thinking a couple of things:
>>
>> 1) So...once I hace download anything from GIT, what I always need to do is:
>> a) take a pharo core 1.3
>> b) open the LoadVMMaker.st  so that I can see which versions of metacello and cmake I need.
>> c) evaluate that over the pharo image
>> d) move my image to /build  so that it finds the /src and /platform by default
>>
>> So...I wonder what are the reason of not having such PharoCore image already commited in GIT under /image.  You can even save it with a workspace opened with the code of LoadVMMaker.st
>> is it just the size of it?
>>
>> If I want to do it for myself, what is the best strategy?  clone to my own fork, add the image there and then just pull the changes?
>>
>
> Igor, and this question ?  do you know ?
>

do not commit image to repository. we want to move away from it, because
image is not sources , but just a big binary blob.
What you can do is to change the image url, which image should be taken
(see codegen-scripts/image.url)

this url used by hudson to download an image which is then used as a
base image to load vmmaker.

currently we using an url of last successful pharo-core 1.3 image build.
And so, if something goes wrong (like introducing some incompatibility
in pharo image which makes VMMaker
not loadable or , prevents it from working), we know about it
immediately and can fix it.

This is why it called 'continuous integration'. :)

>>
>> 2) #prepareVMMaker does this:
>>
>> prepareVMMaker
>>
>>     | maker allPlugins |
>>
>>     maker := VMMaker forPlatform: 'Cross'.
>>     maker sourceDirectoryName: (self srcDir assureExistence fullName).
>>     maker platformRootDirectoryName: (self topDir / 'platforms' ) fullName.
>>
>> And
>>
>> srcDir
>>     "Answer the value of srcDir"
>>
>>     ^ srcDir ifNil: [ srcDir := self topDir / 'src' ]
>>
>> This is cool because I can script the cong to use another src. But you don't do the same for 'platform'. So I cannot do:
>>
>> CogDebugMacOSConfig  new
>>     srcDir: 'myFolder';
>>  platformsDir: 'myPlatofrm';
>>      generateSources;
>>     generate.
>>
>> Since the platform directory will be overwritten.
>>
>>
>>
>> Cheers
>>
>> Mariano
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>



--
Best regards,
Igor Stasenko AKA sig.