Thanks for the tip.  Was editing existing library which used the old
os. calls and using subprocess allows me to pass the generator as an
argument for both windows and linux without messing with the quotes!

corey

On 8/24/07, Raphael Cotty <[EMAIL PROTECTED]> wrote:
> Hi,
> Try that:
> if platform.platform(True, True) == "Windows-XP":
>         p1 = subprocess.Popen( ['cmake', '-DCMAKE_INSTALL_PREFIX=' +
> installDir, '-DCMAKE_TOOLCHAIN_FILE=' + toolChainFile, '-G', generator,
> '-DCMAKE_BUILD_TYPE=' + buildType, sourceDir], shell=True )
>     else:
>         p1 = subprocess.Popen( ['cmake', '-DCMAKE_INSTALL_PREFIX=' +
> installDir, '-DCMAKE_TOOLCHAIN_FILE=' + toolChainFile, '-G', generator,
> '-DCMAKE_BUILD_TYPE=' + buildType, sourceDir] )
>     output = p1.communicate()[0]
>
> With the appropriate variables set.
>
> Raph
>
>
> On 8/24/07, corey taylor < [EMAIL PROTECTED]> wrote:
> >
> > I ran into a strange issue where on linux if I run cmake -G "Unix
> > Makefiles" via python.
> >
> > eg. os.spawnvp(os.P_WAIT, program, args)
> >
> > then cmake will error saying that it cannot create named generator
> > "Unix Makefiles".
> >
> > However, if I copy and run the exact command in the terminal,
> > everything runs fine.
> >
> > Any ideas?
> >
> > corey
> > _______________________________________________
> > CMake mailing list
> > [email protected]
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
>
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to