[CMake] ToolChain file scope

2011-06-07 Thread dfurtney
I have been hammergin on a vxworks cross-compile toolchain file. It seems that 
not all properties that are set in the cross-compilation file propogate to the 
CMakeLists.txt file that is using it. An example is the CMAKE_AR property.  
Setting it in the cross-compilation file had no effect and the value during 
linking of a static library was "'. Once I moved it to the CMakeLists.txt file 
the setting was recognized. Setting of library prefix and postfix values seemed 
to behave the same way.

These things seem like reasonable targets for the cross-compilation file so I 
am confused as to why they wouldn't work. Any help is appreciated.

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] (no subject)

2011-06-06 Thread dfurtney
Does CMake provide a way to get the list of objects going into a given target? 
I need such a list for a PRE_LINK custom command.
___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] setting the shell env

2011-06-04 Thread dfurtney
>What kind of environment is this ?
>So you do this under windows, but with some kind of unix tools ?
>Is this cygwin or more like mingw ?

WindRiver provides the wrenv.exe/.sh (depending on the platform) utility to 
help setup the environment for production. It is available for windows and unix 
shells.  I am running all of the CMake comands from in Windows using such a 
shell. 

>What kind of command is this above ? Is this generated from a 
>add_custom_command() ?

Yes, it was generated from a custom command. This is what the Workbench version 
of vxworks does prior to linking.

ADD_CUSTOM_COMMAND(TARGET Blah PRE_LINK COMMAND " nmpentium ${OJBECTS} 
${LINK_LIBRARIES} | tclsh 
${VX_BASE_DIR}/${VX_VERSION_DIR}/host/resource/hutils/tcl/munch.tcl -c pentium 
> ${CMAKE_BINARY_DIR}/ctdt.c" COMMENT "Building the cdtc.c file\n")

Here is the full link command I am trying to replicate. LOL, you gotta love 
it.

echo "building $@";rm -f %OutFile%;nmpentium %Objects% %Libraries% | tclsh 
$(WIND_BASE)/host/resource/hutils/tcl/munch.tcl -c pentium > 
$(OBJ_DIR)/ctdt.c;%ccompilerprefix% $(TOOL_PATH)ccpentium %DebugModeFlags% 
$(CC_ARCH_SPEC) -fdollars-in-identifiers -Wall  $(ADDED_CFLAGS) %Includes% 
$(ADDED_INCLUDES) -DCPU=$(CPU) -DTOOL_FAMILY=$(TOOL_FAMILY) -DTOOL=$(TOOL) 
-D_WRS_KERNEL  -D_VSB_CONFIG_FILE=\"$(VSB_CONFIG_FILE)\"   $(DEFINES)  -o 
$(OBJ_DIR)/ctdt.o -c $(OBJ_DIR)/ctdt.c;%linkerprefix% $(TOOL_PATH)ccpentium -r 
-nostdlib -Wl,-X %ToolFlags% -o %OutFile% $(OBJ_DIR)/ctdt.o %Objects% 
%Libraries% $(LIBPATH) $(LIBS) $(ADDED_LIBPATH) $(ADDED_LIBS) && if [ 
"$(EXPAND_DBG)" = "1" ]; then plink "$@";fi
 I execute cmake using my ToolChain file with the custom command in the 
CMakeLists.txt file. When I run make I get:

C:\DOCUME~1\dan\LOCALS~1\Temp\make13924.sh: nmpentium   | tclsh C:/WindRiver
/vxworks-6.7/host/resource/hutils/tcl/munch.tcl -c pentium > C:/dev/SM3/workbenc
h/CMakeBlah/ctdt.c: command not found
make[2]: *** [Blah] Error 127
make[1]: *** [CMakeFiles/Blah.dir/all] Error 2
make: *** [all] Error 2

It appears that a different shell environment is being picked up for the 
execution of make?



 Alexander Neundorf  wrote: 

=
On Saturday, June 04, 2011 09:57:44 PM dfurt...@cox.net wrote:
> Usually we use the vxworks command shell to do command line builds.
> Windriver supplys many utilites including its own sh.exe. Is there a way
> to tell CMake to use the windriver sh and/or env setup?

Please keep the mailing list on CC, so all can find the information later on, 
and also all can try to help.

> Currentlyy I get:
> 
> C:\DOCUME~1\vaj2850\LOCALS~1\Temp\make51686.sh:
> c:/WindRiver/utilities-1.0/x86-w in32/bin/sh.exe nmpentium  | tclsh
> C:/WindRiver/vxworks-6.7/host/resource/hutil s/tcl/munch.tcl -c pentium >
> C:/dev/SM3/workbench/CMakeBlah/ctdt.c: command not found
> 
> Using full paths to the separate executables didn't help. The
> "C:\DOCUME~1\vaj2850\LOCALS~1\Temp\make51686.sh:" looks supicious.

What kind of environment is this ?
So you do this under windows, but with some kind of unix tools ?
Is this cygwin or more like mingw ?

In general, you should probably run cmake from the shell where you will also 
build.
What kind of command is this above ? Is this generated from a 
add_custom_command() ?

Alex

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake