diff options
| author | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-11-11 09:25:31 +0100 |
|---|---|---|
| committer | Joerg Bornemann <joerg.bornemann@digia.com> | 2013-11-11 09:25:48 +0100 |
| commit | 7e2df73a397743777e4119e3646af17b5561b1a3 (patch) | |
| tree | b8a60540da740aa707bac318e973b6c0a3dcddc0 | |
| parent | d9c0be935136b3e26e7d7a47d89d28541462d83a (diff) | |
| parent | d6e99112cc72c4e67c2c620c9ca1a71ad3e4eec5 (diff) | |
| download | qbs-7e2df73a397743777e4119e3646af17b5561b1a3.tar.gz | |
Merge remote-tracking branch 'origin/1.1'
Change-Id: I597280483f7477856152f434249d8ee830d5ea40
28 files changed, 652 insertions, 46 deletions
diff --git a/doc/reference/modules/cpp-module.qdoc b/doc/reference/modules/cpp-module.qdoc index b7e0101ca..f5a05425f 100644 --- a/doc/reference/modules/cpp-module.qdoc +++ b/doc/reference/modules/cpp-module.qdoc @@ -483,6 +483,8 @@ \endtable Generate position independent code. + If this property is \c{undefined}, then position independent code is generated for libraries, + but not for applications. \section2 rpaths diff --git a/examples/app-and-lib/app/app.qbs b/examples/app-and-lib/app/app.qbs index 01800e744..ee6fe7f2b 100644 --- a/examples/app-and-lib/app/app.qbs +++ b/examples/app-and-lib/app/app.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 Product { diff --git a/examples/app-and-lib/app_and_lib.qbs b/examples/app-and-lib/app_and_lib.qbs index 56edf28a4..1c3cf5e6e 100644 --- a/examples/app-and-lib/app_and_lib.qbs +++ b/examples/app-and-lib/app_and_lib.qbs @@ -1,4 +1,42 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 + Project { references: [ "app/app.qbs", diff --git a/examples/app-and-lib/lib/lib.qbs b/examples/app-and-lib/lib/lib.qbs index 32d985294..cf54a96c6 100644 --- a/examples/app-and-lib/lib/lib.qbs +++ b/examples/app-and-lib/lib/lib.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 Product { diff --git a/examples/cocoa-application/CocoaApplication.qbs b/examples/cocoa-application/CocoaApplication.qbs index f67adbfc4..b41ac938e 100644 --- a/examples/cocoa-application/CocoaApplication.qbs +++ b/examples/cocoa-application/CocoaApplication.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 CppApplication { diff --git a/examples/collidingmice/collidingmice.qbs b/examples/collidingmice/collidingmice.qbs index 9df92b74c..dd0840509 100644 --- a/examples/collidingmice/collidingmice.qbs +++ b/examples/collidingmice/collidingmice.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 Application { diff --git a/examples/examples.qbs b/examples/examples.qbs index 567d51b9a..030f1e064 100644 --- a/examples/examples.qbs +++ b/examples/examples.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs Project { diff --git a/examples/helloworld-complex/hello.qbs b/examples/helloworld-complex/hello.qbs index 393179a5e..f6c6f8403 100644 --- a/examples/helloworld-complex/hello.qbs +++ b/examples/helloworld-complex/hello.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs 1.0 Project { diff --git a/examples/helloworld-complex/src/foo.cpp b/examples/helloworld-complex/src/foo.cpp index 126abcdbd..fa820658b 100644 --- a/examples/helloworld-complex/src/foo.cpp +++ b/examples/helloworld-complex/src/foo.cpp @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + #ifndef SOMETHING # error missing define SOMETHING #endif diff --git a/examples/helloworld-complex/src/main.cpp b/examples/helloworld-complex/src/main.cpp index 2b4313eaf..041bae259 100644 --- a/examples/helloworld-complex/src/main.cpp +++ b/examples/helloworld-complex/src/main.cpp @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + #include "foo.h" #ifdef HAS_SPECIAL_FEATURE diff --git a/examples/helloworld-complex/src/specialfeature.cpp b/examples/helloworld-complex/src/specialfeature.cpp index 8dad4502f..5aedf7653 100644 --- a/examples/helloworld-complex/src/specialfeature.cpp +++ b/examples/helloworld-complex/src/specialfeature.cpp @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + #include "specialfeature.h" #include <iostream> diff --git a/examples/helloworld-minimal/hello.qbs b/examples/helloworld-minimal/hello.qbs index ed1c15d33..fed181b34 100644 --- a/examples/helloworld-minimal/hello.qbs +++ b/examples/helloworld-minimal/hello.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs CppApplication { diff --git a/examples/helloworld-minimal/main.cpp b/examples/helloworld-minimal/main.cpp index 7f95e64bb..9b74bdaf2 100644 --- a/examples/helloworld-minimal/main.cpp +++ b/examples/helloworld-minimal/main.cpp @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + #include <iostream> int main() diff --git a/examples/helloworld-qt/hello.qbs b/examples/helloworld-qt/hello.qbs index de37369f3..8c7a99e8b 100644 --- a/examples/helloworld-qt/hello.qbs +++ b/examples/helloworld-qt/hello.qbs @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + import qbs CppApplication { diff --git a/examples/helloworld-qt/main.cpp b/examples/helloworld-qt/main.cpp index 0bbe4daac..65193bac6 100644 --- a/examples/helloworld-qt/main.cpp +++ b/examples/helloworld-qt/main.cpp @@ -1,3 +1,40 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the examples of the Qt Build Suite. +** +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names +** of its contributors may be used to endorse or promote products derived +** from this software without specific prior written permission. +** +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +****************************************************************************/ + #include <QCoreApplication> #include <QTextStream> diff --git a/share/qbs/imports/qbs/Probes/PkgConfigProbe.qbs b/share/qbs/imports/qbs/Probes/PkgConfigProbe.qbs index 33b539d1f..07509034d 100644 --- a/share/qbs/imports/qbs/Probes/PkgConfigProbe.qbs +++ b/share/qbs/imports/qbs/Probes/PkgConfigProbe.qbs @@ -19,32 +19,36 @@ Probe { if (!name) throw '"name" must be specified'; var p = new Process(); - var args = [ name ]; - if (minVersion !== undefined) - args.push(name + ' >= ' + minVersion); - if (exactVersion !== undefined) - args.push(name + ' = ' + exactVersion); - if (maxVersion !== undefined) - args.push(name + ' <= ' + maxVersion); - if (p.exec(executable, args.concat([ '--cflags' ])) === 0) { - cflags = p.readStdOut().trim(); - if (cflags === "") - cflags = undefined; - else - cflags = cflags.split(/\s/); - if (p.exec(executable, args.concat([ '--libs' ])) === 0) { - libs = p.readStdOut().trim(); - if (libs === "") - libs = undefined; + try { + var args = [ name ]; + if (minVersion !== undefined) + args.push(name + ' >= ' + minVersion); + if (exactVersion !== undefined) + args.push(name + ' = ' + exactVersion); + if (maxVersion !== undefined) + args.push(name + ' <= ' + maxVersion); + if (p.exec(executable, args.concat([ '--cflags' ])) === 0) { + cflags = p.readStdOut().trim(); + if (cflags === "") + cflags = undefined; else - libs = libs.split(/\s/); - found = true; - print("PkgConfigProbe: found library " + name); - return; + cflags = cflags.split(/\s/); + if (p.exec(executable, args.concat([ '--libs' ])) === 0) { + libs = p.readStdOut().trim(); + if (libs === "") + libs = undefined; + else + libs = libs.split(/\s/); + found = true; + print("PkgConfigProbe: found library " + name); + return; + } } + found = false; + cflags = undefined; + libs = undefined; + } finally { + p.close(); } - found = false; - cflags = undefined; - libs = undefined; } } diff --git a/share/qbs/modules/cpp/DarwinGCC.qbs b/share/qbs/modules/cpp/DarwinGCC.qbs index be5c2ae45..bbe4cf5cb 100644 --- a/share/qbs/modules/cpp/DarwinGCC.qbs +++ b/share/qbs/modules/cpp/DarwinGCC.qbs @@ -180,6 +180,7 @@ UnixGCC { process.exec("plutil", ["-convert", "json", "-o", "-", platformInfoPlist], true); platformInfo = JSON.parse(process.readStdOut()); + process.close(); var additionalProps = platformInfo["AdditionalInfo"]; for (key in additionalProps) { @@ -210,6 +211,7 @@ UnixGCC { process.exec("plutil", ["-convert", "json", "-o", "-", sdkSettingsPlist], true); sdkSettings = JSON.parse(process.readStdOut()); + process.close(); } else { print("warning: sysroot (SDK path) given but no SDKSettings.plist found"); } @@ -223,13 +225,16 @@ UnixGCC { process.exec("plutil", ["-convert", "json", "-o", "-", toolchainInfoPlist], true); toolchainInfo = JSON.parse(process.readStdOut()); + process.close(); } else { print("could not find a ToolchainInfo.plist near the toolchain install path"); } process = new Process(); process.exec("sw_vers", ["-buildVersion"], true); - aggregatePlist["BuildMachineOSBuild"] = process.readStdOut().trim(); + var osBuildVersion = process.readStdOut().trim(); + aggregatePlist["BuildMachineOSBuild"] = osBuildVersion; + process.close(); // setup env env = { @@ -240,9 +245,7 @@ UnixGCC { "XCODE_PRODUCT_BUILD_VERSION": platformInfo["DTPlatformBuild"], "PLATFORM_PRODUCT_BUILD_VERSION": platformInfo["ProductBuildVersion"], } - process = new Process(); - process.exec("sw_vers", ["-buildVersion"], true); - env["MAC_OS_X_PRODUCT_BUILD_VERSION"] = process.readStdOut().trim(); + env["MAC_OS_X_PRODUCT_BUILD_VERSION"] = osBuildVersion; for (key in buildEnv) env[key] = buildEnv[key]; @@ -266,6 +269,7 @@ UnixGCC { // Convert the written file to the format appropriate for the current platform process = new Process(); process.exec("plutil", ["-convert", infoPlistFormat, outputs.infoplist[0].fileName], true); + process.close(); } return cmd; } diff --git a/share/qbs/modules/cpp/GenericGCC.qbs b/share/qbs/modules/cpp/GenericGCC.qbs index 6186d90eb..35821fdeb 100644 --- a/share/qbs/modules/cpp/GenericGCC.qbs +++ b/share/qbs/modules/cpp/GenericGCC.qbs @@ -148,7 +148,7 @@ CppModule { for (var i = 0; i < symlinkCount; ++i) { cmd = new Command("ln", ["-sf", FileInfo.fileName(libFilePath), links[i].fileName]); - cmd.description = "filegen"; + cmd.highlight = "filegen"; cmd.description = "creating symbolic link '" + FileInfo.fileName(links[i].fileName) + "'"; cmd.workingDirectory = FileInfo.path(libFilePath); @@ -272,7 +272,7 @@ CppModule { Rule { id: compiler - inputs: ["cpp", "c", "objcpp", "objc"] + inputs: ["cpp", "c", "objcpp", "objc", "asm", "asm_cpp"] auxiliaryInputs: ["hpp"] explicitlyDependsOn: ["c_pch", "cpp_pch", "objc_pch", "objcpp_pch"] @@ -333,4 +333,19 @@ CppModule { return Gcc.prepareCompiler.apply(this, arguments); } } + + FileTagger { + pattern: "*.s" + fileTags: ["asm"] + } + + FileTagger { + pattern: "*.S" + fileTags: ["asm_cpp"] + } + + FileTagger { + pattern: "*.sx" + fileTags: ["asm_cpp"] + } } diff --git a/share/qbs/modules/cpp/bundle-tools.js b/share/qbs/modules/cpp/bundle-tools.js index 6ce48c38c..4e2bf361b 100644 --- a/share/qbs/modules/cpp/bundle-tools.js +++ b/share/qbs/modules/cpp/bundle-tools.js @@ -28,12 +28,16 @@ function infoPlistContents(infoPlistFilePath) return undefined; var process = new Process(); - process.start("plutil", ["-convert", "json", "-o", "-", infoPlistFilePath]); - process.waitForFinished(); - if (process.exitCode() != 0) - throw("plutil: " + (process.readStdErr().trim() || process.readStdOut().trim())); - - return JSON.parse(process.readStdOut()); + try { + process.start("plutil", ["-convert", "json", "-o", "-", infoPlistFilePath]); + process.waitForFinished(); + if (process.exitCode() !== 0) + throw("plutil: " + (process.readStdErr().trim() || process.readStdOut().trim())); + + return JSON.parse(process.readStdOut()); + } finally { + process.close(); + } } function infoPlistFormat(infoPlistFilePath) @@ -43,21 +47,26 @@ function infoPlistFormat(infoPlistFilePath) // Verify that the Info.plist format is actually valid in the first place var process = new Process(); - process.start("plutil", ["-lint", infoPlistFilePath]); - process.waitForFinished(); - if (process.exitCode() != 0) - throw("plutil: " + (process.readStdErr().trim() || process.readStdOut().trim())); + try { + process.start("plutil", ["-lint", infoPlistFilePath]); + process.waitForFinished(); + if (process.exitCode() !== 0) + throw("plutil: " + (process.readStdErr().trim() || process.readStdOut().trim())); + } finally { + process.close(); + } process = new Process(); process.start("file", ["-bI", infoPlistFilePath]); process.waitForFinished(); var magic = process.readStdOut().trim(); + process.close(); if (magic.indexOf("application/octet-stream;") === 0) return "binary1"; else if (magic.indexOf("application/xml;") === 0) return "xml1"; - else if (magic.indexOf("text/plain;") == 0) + else if (magic.indexOf("text/plain;") === 0) return "json"; return undefined; diff --git a/share/qbs/modules/cpp/gcc.js b/share/qbs/modules/cpp/gcc.js index 453b2b31e..6dc75a041 100644 --- a/share/qbs/modules/cpp/gcc.js +++ b/share/qbs/modules/cpp/gcc.js @@ -145,11 +145,11 @@ function additionalCompilerFlags(product, input, output) } var args = [] + var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (effectiveType === EffectiveTypeEnum.LIB) { - if (!product.moduleProperty("qbs", "toolchain").contains("mingw")) + if (positionIndependentCode !== false && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIC'); } else if (effectiveType === EffectiveTypeEnum.APP) { - var positionIndependentCode = product.moduleProperty('cpp', 'positionIndependentCode') if (positionIndependentCode && !product.moduleProperty("qbs", "toolchain").contains("mingw")) args.push('-fPIE'); } else { @@ -249,6 +249,10 @@ function languageName(fileTag) return 'objective-c'; else if (fileTag === 'objcpp') return 'objective-c++'; + else if (fileTag === 'asm') + return 'assembler'; + else if (fileTag === 'asm_cpp') + return 'assembler-with-cpp'; } function prepareCompiler(project, product, inputs, outputs, input, output) @@ -257,8 +261,8 @@ function prepareCompiler(project, product, inputs, outputs, input, output) // Determine which C-language we're compiling var tag = ModUtils.fileTagForTargetLanguage(input.fileTags.concat(output.fileTags)); - if (!["c", "cpp", "objc", "objcpp"].contains(tag)) - throw ("unsupported source language"); + if (!["c", "cpp", "objc", "objcpp", "asm", "asm_cpp"].contains(tag)) + throw ("unsupported source language: " + tag); // Whether we're compiling a precompiled header or normal source file var pchOutput = outputs[tag + "_pch"] ? outputs[tag + "_pch"][0] : undefined; diff --git a/share/qbs/modules/utils.js b/share/qbs/modules/utils.js index 5b3349ca6..9ec02d8db 100644 --- a/share/qbs/modules/utils.js +++ b/share/qbs/modules/utils.js @@ -11,7 +11,7 @@ */ function fileTagForTargetLanguage(fileTags) { - var srcTags = ["c", "cpp", "objc", "objcpp"]; + var srcTags = ["c", "cpp", "objc", "objcpp", "asm", "asm_cpp"]; var pchTags = ["c_pch", "cpp_pch", "objc_pch", "objcpp_pch"]; var canonicalTag = undefined; diff --git a/tests/auto/blackbox/testdata/assembly/assembly.qbs b/tests/auto/blackbox/testdata/assembly/assembly.qbs new file mode 100644 index 000000000..344e65cd1 --- /dev/null +++ b/tests/auto/blackbox/testdata/assembly/assembly.qbs @@ -0,0 +1,23 @@ +import qbs 1.0 + +Project { + StaticLibrary { + name : "testa" + files : [ "testa.s" ] + Depends { name: "cpp" } + condition: qbs.toolchain.contains("gcc") + } + StaticLibrary { + name : "testb" + files : [ "testb.S" ] + Depends { name: "cpp" } + condition: qbs.toolchain.contains("gcc") + } + StaticLibrary { + name : "testc" + files : [ "testc.sx" ] + Depends { name: "cpp" } + condition: qbs.toolchain.contains("gcc") + } +} + diff --git a/tests/auto/blackbox/testdata/assembly/testa.s b/tests/auto/blackbox/testdata/assembly/testa.s new file mode 100644 index 000000000..39e402ae0 --- /dev/null +++ b/tests/auto/blackbox/testdata/assembly/testa.s @@ -0,0 +1,3 @@ +.globl symbola +symbola: + nop diff --git a/tests/auto/blackbox/testdata/assembly/testb.S b/tests/auto/blackbox/testdata/assembly/testb.S new file mode 100644 index 000000000..845be5502 --- /dev/null +++ b/tests/auto/blackbox/testdata/assembly/testb.S @@ -0,0 +1,3 @@ +#define bla nop +symbolb: + bla diff --git a/tests/auto/blackbox/testdata/assembly/testc.sx b/tests/auto/blackbox/testdata/assembly/testc.sx new file mode 100644 index 000000000..845be5502 --- /dev/null +++ b/tests/auto/blackbox/testdata/assembly/testc.sx @@ -0,0 +1,3 @@ +#define bla nop +symbolb: + bla diff --git a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs index 681a93f28..b56412bed 100644 --- a/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs +++ b/tests/auto/blackbox/testdata/fileTagger/moc_cpp.qbs @@ -28,6 +28,7 @@ Project { cmd.sourceCode = function () { var file = new TextFile(input.fileName, TextFile.ReadOnly); var text = file.readAll(); + file.close(); file = new TextFile(output.fileName, TextFile.WriteOnly); file.truncate(); file.write(text); diff --git a/tests/auto/blackbox/tst_blackbox.cpp b/tests/auto/blackbox/tst_blackbox.cpp index 116da31fa..30b62dc41 100644 --- a/tests/auto/blackbox/tst_blackbox.cpp +++ b/tests/auto/blackbox/tst_blackbox.cpp @@ -1476,4 +1476,19 @@ void TestBlackbox::missingProfile() QVERIFY(m_qbsStderr.contains("No profile")); } +void TestBlackbox::testAssembly() +{ + SettingsPtr settings = qbsSettings(); + Profile profile(buildProfileName, settings.data()); + bool haveGcc = profile.value("qbs.toolchain").toString().contains("gcc"); + QDir::setCurrent(testDataDir + "/assembly"); + QVERIFY(runQbs() == 0); + QCOMPARE((bool)m_qbsStdout.contains("compiling testa.s"), haveGcc); + QCOMPARE((bool)m_qbsStdout.contains("compiling testb.S"), haveGcc); + QCOMPARE((bool)m_qbsStdout.contains("compiling testc.sx"), haveGcc); + QCOMPARE((bool)m_qbsStdout.contains("creating libtesta.a"), haveGcc); + QCOMPARE((bool)m_qbsStdout.contains("creating libtestb.a"), haveGcc); + QCOMPARE((bool)m_qbsStdout.contains("creating libtestc.a"), haveGcc); +} + QTEST_MAIN(TestBlackbox) diff --git a/tests/auto/blackbox/tst_blackbox.h b/tests/auto/blackbox/tst_blackbox.h index f86e7617c..24e8dce5d 100644 --- a/tests/auto/blackbox/tst_blackbox.h +++ b/tests/auto/blackbox/tst_blackbox.h @@ -152,6 +152,7 @@ private slots: void toolLookup(); void checkProjectFilePath(); void missingProfile(); + void testAssembly(); private: QByteArray m_qbsStderr; |
