Re: Re: [CMake] moving project folder

2007-06-08 Thread David Cole

Do *not* distribute CMakeCache.txt. It simply will not work. CMake must be
run against CMakeLists.txt to produce CMakeCache.txt (and all the rest of
the initial binary tree) on each target build machine...



On 6/8/07, abhijeet mhatre [EMAIL PROTECTED] wrote:


 Hi
   I configure cmake by writing a CMakeLists.txt file in a source
folder.
 It runs fine.

 Now if I move the folder to some other location, cmake complains that
the
 files still refer to the previous location. Then I have to edit
 CMakeCache.txt and replace the project path at 3-4 there. Then it
works
 fine.

 Is there any elegant way to do this.



Do out-of-source builds.  When you want the output to appear somewhere
else, nuke the output directory and start over.
http://www.cmake.org/Wiki/CMake_FAQ http://www.cmake.org/Wiki/CMake_FAQ  
You cannot simply move
 CMake
output directories around in the filesystem.  They use hardcoded
absolute paths for safety, so if you want them somewhere else you must
regenerate them.

Suppose if I want distribute my project with the source code,
CMake files and all, how do I do this? I dont mind regenerating
build files using cmake . but I dont want to edit the CMakeLists.txt
and CMakeCache.txt when I distriubute my project. Is this doable?

regards
Abhijeet

--
Get the free Yahoo! 
toolbarhttp://us.rd.yahoo.com/evt=48226/*http://new.toolbar.yahoo.com/toolbar/features/norton/index.phpand
 rest assured with the added security of spyware protection.


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: Re: [CMake] moving project folder

2007-06-08 Thread Brandon Van Every

On 6/8/07, David Cole [EMAIL PROTECTED] wrote:

Do *not* distribute CMakeCache.txt. It simply will not work. CMake must be
run against CMakeLists.txt to produce CMakeCache.txt (and all the rest of
the initial binary tree) on each target build machine...


I'm pinging bug #3676 about this.  I think this thread is evidence of
why a Table Of Contents is desireable for the documentation, and why
integrating FAQ material in the docs is also desireable.  You can't
get CMake's theory of operation from reading cmake.html.  You can get
some of it from reading the FAQ, but the presentation is piecemeal,
and the FAQ doesn't ship with CMake itself.  There's a link to the FAQ
at the end of the docs.  This is good for Unix man pages, and goes
completely unnoticed in cmake.html.  Even if the FAQ remained external
to the docs, a TOC would make it much easier to figure out where the
FAQ is.

GNU Autoconf may be an awful tool to work with, but in one respect it
is far superior to CMake.  The documentation is really first class.
There's abundant, Chapter-driven explanation of how to use it, and
extensive examples of how to work around Autoconf's limitations.


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] moving project folder

2007-06-08 Thread kitts
On Friday 08 Jun 2007 9:34:13 pm Brandon Van Every wrote:
 I'm pinging bug #3676 about this.  I think this thread is evidence of
 why a Table Of Contents is desireable for the documentation, and why
 integrating FAQ material in the docs is also desireable.  You can't
 get CMake's theory of operation from reading cmake.html.  You can get
 some of it from reading the FAQ, but the presentation is piecemeal,
 and the FAQ doesn't ship with CMake itself.  There's a link to the FAQ
 at the end of the docs.  This is good for Unix man pages, and goes
 completely unnoticed in cmake.html.  Even if the FAQ remained external
 to the docs, a TOC would make it much easier to figure out where the
 FAQ is.

+1
-- 
Cheers!
kitts
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: Re: [CMake] moving project folder

2007-06-08 Thread abhijeet mhatre
HI David
  Actually I wanted to change the compiler from g++ to m68k-g++ (compiler for 
motorola architecture) so I just edited CMakeCache.txt where it was defined.
 
 I think I did it all wrong and should have put something in CMakeLists.txt 
instead of CMakeCache.txt.
 
 Could you tell me how to change the compiler in CMakeLists.txt ?
 
 Thanks a lot
 
 Abhijeet
 





David Cole [EMAIL PROTECTED] wrote: Do *not* distribute CMakeCache.txt. It 
simply will not work. CMake must be run against CMakeLists.txt to produce 
CMakeCache.txt (and all the rest of the initial binary tree) on each target 
build machine...



 On 6/8/07, abhijeet mhatre [EMAIL PROTECTED] wrote: 
 Hi
   I configure cmake by writing a CMakeLists.txt file in a source 
folder.
 It runs fine.

 Now if I move the folder to some other location, cmake complains that 

the
 files still refer to the previous location. Then I have to edit
 CMakeCache.txt and replace the project path at 3-4 there. Then it 
works
 fine.

 Is there any elegant way to do this.




Do out-of-source builds.  When you want the output to appear somewhere
else, nuke the output directory and start over.
 http://www.cmake.org/Wiki/CMake_FAQ
  You cannot simply move
 CMake
output directories around in the filesystem.  They use hardcoded
absolute paths for safety, so if you want them somewhere else you must
regenerate them.


Suppose if I want distribute my project with the source code, 
CMake files and all, how do I do this? I dont mind regenerating
build files using cmake . but I dont want to edit the CMakeLists.txt

and CMakeCache.txt when I distriubute my project. Is this doable?

regards
Abhijeet



-
Get the free Yahoo! toolbar  and rest assured with the added security of 
spyware protection.  
___
CMake mailing list
CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake


 
-
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: Re: [CMake] moving project folder

2007-06-08 Thread David Cole

Please keep the discussion on list so others may benefit from replies.

You can't presently change the compiler in CMakeLists.txt. And you cannot
change it after any CMake TRY_COMPILE commands have occurred without
starting over...

What you can do is this:
Set the environment variables C and CXX to be the full paths to the C and
C++ compilers that you want to use prior to invoking cmake / ccmake /
CMakeSetup for the first configure.

See the entry regarding CMAKE_C_COMPILER at
http://www.cmake.org/Wiki/CMake_Useful_Variables#Compilers_and_Tools


HTH,
David

On 6/8/07, abhijeet mhatre [EMAIL PROTECTED] wrote:


HI David
 Actually I wanted to change the compiler from g++ to m68k-g++ (compiler
for motorola architecture) so I just edited CMakeCache.txt where it was
defined.

I think I did it all wrong and should have put something in 
CMakeLists.txtinstead of
CMakeCache.txt.

Could you tell me how to change the compiler in CMakeLists.txt ?

Thanks a lot

Abhijeet






*David Cole [EMAIL PROTECTED]* wrote:

Do *not* distribute CMakeCache.txt. It simply will not work. CMake must be
run against CMakeLists.txt to produce CMakeCache.txt (and all the rest of
the initial binary tree) on each target build machine...



On 6/8/07, abhijeet mhatre [EMAIL PROTECTED] wrote:

  Hi
I configure cmake by writing a CMakeLists.txt file in a source
 folder.
  It runs fine.
 
  Now if I move the folder to some other location, cmake complains that

 the
  files still refer to the previous location. Then I have to edit
  CMakeCache.txt and replace the project path at 3-4 there. Then it
 works
  fine.
 
  Is there any elegant way to do this.




 Do out-of-source builds.  When you want the output to appear somewhere
 else, nuke the output directory and start over.
  http://www.cmake.org/Wiki/CMake_FAQ
  http://www.cmake.org/Wiki/CMake_FAQ  You cannot simply move
  CMake
 output directories around in the filesystem.  They use hardcoded
 absolute paths for safety, so if you want them somewhere else you must
 regenerate them.


 Suppose if I want distribute my project with the source code,
 CMake files and all, how do I do this? I dont mind regenerating
 build files using cmake . but I dont want to edit the CMakeLists.txt

 and CMakeCache.txt when I distriubute my project. Is this doable?

 regards
 Abhijeet

 --
 Get the free Yahoo! toolbar
 
http://us.rd.yahoo.com/evt=48226/*http://new.toolbar.yahoo.com/toolbar/features/norton/index.phpand
 rest assured with the added security of spyware protection.

 ___
 CMake mailing list
 CMake@cmake.org
 http://www.cmake.org/mailman/listinfo/cmake



