diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2014-02-23 22:07:54 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2014-02-23 22:07:54 +0200 |
commit | 836c978c94e4a0b94c269cbd10a8eeea0437ff66 (patch) | |
tree | 333ad75201c9b275e8d2ba9233788db6c0bf5d96 /build.py | |
parent | 7bc3b78c68642abd282c9ca9b26bde5e6dd0eaab (diff) | |
download | meson-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.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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.') |