Call CMake from python script results in "Could not create named generator" -


i'm building project should able move freely between machines. in order not have hundreds of mb of libs i'm writing series of python scripts download , build dependencies own project. i'm using cmake generate vs projects.

to call cmake build command line , use python subprocess.check_call below

cmakecmd = ["cmake.exe", '-g "visual studio 11 win64"', build_path] retcode = subprocess.check_call(cmakecmd, stderr=subprocess.stdout, shell=true) 

the problem if use -g option cmake following error regardless of generator choose:

cmake error: not create named generator  "visual studio 11 win64" 

i thinking should enviroment variable missing python path complete systems' variables.

what odd if don't set generator , let cmake choose default 1 script runs fine. have no ideia why.

you need split -g flag value in command. python appears invoking

cmake "-g visual studio 11 win64" <build_path> 

what want more like:

cmakecmd = ["cmake.exe", "-g", "visual studio 11 win64", build_path] 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -