aboutsummaryrefslogtreecommitdiff
path: root/environment.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-10-18 03:33:34 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2015-10-20 18:25:53 +0300
commit910dcbf290242fc099a7dd14f0c55cec9ce5dd7e (patch)
treee5db6c72cf656f9416051061d81c3d2d106e1e3c /environment.py
parent5f2b00233db26b9f35391271152e29fafbce23f7 (diff)
downloadmeson-910dcbf290242fc099a7dd14f0c55cec9ce5dd7e.zip
meson-910dcbf290242fc099a7dd14f0c55cec9ce5dd7e.tar.gz
meson-910dcbf290242fc099a7dd14f0c55cec9ce5dd7e.tar.bz2
Projects can specify default values for options.
Diffstat (limited to 'environment.py')
-rw-r--r--environment.py9
1 files changed, 5 insertions, 4 deletions
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():