[CMake] Cannot create named generator when executing cmake
through script (python)
Raphael Cotty
raphael.cotty at googlemail.com
Fri Aug 24 04:38:20 EDT 2007
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 < corey.taylor at gmail.com> 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
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/cmake/attachments/20070824/6be0a6cd/attachment.htm
More information about the CMake
mailing list