[Cmake-commits] CMake branch, master, updated. v3.13.1-703-gdea01ac
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via dea01ac30a00ddf495eda3b60f3818f2340d8fba (commit) from 6a6900f61666977948bffa1409d4633799de323c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dea01ac30a00ddf495eda3b60f3818f2340d8fba commit dea01ac30a00ddf495eda3b60f3818f2340d8fba Author: Kitware Robot AuthorDate: Thu Dec 13 00:01:05 2018 -0500 Commit: Kitware Robot CommitDate: Thu Dec 13 00:01:05 2018 -0500 CMake Nightly Date Stamp diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 7abab01..b43f9fd 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 13) -set(CMake_VERSION_PATCH 20181212) +set(CMake_VERSION_PATCH 20181213) #set(CMake_VERSION_RC 1) --- Summary of changes: Source/CMakeVersion.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) hooks/post-receive -- CMake ___ Cmake-commits mailing list Cmake-commits@cmake.org https://cmake.org/mailman/listinfo/cmake-commits
[cmake-developers] [ANNOUNCE] cmake.org, gitlab.kitware.com, dashboard downtime
Cmake Devs, Kitware NY is moving into a new office building on Dec 15th. This involves moving the company's network and testing infrastructure. As a result, there will be downtime for dashboard machines starting on Dec 13th, and websites starting on Dec 15th. Expect cmake.org, cmake.org/cmake/help/, open.cdash.org, and gitlab.kitware.com to be unavailable all day Dec. 15th while we physically move everything and complete the network cutover. Expect dashboards to start coming online on Dec 17th. There is a good chance of network connectivity being unstable for a few days afterwards while we troubleshoot and fix any issues. -- 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: https://cmake.org/mailman/listinfo/cmake-developers
[CMake] [ANNOUNCE] cmake.org and gitlab.kitware.com downtime
CMake Users, Kitware NY is moving into a new office building on Dec 15th. This involves moving the company's network infrastructure. As a result, there will be downtime for cmake.org, cmake.org/cmake/help/, open.cdash.org, and gitlab.kitware.com. We expect that these sites will be unavailable all day Dec. 15th while we physically move everything and complete the network cutover. There is a good chance of network connectivity being unstable for a few days afterwards while we troubleshoot and fix any issues. -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] Changed behavior of CPACK_PACKAGE_VERSION generation?
Hi, Today we discovered that our generated CPACK_PACKAGE_VERSION variables were broken. This is probably related to us updating to a newer version of CMake. Previously we generated this variable by setting the CPACK_PACKAGE_VERSION_MAJOR and CPACK_PACKAGE_VERSION_MINOR to fixed values, while CPACK_PACKAGE_VERSION_PATCH was set to variable name. This name was then replaced by running a custom target just before building. In this target the variable name got replaced with the current SVN revision number. This have worked the last years, but now the variable name just gets omitted when we run "generate" in CMake. A short example: cmake_minimum_required(VERSION 2.8.9) project (hello) add_executable(hello helloworld.cpp) set(CPACK_PACKAGE_VERSION_MAJOR "1") set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_PATCH "REPLACEME") include(CPack) Would result in the following strings in CPackConfig.cmake: --- set(CPACK_PACKAGE_VERSION "1.0.REPLACEME") set(CPACK_PACKAGE_VERSION_MAJOR "1") set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_PATCH "REPLACEME") But with the CMake 3.12.2 this will be: --- set(CPACK_PACKAGE_VERSION "1.0") set(CPACK_PACKAGE_VERSION_MAJOR "1") set(CPACK_PACKAGE_VERSION_MINOR "0") set(CPACK_PACKAGE_VERSION_PATCH "REPLACEME") So our CPACK_PACKAGE_VERSION will omit the variable name, which in turn makes our custom target to fail. Our quick fix was to add the following line to our CMakeList.txt file: SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") My question is: Is this change of behavior intended? Are only numbers allowed to be part of the CPack version variable? Regards Björn Blissing -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] FindBZip2 fails to set BZIP2_NEED_PREFIX if using x64
Hi Everyone, I posted a bug ticket (https://gitlab.kitware.com/cmake/cmake/issues/18701) but I’m not sure if this is a bug in CMake or I just missed something. Configuring a project that contains find_package(BZip2) cmake "Visual Studio 14 2015" ../ will correctly produce -- Looking for BZ2_bzCompressInit -- Looking for BZ2_bzCompressInit - found while cmake "Visual Studio 14 2015" -A x64 ../ will erroneously show -- Looking for BZ2_bzCompressInit -- Looking for BZ2_bzCompressInit - not found Using "NMake Makefiles" as generator will bear identical results for the 32 and 64 bit versions. Tested with CMake 3.13.1 Anyone experienced this before? Thanks, Luca Beldi This communication may contain privileged or confidential information. If you are not the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution or copying of this message is strictly prohibited. Any views or opinions presented are solely those of the author and do not necessarily represent those of TwentyFour Asset Management LLP or their affiliates. If you have received this communication in error, please notify us immediately by email, and delete the original message. We do not waive confidentiality by mis-transmission. This communication is directed in the UK to those persons who are Eligible Counterparties or Professional Clients (as defined by the Financial Conduct Authority). This is not an offer, or solicitation of any offer to buy or sell any security, investment or other product. TwentyFour Asset Management LLP treats all personal data in accordance with the Data Protection Act 1998 and is duly registered with the Information Commissioner’s Office as a Data Controller. Personal data is only retained and used by us as a means of communication and will not be released to any other parties. TwentyFour Asset Management LLP is a Limited Liability Partnership incorporated in England under Partnership No. OC335015 with its registered office at 8th Floor, The Monument Building, 11 Monument Street, London, EC3R 8AF and is authorised and regulated in the UK by the Financial Conduct Authority, FRN No.481888. -- 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: https://cmake.org/mailman/listinfo/cmake
[Cmake-commits] CMake branch, master, updated. v3.13.1-702-g6a6900f
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via 6a6900f61666977948bffa1409d4633799de323c (commit) via 71e74b4ae453473d597ce5a53e2e8e7641dc832a (commit) via fe9a16c80fe921d2db66c0699b4197f85a281e7e (commit) via dda4755b467db297b04cc1678e0d7c6035ad4c2f (commit) via a23ac516b3ccdba9efb22f19edcb7cd676a510b4 (commit) via 4a5e003d4c69c054a7e0123d9ec3adb5bdbd6e39 (commit) via 287bf93a114cae7461e8bf8da021b135ce561a1a (commit) via bab24e782c1bf56ef7263e91e5cf78879699a036 (commit) via c86e82c09299211c76366640dd0f21a6d5acc9e8 (commit) via e0d6d01e522d4207eecc927cffabbb9a8d1b757d (commit) via 83dab0c123c0831c736fed5de3c24c2168e40541 (commit) from abccf484e3c13395520fea544885e139fc79475e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a6900f61666977948bffa1409d4633799de323c commit 6a6900f61666977948bffa1409d4633799de323c Merge: 71e74b4 bab24e7 Author: Brad King AuthorDate: Wed Dec 12 13:32:11 2018 + Commit: Kitware Robot CommitDate: Wed Dec 12 08:32:17 2018 -0500 Merge topic 'object-library-link' bab24e782c target_link_libraries: Propagate dependencies of object libraries Acked-by: Kitware Robot Merge-request: !2725 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71e74b4ae453473d597ce5a53e2e8e7641dc832a commit 71e74b4ae453473d597ce5a53e2e8e7641dc832a Merge: a23ac51 fe9a16c Author: Brad King AuthorDate: Wed Dec 12 13:30:35 2018 + Commit: Kitware Robot CommitDate: Wed Dec 12 08:30:45 2018 -0500 Merge topic 'fix-configure-line-number' fe9a16c80f cmMakefile: Fix @CMAKE_CURRENT_LIST_LINE@ for ExpandVariablesInStringNew dda4755b46 cmMakefile: Fix ConfigureString not passing filename and line Acked-by: Kitware Robot Merge-request: !2675 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe9a16c80fe921d2db66c0699b4197f85a281e7e commit fe9a16c80fe921d2db66c0699b4197f85a281e7e Author: Artur Ryt AuthorDate: Fri Nov 30 23:51:05 2018 +0100 Commit: Brad King CommitDate: Wed Dec 12 08:29:14 2018 -0500 cmMakefile: Fix @CMAKE_CURRENT_LIST_LINE@ for ExpandVariablesInStringNew Added check for variable name in @@ evaluation and test for configuring @CMAKE_CURRENT_LIST_LINE@ with new CMP0053 Fixes: #18646 diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 9ed0dc3..5cd6ba5 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2727,6 +2727,7 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( cmState* state = this->GetCMakeInstance()->GetState(); + static const std::string lineVar = "CMAKE_CURRENT_LIST_LINE"; do { char inc = *in; switch (inc) { @@ -2739,7 +2740,6 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( const char* value = nullptr; std::string varresult; std::string svalue; - static const std::string lineVar = "CMAKE_CURRENT_LIST_LINE"; switch (var.domain) { case NORMAL: if (filename && lookup == lineVar) { @@ -2889,7 +2889,14 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( "abcdefghijklmnopqrstuvwxyz" "0123456789/_.+-")) { std::string variable(in + 1, nextAt - in - 1); -std::string varresult = this->GetSafeDefinition(variable); + +std::string varresult; +if (filename && variable == lineVar) { + varresult = std::to_string(line); +} else { + varresult = this->GetSafeDefinition(variable); +} + if (escapeQuotes) { varresult = cmSystemTools::EscapeQuotes(varresult); } diff --git a/Tests/CMakeTests/StringTest.cmake.in b/Tests/CMakeTests/StringTest.cmake.in index 3e9327b..154afa7 100644 --- a/Tests/CMakeTests/StringTest.cmake.in +++ b/Tests/CMakeTests/StringTest.cmake.in @@ -81,7 +81,7 @@ check_cmake_test(String # Execute each test listed in StringTestScript.cmake: # set(scriptname "@CMAKE_CURRENT_SOURCE_DIR@/StringTestScript.cmake") -set(number_of_tests_expected 73) +set(number_of_tests_expected 74) include("@CMAKE_CURRENT_SOURCE_DIR@/ExecuteScriptTests.cmake") execute_all_script_tests(${scriptname} number_of_tests_executed) diff --git a/Tests/CMakeTests/StringTestScript.cmake b/Tests/CMakeTests/StringTestScript.cmake index d8f31dd..e069897 100644 --- a/Tests/CMakeTests/StringTestScript.cmake +++ b/Tests/CMakeTests/StringTestScript.cmake @@ -54,6 +54,9 @@
[Cmake-commits] CMake branch, master, updated. v3.13.1-691-gabccf48
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake". The branch, master has been updated via abccf484e3c13395520fea544885e139fc79475e (commit) via ed5087e32c517bac158f541fa7ea916c670ec915 (commit) via 3e0eb3307f2fd4c70fdb6eb4cd0ab44196107c89 (commit) via 33f08eec18b440eac1f24f6f18b971c6203307bd (commit) via 87e810f223bad6fb889e7ae4ad08be98461bf6e2 (commit) from c337b2a0b455942eb747d22c0cd71e60db54989d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log - https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=abccf484e3c13395520fea544885e139fc79475e commit abccf484e3c13395520fea544885e139fc79475e Merge: ed5087e 3e0eb33 Author: Brad King AuthorDate: Wed Dec 12 13:20:30 2018 + Commit: Kitware Robot CommitDate: Wed Dec 12 08:20:43 2018 -0500 Merge topic 'default-test-timeout' 3e0eb3307f Help: clarify documentation of ctest --timeout Acked-by: Kitware Robot Merge-request: !2721 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ed5087e32c517bac158f541fa7ea916c670ec915 commit ed5087e32c517bac158f541fa7ea916c670ec915 Merge: c337b2a 33f08ee Author: Brad King AuthorDate: Wed Dec 12 13:19:42 2018 + Commit: Kitware Robot CommitDate: Wed Dec 12 08:19:49 2018 -0500 Merge topic 'output-converter-simplify' 33f08eec18 cmOutputConverter: Moved ContainedInDirectory to cmStateDirectory 87e810f223 cmOutputConverter: Moved ForceToRelativePath to cmSystem Acked-by: Kitware Robot Merge-request: !2665 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3e0eb3307f2fd4c70fdb6eb4cd0ab44196107c89 commit 3e0eb3307f2fd4c70fdb6eb4cd0ab44196107c89 Author: Regina Pfeifer AuthorDate: Sun Dec 9 22:10:31 2018 +0100 Commit: Regina Pfeifer CommitDate: Sun Dec 9 22:10:31 2018 +0100 Help: clarify documentation of ctest --timeout diff --git a/Help/manual/ctest.1.rst b/Help/manual/ctest.1.rst index 110b08f..1ef20ab 100644 --- a/Help/manual/ctest.1.rst +++ b/Help/manual/ctest.1.rst @@ -313,10 +313,11 @@ See `Build and Test Mode`_. Do not use. ``--timeout `` - Set a global timeout on all tests. + Set the default test timeout. - This option will set a global timeout on all tests that do not - already have a timeout set on them. + This option effectively sets a timeout on all tests that do not + already have a timeout set on them via the :prop_test:`TIMEOUT` + property. ``--stop-time `` Set a time at which all tests should stop running. diff --git a/Source/ctest.cxx b/Source/ctest.cxx index ca8a776..ca412ae 100644 --- a/Source/ctest.cxx +++ b/Source/ctest.cxx @@ -128,7 +128,7 @@ static const char* cmDocumentationOptions[][2] = { { "--schedule-random", "Use a random order for scheduling tests" }, { "--submit-index", "Submit individual dashboard tests with specific index" }, - { "--timeout ", "Set a global timeout on all tests." }, + { "--timeout ", "Set the default test timeout." }, { "--stop-time ", "Set a time at which all tests should stop running." }, { "--http1.0", "Submit using HTTP 1.0." }, https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=33f08eec18b440eac1f24f6f18b971c6203307bd commit 33f08eec18b440eac1f24f6f18b971c6203307bd Author: Bruno Manganelli AuthorDate: Fri Nov 23 02:16:51 2018 + Commit: Bruno Manganelli CommitDate: Sat Dec 8 11:24:06 2018 + cmOutputConverter: Moved ContainedInDirectory to cmStateDirectory diff --git a/Source/cmDependsFortran.cxx b/Source/cmDependsFortran.cxx index d218b60..310af2d 100644 --- a/Source/cmDependsFortran.cxx +++ b/Source/cmDependsFortran.cxx @@ -697,8 +697,8 @@ bool cmDependsFortran::ModulesDiffer(const char* modFile, std::string cmDependsFortran::MaybeConvertToRelativePath( std::string const& base, std::string const& path) { - if (!cmOutputConverter::ContainedInDirectory( -base, path, this->LocalGenerator->GetStateSnapshot().GetDirectory())) { + if (!this->LocalGenerator->GetStateSnapshot().GetDirectory().ContainsBoth( +base, path)) { return path; } return cmSystemTools::ForceToRelativePath(base, path); diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index d756564..6643990 100644 --- a/Source/cmLinkLineComputer.cxx +++ b/Source/cmLinkLineComputer.cxx @@ -47,8 +47,7 @@ std::string cmLinkLineComputer::ConvertToLinkReference( { std::string relLib = lib; - if (cmOutputConverter::ContainedInDirectory( -this->StateDir.GetCurrentBinary(), lib, this->StateDir)) { + if (this->StateDir.ContainsBoth(this->StateDir.GetCurrentBinary(), lib)) { relLib = cmSystemTools::ForceToRelativePath( this->StateDir.GetCurrentBinary(),
Re: [CMake] Dependency managment
Hi Gabriele, What do you mean exactly by "we can compile libA but we cannot compile libB without installing libA because the latter needs it"? o.O Are you trying to find libA in libs/libB/CMakeLists.txt with find_package(...)? "Normal" targets (libraries and executables) should be globally visible after you defined them. This is the default behaviour of CMake. So if you define libA correctly, you would just need to link libB against it (using target_link_libraries(...)) for the whole thing to work correctly. (libB waiting for libA to finish, and then using its headers and linking against its library file.) There are literally countless number of examples out there in the wild for doing this. Here is one example for instance: https://gitlab.com/atomki-nuclear-phys/cda That project also very generously uses add_subdirectory(...). And targets in the subdirectories depend on each other in not completely trivial ways. (Mind you, as long as you set everything up correctly, it doesn't even matter in which order you include the subdirectories. It's fine to first include one that depends on a library whose definition is only included later on.) Cheers, Attila > On 12 Dec 2018, at 14:01, Ciccio Pasticcio > wrote: > > Hi all, > we are trying to re-design the build system of an existing complex project > using cmake. > We have a source tree such this (it is only an example to help explaining the > problem) > > . > └── libs > ├── CMakeLists.txt > ├── libA > │ ├── CMakeLists.txt > │ ├── include > │ │ └── libA.h > │ └── source > │ └── libA.cpp > └── libB > ├── CMakeLists.txt > ├── include > │ └── libB.h > └── source > └── libB.cpp > > The tree contains libraries and executables and many of them have some > dependencies to be > satisfied. We wrote a CMakeLists.txt file on top of the hyerarchy which > repetitively uses the > add_directory directive to build every project under it. This solution seems > to work well > until a project needs another one to be built; in other words, we did not > find out how to deal > with dependencies. Looking at the tree above, we can compile libA but we > cannot compile libB without > installing libA because the latter needs it. What's the right and easy way to > make a target globally > available or at least available for projects on the same level? > > Thanks, > Gabriele > -- > > 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: > https://cmake.org/mailman/listinfo/cmake -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] Dependency managment
Hi all, we are trying to re-design the build system of an existing complex project using cmake. We have a source tree such this (it is only an example to help explaining the problem) . └── libs ├── CMakeLists.txt ├── libA │ ├── CMakeLists.txt │ ├── include │ │ └── libA.h │ └── source │ └── libA.cpp └── libB ├── CMakeLists.txt ├── include │ └── libB.h └── source └── libB.cpp The tree contains libraries and executables and many of them have some dependencies to be satisfied. We wrote a CMakeLists.txt file on top of the hyerarchy which repetitively uses the add_directory directive to build every project under it. This solution seems to work well until a project needs another one to be built; in other words, we did not find out how to deal with dependencies. Looking at the tree above, we can compile libA but we cannot compile libB without installing libA because the latter needs it. What's the right and easy way to make a target globally available or at least available for projects on the same level? Thanks, Gabriele -- 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: https://cmake.org/mailman/listinfo/cmake
Re: [cmake-developers] Test for list size
On 12/12/18 7:01 AM, Torsten Robitzki wrote: > we have often the need to test for a minimum list size > > list(LENGTH list list_size) > if (list_size GREATER 1) > > This happens so much I've almost never needed to test the length of a list. What are you trying to do? -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: https://cmake.org/mailman/listinfo/cmake-developers
Re: [cmake-developers] Slowdown of nightly builds
On 12/12/18 7:15 AM, Rolf Eike Beer wrote: > I noticed that for a few weeks the builds on my machines now take much longer > to complete, without any particular change in my setup. > The change in the dashboard can be seen on the dashboard between > 2018-11-09 and 2018-11-10. Thanks! I had noticed that on several machines too but had not found a specific day. This is due to a major performance regression. I've narrowed the problem further and opened an issue: https://gitlab.kitware.com/cmake/cmake/issues/18700 -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: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] Slowdown of nightly builds
I noticed that for a few weeks the builds on my machines now take much longer to complete, without any particular change in my setup. This affects 2 different machines, which makes me even more think it's a change in the test suite. Is that something that is expected or is just someone using bootstrapping as a testbed for ExternalProject_Add with 5 runs in parallel? I don't mind if it's something really needed, but if it is just burning cycles than I would like to cut that down to the level before. Today my gcc7 build took 45 minutes test time while it took only 28 minutes before. The change in the dashboard can be seen on the dashboard between 2018-11-09 and 2018-11-10. There was no update in the system CMake version on that day either. Any ideas? By the way: >3 minutes of configure time for CMake looks also quite excessive to me, but that has been the way before, too. Eike -- 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: https://cmake.org/mailman/listinfo/cmake-developers
[cmake-developers] Test for list size
Hi, we have often the need to test for a minimum list size list(LENGTH list list_size) if (list_size GREATER 1) … This happens so much, that we though it might be helpful to extend the if-syntax to allow this to be written in a more compact way. For example: if (LENGTH list GREATER 1) … Or maybe by introducing functions that can return values (length being a „function“ here): if (length[list] GREATER 1) … What do you think? Are we the only ones that could make good use out of this extension? best regards, Torsten signature.asc Description: Message signed with OpenPGP -- 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: https://cmake.org/mailman/listinfo/cmake-developers
Re: [CMake] Can CXX_CLANG_TIDY use .clang-tidy file?
On Mon, 10 Dec 2018 at 18:31, Bill Hoffman via CMake wrote: > On 12/8/2018 7:47 PM, Mateusz Loskot wrote: > > > > Am I correct clang-tidy run via CXX_CLANG_TIDY > > ignores .clang-tidy configuration file? > > > > I've tried number of ways to help it find the file, > > i.e. copied the file to binary directories from where it seems run via > > usr/local/bin/cmake -E __run_co_compile --tidy=/usr/bin/clang-tidy-7 > > I don't think anything was done to turn that off on purpose. Can you > run the command from the command line and get it to work? If so, you > should be able to get the same arguments to the clang tidy that CMake is > running. Bill, Thank you for the hint. It helped to discover it turns out to be a silly issue. My .clang-tidy listed checks that would issue no warnings for the target source files :) Since, apparently, clang-tidy via /usr/local/bin/cmake -E __run_co_compile --tidy=/usr/bin/clang-tidy-7 runs in quiet mode, while when run directly /usr/bin/clang-tidy-7, it outputs a brief summary even if no analysis warnings are issued. That left me with impression, .clang-tidy is not used. To summary, for records and others looking for similar answers, here is what works for me: 1. .clang-tidy is in source root directory 2. Top-level CMakeLists.txt ``` find_program(CLANG_TIDY NAMES clang-tidy-7 clang-tidy-6.0 clang-tidy-5.0 clang-tidy-4.0 clang-tidy ``` and ``` set_target_properties(test_headers_all_in_one PROPERTIES CXX_CLANG_TIDY ${CLANG_TIDY}) ``` Notice, since checks are specified in .clang-tidy configuration file, no arguments need to be specified to clang-tidy. 3. Build analysed target ``` $ cd project $ cmake -S . -B _build -DBoost_ARCHITECTURE=-x64 .. $ VERBOSE=1 cmake --build _build --target test_headers_all_in_one # alternative to the last command may be $ cd _build $ VERBOSE=1 make test_headers_all_in_one ``` Both, will run clang-tidy with checks read from .clang-tidy config, and output of any warnings. Best regards, -- Mateusz Loskot, http://mateusz.loskot.net -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] DEPFILE usage in add_custom_command(...)
Dear All, I'm trying to use the DEPFILE argument of add_custom_command(...) to be able to tell Ninja exactly when it should re-run that custom command. But unfortunately I'm not able to get it to work as I'd like. :-( I'm running a custom command that processes a header file through a custom executable. (It's a long story, see https://gitlab.kitware.com/cmake/cmake/issues/18695 and https://gitlab.kitware.com/cmake/cmake/issues/16830 for some more details.) I run that custom executable using a script file that I generate during the CMake configuration. In that script file I generate a dependency file using: set( cmd "${cmd}${CMAKE_CXX_COMPILER} -I\"$\"" ) set( cmd "${cmd} -D$" ) if( CMAKE_OSX_SYSROOT ) set( cmd "${cmd} -isysroot ${CMAKE_OSX_SYSROOT}" ) endif() set( cmd "${cmd} -MM -MT ${rootmap_name} -MF ${dictname}.d ${ARG_HEADER}\n" ) This then results in a file like: /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/DictionaryPackage/CMakeFiles/DictionaryPackageDict.dsomap: \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/DictionaryPackage/CMakeFiles/DictionaryPackageDict.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/DictionaryPackage/DictionaryPackage/MyClass.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/DictionaryPackage/DictionaryPackage/HelperHeader.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/DictionaryPackage/DictionaryPackage/MyOtherClass.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/AthLinks/AthLinks/DataLink.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/AthLinks/AthLinks/ElementLink.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/AthLinks/AthLinks/ElementLinkVector.h \ /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/AthContainers/AthContainers/tools/AuxTypeVectorFactory.h Which looks correct to me. The generated Ninja file refers to this dependency file with: # # Custom command for DictionaryPackage/CMakeFiles/DictionaryPackageDict.dsomap build DictionaryPackage/CMakeFiles/DictionaryPackageDict.dsomap DictionaryPackage/CMakeFiles/DictionaryPackageDictReflexDict.cxx x86_64-mac1014-clang100-opt/lib/libDictionaryPackageDict_rdict.pcm: CUSTOM_COMMAND DictionaryPackage/CMakeFiles/DictionaryPackageDict.h /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/DictionaryPackage/DictionaryPackage/DictionaryPackageDict.h DictionaryPackage/CMakeFiles/selection.xml DictionaryPackage/CMakeFiles/DictionaryPackageDict.h /Users/krasznaa/ATLAS/sw/projects/volatile/externals/CMakeDictionaryTests/DictionaryPackage/DictionaryPackage/DictionaryPackageDict.h COMMAND = cd /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/DictionaryPackage/CMakeFiles && /Users/krasznaa/Software/CMake/3.11.4/bin/cmake -E make_directory /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/x86_64-mac1014-clang100-opt/lib && sh /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/DictionaryPackage/CMakeFiles/makeDictionaryPackageDictReflexDict.sh DESC = Generating DictionaryPackageDictReflexDict.cxx depfile = /Users/krasznaa/ATLAS/sw/projects/volatile/externals/build_test/DictionaryPackage/CMakeFiles/DictionaryPackageDictReflexDict.d restat = 1 Which again, looks correct to me. But... This setup results in Ninja *always* re-running this command on every re-build. Even when I didn't modify any of the files referenced in that dependency file. :-( Does anyone have an idea what I'm doing wrong? Unfortunately I didn't manage to find examples of using DEPFILE that would've helped me further than this... Any help would be very much appreciated. Cheers, Attila -- 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: https://cmake.org/mailman/listinfo/cmake