From 910dcbf290242fc099a7dd14f0c55cec9ce5dd7e Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sun, 18 Oct 2015 03:33:34 +0300 Subject: Projects can specify default values for options. --- environment.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'environment.py') diff --git a/environment.py b/environment.py index 41520d1..c4878f4 100644 --- a/environment.py +++ b/environment.py @@ -12,9 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -import re -import coredata -from glob import glob +import os, re, subprocess +import coredata, mesonlib from compilers import * import configparser @@ -68,13 +67,15 @@ class Environment(): try: cdf = os.path.join(self.get_build_dir(), Environment.coredata_file) self.coredata = coredata.load(cdf) + self.first_invocation = False except FileNotFoundError: self.coredata = coredata.CoreData(options) + self.first_invocation = True if self.coredata.cross_file: self.cross_info = CrossBuildInfo(self.coredata.cross_file) else: self.cross_info = None - self.cmd_line_options = options.projectoptions + self.cmd_line_options = options # List of potential compilers. if mesonlib.is_windows(): -- cgit v1.1