add error check for qtcreator&netbeans project file generators to quit early if cmake fails.
This commit is contained in:
@@ -56,6 +56,10 @@ def create_nb_project_main():
|
||||
pass
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
if (includes, defines) == (None, None):
|
||||
return
|
||||
|
||||
# for some reason it doesnt give all internal includes
|
||||
includes = list(set(includes) | set(dirname(f) for f in files if is_c_header(f)))
|
||||
includes.sort()
|
||||
|
@@ -81,6 +81,9 @@ def create_qtc_project_main():
|
||||
else:
|
||||
includes, defines = cmake_advanced_info()
|
||||
|
||||
if (includes, defines) == (None, None):
|
||||
return
|
||||
|
||||
# for some reason it doesnt give all internal includes
|
||||
includes = list(set(includes) | set(os.path.dirname(f)
|
||||
for f in files_rel if is_c_header(f)))
|
||||
|
@@ -149,14 +149,20 @@ def cmake_advanced_info():
|
||||
raise Exception("Unknown make program %r" % make_exe)
|
||||
|
||||
os.system(cmd)
|
||||
return join(CMAKE_DIR, ".cproject")
|
||||
|
||||
|
||||
includes = []
|
||||
defines = []
|
||||
|
||||
create_eclipse_project()
|
||||
project_path = create_eclipse_project()
|
||||
|
||||
if not exists(project_path):
|
||||
print("Generating Eclipse Prokect File Failed: %r not found" % project_path)
|
||||
return None, None
|
||||
|
||||
from xml.dom.minidom import parse
|
||||
tree = parse(join(CMAKE_DIR, ".cproject"))
|
||||
tree = parse(project_path)
|
||||
|
||||
# to check on nicer xml
|
||||
# f = open(".cproject_pretty", 'w')
|
||||
|
Reference in New Issue
Block a user