Re: [CMake] Including of Platform/UnixPaths.cmake now broken

2007-12-11 Thread James Bigler

On Dec 10, 2007, at 5:33 PM, Gonzalo Garramuño wrote:


I use my own variable -DCMAKE_BUILD_ARCH=32 to determine whether I  
am compiling 32-bits on a 64-bits machine.


The problem is that cmake now goes to check compiler and it runs  
Platform/UnixPaths.cmake without passing any of my variables to it  
(ie. CMAKE_BUILD_ARCH=).


CMake can be quite finicky about how variables are passed in from the  
command line.  The correct syntax is:


-DVAR_NAME:TYPE=VAL

Try: -DCMAKE_BUILD_ARCH:STRING=32 and see if you still have  
problems.  If you don't see it on the very first page in ccmake, then  
it didn't pick it up properly.


Sadly, cmake doesn't give warnings or errors if the other form is  
used (-DVAR_NAME=VAL).  It just behaves erratically.


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


[CMake] Including of Platform/UnixPaths.cmake now broken

2007-12-10 Thread Gonzalo Garramuño


This used to work properly, but it has now changed behavior and is now 
borken.


Using CVS version, somewhat latest one.
cmake version 2.5-20071026

I have:

SET( CMAKE_MODULE_PATH  ${CMAKE_CURRENT_SOURCE_DIR}/modules )

to change cmake's search path behavior.

Inside my local modules dir, I have Platform/UnixPaths.cmake, to fix 
cmake's searching of 32-bit stuff on a 64-bit machine when -m32 is used.


I use my own variable -DCMAKE_BUILD_ARCH=32 to determine whether I am 
compiling 32-bits on a 64-bits machine.


The problem is that cmake now goes to check compiler and it runs 
Platform/UnixPaths.cmake without passing any of my variables to it (ie. 
CMAKE_BUILD_ARCH=).


Then, after it calls the compiler check, it seems it caches the 
CMAKE_SYSTEM_PATH and does not call Platform/UnixPaths anymore during 
the running of my CMakeLists.txt file.


Other local modules do get picked correctly with my variables set, so 
CMAKE_MODULE_PATH works ok, but not for Platform/UnixPaths.cmake.


This results in CMAKE_SYSTEM_PATH being set wrong (and thus, my compile 
not to work).


Previous versions would invoke UnixPaths.cmake multiple times, so even 
though the compiler check would call it wrongly without any variable 
set, during the course of my actual run of the CMakeLists.txt file, it 
would get called again but with my vars set, which allowed me to set the 
path correctly.


I'm either looking for:
	a) A correct UnixPaths.cmake module that handles 32-bits libs properly 
(the current one in CVS does not).


or

b) A fix to this broken behavior.



--
Gonzalo Garramuño
[EMAIL PROTECTED]

AMD4400 - ASUS48N-E
GeForce7300GT
Xubuntu Gutsy
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake