Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(811)

Unified Diff: pylib/gyp/generator/cmake.py

Issue 113463003: Use gyp.common.EnsureDirExists() in more places. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/android.py ('k') | pylib/gyp/generator/eclipse.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/cmake.py
===================================================================
--- pylib/gyp/generator/cmake.py (revision 1813)
+++ pylib/gyp/generator/cmake.py (working copy)
@@ -118,13 +118,6 @@
return os.path.normpath(os.path.join(base_path, rel_path))
-def EnsureDirectoryExists(path):
- """Python version of 'mkdir -p'."""
- dirPath = os.path.dirname(path)
- if dirPath and not os.path.exists(dirPath):
- os.makedirs(dirPath)
-
-
def CMakeStringEscape(a):
"""Escapes the string 'a' for use inside a CMake string.
@@ -1041,7 +1034,7 @@
toplevel_build = os.path.join(options.toplevel_dir, build_dir)
output_file = os.path.join(toplevel_build, 'CMakeLists.txt')
- EnsureDirectoryExists(output_file)
+ gyp.common.EnsureDirExists(output_file)
output = open(output_file, 'w')
output.write('cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)\n')
« no previous file with comments | « pylib/gyp/generator/android.py ('k') | pylib/gyp/generator/eclipse.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698