[CMake] Does "cmake.exe" expect a shell?

Bill Hoffman bill.hoffman at kitware.com
Mon Oct 26 12:27:24 EDT 2009


Andreas Pakulat wrote:
> On 26.10.09 11:21:07, Bill Hoffman wrote:
>> Andreas Pakulat wrote:
>>> Hi,
>>>
>>> in kdevelop4 we're running cmake to prepare a builddirectory from a source
>>> dir. This worked just fine on linux, however we're running into a problem
>>> when executing on Windows for the NMake-Generator.
>>>
>>> It seems this generator absolutely needs a shell (i.e. cmd.exe) as its
>>> environment and its not enough to simply start kdevelop from the C++
>>> development console. 
>>>
>>> Does cmake.exe have an explicit check for a real cmd.exe shell on windows?
>>> (I don't have access to cmake sources right now)
>>>
>>> Andreas
>> CMake requires that the environment be setup for use with the command  
>> line cl.   This is usually done by running vcvars32 or some other .bat  
>> file that sets up the environment.  By default the cl compiler will not  
>> just work unless the env is setup for it.
> 
> But that should be the case if I start kdevelop from a cmd.exe that had
> vcvars32.bat called. However it seems that executing cmake still fails when
> spawned via win32 process api. I'll get back when I have more data about
> this.
> 

Should work, perhaps there is an issue with the way you are spawning 
processes in kdevelop4 on windows.   You might want to look at the 
process execution code in CMake, it was tricky to get it working 
correctly...

-Bill


More information about the CMake mailing list