--
Park yourself in front of a world of choices in alternative vehicles.
Visit the Yahoo! Auto Green 
Center.http://us.rd.yahoo.com/evt=48246/*http://autos.yahoo.com/green_center/;_ylc=X3oDMTE5cDF2bXZzBF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDZ3JlZW4tY2VudGVy


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: Re: [CMake] moving project folder

2007-06-08 Thread Brandon Van Every

On 6/8/07, abhijeet mhatre [EMAIL PROTECTED] wrote:


 Could you tell me how to change the compiler in CMakeLists.txt ?


The compiler is the user's choice, not yours.  Have the user run
CMakeSetup or CCMake and let them choose the compiler.  You shouldn't
have a compiler hardwired into CMakeLists.txt.  You could certainly
detect if a specific compiler is available and take specific actions
on that basis.  See the CMake Useful Variables.
http://www.cmake.org/Wiki/CMake_Useful_Variables

Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] moving project folder

2007-06-07 Thread abhijeet mhatre
Hi
  I configure cmake by writing a CMakeLists.txt file in a source folder.
It runs fine. 

Now if I move the folder to some other location, cmake complains that the files 
still refer to the previous location. Then I have to edit CMakeCache.txt and 
replace the project path at 3-4 there. Then it works fine.

Is there any elegant way to do this.

regards
abhijeet
 
   
-
Luggage? GPS? Comic books? 
Check out fitting  gifts for grads at Yahoo! Search.___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

RE: [CMake] moving project folder

2007-06-07 Thread Jonnalagadda, Kishore (IE10)
You cannot move a configured project. If you move it you need to clean
the build folder and then run cmake again after the move.

 

Warm regards,

Kishore

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of abhijeet mhatre
Sent: Thursday, June 07, 2007 7:47 PM
To: cmake@cmake.org
Subject: [CMake] moving project folder

 

Hi
  I configure cmake by writing a CMakeLists.txt file in a source folder.
It runs fine. 

Now if I move the folder to some other location, cmake complains that
the files still refer to the previous location. Then I have to edit
CMakeCache.txt and replace the project path at 3-4 there. Then it works
fine.

Is there any elegant way to do this.

regards
abhijeet

  



Luggage? GPS? Comic books? 
Check out fitting gifts for grads
http://us.rd.yahoo.com/evt=48249/*http:/search.yahoo.com/search?fr=oni_
on_mailp=graduation+giftscs=bz  at Yahoo! Search.

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] moving project folder

2007-06-07 Thread Brandon Van Every

On 6/7/07, abhijeet mhatre [EMAIL PROTECTED] wrote:

Hi
  I configure cmake by writing a CMakeLists.txt file in a source folder.
It runs fine.

Now if I move the folder to some other location, cmake complains that the
files still refer to the previous location. Then I have to edit
CMakeCache.txt and replace the project path at 3-4 there. Then it works
fine.

Is there any elegant way to do this.


Do out-of-source builds.  When you want the output to appear somewhere
else, nuke the output directory and start over.
http://www.cmake.org/Wiki/CMake_FAQ  You cannot simply move CMake
output directories around in the filesystem.  They use hardcoded
absolute paths for safety, so if you want them somewhere else you must
regenerate them.


Cheers,
Brandon Van Every
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: Re: [CMake] moving project folder

2007-06-07 Thread abhijeet mhatre

 Hi
   I configure cmake by writing a CMakeLists.txt file in a source 
folder.
 It runs fine.

 Now if I move the folder to some other location, cmake complains that 
the
 files still refer to the previous location. Then I have to edit
 CMakeCache.txt and replace the project path at 3-4 there. Then it 
works
 fine.

 Is there any elegant way to do this.



Do out-of-source builds.  When you want the output to appear somewhere
else, nuke the output directory and start over.
http://www.cmake.org/Wiki/CMake_FAQ  You cannot simply move CMake
output directories around in the filesystem.  They use hardcoded
absolute paths for safety, so if you want them somewhere else you must
regenerate them.

Suppose if I want distribute my project with the source code, 
CMake files and all, how do I do this? I dont mind regenerating
build files using cmake . but I dont want to edit the CMakeLists.txt
and CMakeCache.txt when I distriubute my project. Is this doable?

regards
Abhijeet


   
-
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. ___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake