aboutsummaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2014-02-23 22:07:54 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2014-02-23 22:07:54 +0200
commit836c978c94e4a0b94c269cbd10a8eeea0437ff66 (patch)
tree333ad75201c9b275e8d2ba9233788db6c0bf5d96 /build.py
parent7bc3b78c68642abd282c9ca9b26bde5e6dd0eaab (diff)
downloadmeson-836c978c94e4a0b94c269cbd10a8eeea0437ff66.zip
meson-836c978c94e4a0b94c269cbd10a8eeea0437ff66.tar.gz
meson-836c978c94e4a0b94c269cbd10a8eeea0437ff66.tar.bz2
C++ compiler can compile .h file, too.
Diffstat (limited to 'build.py')
-rw-r--r--build.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/build.py b/build.py
index 3a2cd1e..b8a3ad1 100644
--- a/build.py
+++ b/build.py
@@ -319,7 +319,10 @@ class BuildTarget():
def add_pch(self, language, pchlist):
if len(pchlist) == 0:
return
- if len(pchlist) == 2:
+ elif len(pchlist) == 1:
+ if not environment.is_header(pchlist[0]):
+ raise InvalidArguments('Pch argument %s is not a header.' % pchlist[0])
+ elif len(pchlist) == 2:
if environment.is_header(pchlist[0]):
if not environment.is_source(pchlist[1]):
raise InvalidArguments('PCH definition must contain one header and at most one source.')