aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/project
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2021-01-18 02:03:48 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2021-01-18 02:03:48 +0300
commitd5795c04b385f7855df4d774423a7c27c6357c76 (patch)
tree6e535eb10f6425eabaaa2d5c5a5d24ba39d06ae7 /project
parentREADME: update (diff)
downloadcmake-common-d5795c04b385f7855df4d774423a7c27c6357c76.tar.gz
cmake-common-d5795c04b385f7855df4d774423a7c27c6357c76.zip
project.cmake: create the build dir if necessary
Diffstat (limited to '')
-rw-r--r--project/cmake/build.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/project/cmake/build.py b/project/cmake/build.py
index 6bc7772..d2c2070 100644
--- a/project/cmake/build.py
+++ b/project/cmake/build.py
@@ -153,6 +153,8 @@ class BuildParameters:
def create_build_dir(self):
if self.build_dir is not None:
logging.info('Build directory: %s', self.build_dir)
+ if not os.path.exists(self.build_dir):
+ os.makedirs(self.build_dir, exist_ok=True)
yield self.build_dir
return