Alexander Ivash wrote:
What do you mean by termination?  Does cmake crash?
Yes. Here some exception deatails:
     AppName: cmake.exe       AppVer: 0.0.0.0         ModName: msvcr80d.dll
     ModVer: 8.0.50727.762    Offset: 0003b130
Can you build a debug version of cmake and get a call stack, or send a complete example that shows the problem. Also, what version of cmake is this, and did you build it yourself? Does the release from www.cmake.org work?

I tried your
command line and it did not crash.
The problem was not in command line. After changed the sample a bit -
exception disappeared! Here is working variant:

I used the example you gave and it would not crash for me.
#if(DEFINED CROSSCOMPILE)
        set(ENV{PATH} "$ENV{PATH};${WIND_RIVER_DIAB_DIR}")
        set(ENV{PATH} 
"$ENV{PATH};${WIND_RIVER_DIR}/vxworks-6.1/host/x86-win32/bin")

        set(CMAKE_MAKE_PROGRAM "make" CACHE STRING "")
        set(CMAKE_CXX_COMPILER "dcc" CACHE STRING "")
        #set(CMAKE_COMPILER_IS_GNUCXX 1 CACHE STRING "")
        set(CMAKE_C_COMPILER "dcc" CACHE STRING "")
        set(CMAKE_AR "ar" CACHE STRING "")
#elseif(DEFINED CROSSCOMPILE)

However, the set(ENV) stuff you have may not be exactly what you want. It will only set environment variables at CMake time, and not at make time.
I just need to set custom tool chain if CROSSCOMPILE defined. I
thought that in such a way I can define compiler, linker etc and at
the compile time they will be used with a full absolute path. If I
wrong how to acquire what I want ?

You need to set cmake variables and not ENV variables. Your environment must be set outside of cmake for this to work. You have to remember once cmake is done running it creates build files that are used by some other program (make or devenv). It is no longer running
and does not have anything to do with the environment.

-Bill

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

Reply via email to