diff --git a/pybindmagic/__init__.py b/pybindmagic/__init__.py index 13579b0..e66c3da 100644 --- a/pybindmagic/__init__.py +++ b/pybindmagic/__init__.py @@ -99,8 +99,9 @@ def cpp(line, cell, *what): if cmake_path is None: ensure_tmp_folder() else: - run_cmake = not ensure_build_dir(cmake_path, clear=rebuild) + ensure_build_dir(cmake_path, clear=rebuild) p = os.path.abspath(os.path.join(cmake_path,"build")) + run_cmake = not os.path.exists(os.path.join(p, "Makefile")) if p not in sys.path: sys.path.append(p) ensure_pybind(cmake_path)