[cmake-developers] [CMake 0016062]: Policy CMP0037 should only warn about "test" and "package" being reserved if CTest and CPack are being used
The following issue has been SUBMITTED. == https://cmake.org/Bug/view.php?id=16062 == Reported By:Ben Boeckel Assigned To: == Project:CMake Issue ID: 16062 Category: CMake Reproducibility:always Severity: minor Priority: normal Status: new == Date Submitted: 2016-04-13 15:37 EDT Last Modified: 2016-04-13 15:37 EDT == Summary:Policy CMP0037 should only warn about "test" and "package" being reserved if CTest and CPack are being used Description: Common complaint among those not using CTest for testing, but want "make test" to use their test running infrastructure. == Issue History Date ModifiedUsername FieldChange == 2016-04-13 15:37 Ben BoeckelNew Issue == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automoc same source - More thoughts
Am 13.04.2016 um 16:40 schrieb Brad King: On 04/13/2016 10:08 AM, Sebastian Holtermann wrote: Well, looking into the sources and there is already Tests/QtAutogen. It covers various #include "moc_..." cases. Perhaps, but as pointed out in the issue tracker entry I linked those test cases were not sufficient to fail after the the incorrect fix made and reverted there. Please identify why and extend them. Here is a patch that introduces the same-source-name test in Tests/QtAutogen. With the current git cmake the test fails. The latest moc-directory-patch from earlier in this thread (cmake_automoc_directory_fix-2016-04-12-3.patch) fixes the issue. -Sebastian >From 3e8b56da1d10defa471bd8fa1f30393c16ad5745 Mon Sep 17 00:00:00 2001 From: Sebastian HoltermannDate: Wed, 13 Apr 2016 20:05:04 +0200 Subject: [PATCH] Tests/QtAutogen: New Same source name in different directories test --- Tests/QtAutogen/CMakeLists.txt | 19 +++ Tests/QtAutogen/item.cpp | 10 ++ Tests/QtAutogen/item.hpp | 17 + Tests/QtAutogen/sname.cpp | 20 Tests/QtAutogen/sname/item.cpp | 6 ++ Tests/QtAutogen/sname/item.hpp | 13 + Tests/QtAutogen/sname/sdA/item.cpp | 10 ++ Tests/QtAutogen/sname/sdA/item.hpp | 17 + Tests/QtAutogen/sname/sdA/sdB/item.cpp | 12 Tests/QtAutogen/sname/sdA/sdB/item.hpp | 19 +++ Tests/QtAutogen/sname/sdB/item.cpp | 10 ++ Tests/QtAutogen/sname/sdB/item.hpp | 17 + Tests/QtAutogen/sname/sdB/sdA/item.cpp | 12 Tests/QtAutogen/sname/sdB/sdA/item.hpp | 19 +++ Tests/QtAutogen/sname/sdC/item.cpp | 13 + Tests/QtAutogen/sname/sdC/item.hpp | 17 + 16 files changed, 231 insertions(+) create mode 100644 Tests/QtAutogen/item.cpp create mode 100644 Tests/QtAutogen/item.hpp create mode 100644 Tests/QtAutogen/sname.cpp create mode 100644 Tests/QtAutogen/sname/item.cpp create mode 100644 Tests/QtAutogen/sname/item.hpp create mode 100644 Tests/QtAutogen/sname/sdA/item.cpp create mode 100644 Tests/QtAutogen/sname/sdA/item.hpp create mode 100644 Tests/QtAutogen/sname/sdA/sdB/item.cpp create mode 100644 Tests/QtAutogen/sname/sdA/sdB/item.hpp create mode 100644 Tests/QtAutogen/sname/sdB/item.cpp create mode 100644 Tests/QtAutogen/sname/sdB/item.hpp create mode 100644 Tests/QtAutogen/sname/sdB/sdA/item.cpp create mode 100644 Tests/QtAutogen/sname/sdB/sdA/item.hpp create mode 100644 Tests/QtAutogen/sname/sdC/item.cpp create mode 100644 Tests/QtAutogen/sname/sdC/item.hpp diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index d5aca55..7aad28b 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -110,6 +110,25 @@ set_target_properties( AUTOMOC TRUE ) +# Test AUTOMOC on source files with the same name but in different directories +add_executable(same_name + sname/sdA/sdB/item.cpp + sname/sdA/item.cpp + sname/sdB/sdA/item.cpp + sname/sdB/item.cpp + sname/sdC/item.cpp + sname/item.cpp + item.cpp + sname.cpp + ) +target_include_directories(same_name PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +target_link_libraries(same_name ${QT_LIBRARIES}) +set_target_properties( + same_name + PROPERTIES + AUTOMOC TRUE +) + include(GenerateExportHeader) # The order is relevant here. B depends on A, and B headers depend on A # headers both subdirectories use CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE and we diff --git a/Tests/QtAutogen/item.cpp b/Tests/QtAutogen/item.cpp new file mode 100644 index 000..0c96f34 --- /dev/null +++ b/Tests/QtAutogen/item.cpp @@ -0,0 +1,10 @@ +#include "item.hpp" + +namespace root { + +void +Item::go ( ) +{ +} + +} diff --git a/Tests/QtAutogen/item.hpp b/Tests/QtAutogen/item.hpp new file mode 100644 index 000..bda4bb0 --- /dev/null +++ b/Tests/QtAutogen/item.hpp @@ -0,0 +1,17 @@ +#ifndef ROOT_ITEM_HPP +#define ROOT_ITEM_HPP + +#include + +namespace root { + +class Item : public QObject +{ + Q_OBJECT + Q_SLOT + void go ( ); +}; + +} + +#endif diff --git a/Tests/QtAutogen/sname.cpp b/Tests/QtAutogen/sname.cpp new file mode 100644 index 000..fd125f9 --- /dev/null +++ b/Tests/QtAutogen/sname.cpp @@ -0,0 +1,20 @@ +#include "item.hpp" +#include "sname/item.hpp" +#include "sname/sdA/item.hpp" +#include "sname/sdA/sdB/item.hpp" +#include "sname/sdB/item.hpp" +#include "sname/sdB/sdA/item.hpp" +#include "sname/sdC/item.hpp" + +int main(int argv, char **args) +{ + // Object instances + ::root::Item ritem; + Item item; + ::sdA::Item itemA; + ::sdA::sdB::Item itemAB; + ::sdB::Item itemB; + ::sdB::sdA::Item itemBA; + ::sdC::Item itemC; + return 0; +} diff --git a/Tests/QtAutogen/sname/item.cpp b/Tests/QtAutogen/sname/item.cpp new file mode 100644 index 000..508f6a6 --- /dev/null +++
Re: [cmake-developers] Automoc same source - More thoughts
Am 13.04.2016 um 16:40 schrieb Brad King: On 04/13/2016 10:08 AM, Sebastian Holtermann wrote: Well, looking into the sources and there is already Tests/QtAutogen. It covers various #include "moc_..." cases. Perhaps, but as pointed out in the issue tracker entry I linked those test cases were not sufficient to fail after the the incorrect fix made and reverted there. Please identify why and extend them. Ok, I think I've identifier the problem of the current test (includer abc.cpp is not in a subdirectory of CMAKE_CURRENT_BINARY_DIR). I will prepare another test that fails on the incorrect fix, too. -Sebastian -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
[cmake-developers] [CMake 0016061]: define SOLARIS and CMAKE_HOST_SOLARIS as a cmake built-in
The following issue has been SUBMITTED. == https://public.kitware.com/Bug/view.php?id=16061 == Reported By:Stefan Teleman Assigned To: == Project:CMake Issue ID: 16061 Category: CMake Reproducibility:always Severity: trivial Priority: normal Status: new == Date Submitted: 2016-04-13 11:02 EDT Last Modified: 2016-04-13 11:02 EDT == Summary:define SOLARIS and CMAKE_HOST_SOLARIS as a cmake built-in Description: in ${top_srcdir}/Source/cmState.cxx: void cmState::Snapshot::SetDefaultDefinitions() several builtins are defined: WIN32/CMAKE_HOST_WIN32, APPLE/CMAKE_HOST_APPLE, etc. We would like to submit this patch to add corresponding definitions for Solaris: SOLARIS/CMAKE_HOST_SOLARIS Proposed patch - cmState.cxx-solaris.patch - attached. The patch is based on cmake 3.5.0. Steps to Reproduce: Always - the SOLARIS/CMAKE_HOST_SOLARIS definition is not present in cmake. == Issue History Date ModifiedUsername FieldChange == 2016-04-13 11:02 Stefan Teleman New Issue 2016-04-13 11:02 Stefan Teleman File Added: cmState.cxx-solaris.patch == -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automoc same source - More thoughts
On 04/13/2016 10:08 AM, Sebastian Holtermann wrote: > Well, looking into the sources and there is already Tests/QtAutogen. > It covers various #include "moc_..." cases. Perhaps, but as pointed out in the issue tracker entry I linked those test cases were not sufficient to fail after the the incorrect fix made and reverted there. Please identify why and extend them. > What is missing is a same-name case. > I will post an updated patch later. Thanks! -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers
Re: [cmake-developers] Automoc same source - More thoughts
Am 12.04.2016 um 21:26 schrieb Brad King: On 04/12/2016 03:12 PM, Sebastian Holtermann wrote: Here it is. Please review/commit. To test it insert #include "moc_item.cpp" in any or many of the item.cpp files of the attached test project. Thanks for working on this! As requested in the issue tracker entry you linked, in this comment: https://cmake.org/Bug/view.php?id=12873#c40513 please extend the CMake test suite with a case covering this. We need to test both the conflicting source name use case and the #include "moc_..." use case. Please revise the patch to include such tests. Thanks for the feedback. Well, looking into the sources and there is already Tests/QtAutogen. It covers various #include "moc_..." cases. What is missing is a same-name case. I will post an updated patch later. Regards, Sebastian -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers