Re: [cmake-developers] Profile Cmake scripts

2016-01-05 Thread Bartosz Kosiorek
Hi Ben.

2016-01-04 17:39 GMT+01:00 Ben Boeckel :

> The
> big remaining problem is passing char* as an argument where functions do
> std::string(arg) right away. I fixed all of those which did explicit
> std::string conversions (via assignment or otherwise), but those which
> are conditional should get std::string overloads to avoid a
> malloc/copy/free penalty. There is a *lot* of work here though. The
> branch I had been working on (which is now woefully out-of-date) is 100
> commits long.
>

That's great news.
What is the branch name/link to these improvement?
Is it possible to push these improvements partially?

Maybe CMake community could continue working on that improvement?
It will be great to create ticket, in which propose solution will be
described.

BTW: Do you know why the Xcode and MS Visual Studio is slower than CMake
one ?

Here is the benchmarks for my internal project:

Xcode generation:
   real 6m31.733s
   user 4m51.862s
   sys 0m20.268s

Make generation:
   real 4m45.089s
   user 2m56.117s
   sys 0m17.481s

Ninja generation:
  real 2m48.585s
  user 2m30.712s
  sys 0m6.313s





>
> --Ben
> --
>
> 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
>
-- 

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] Retire expected builds

2016-01-05 Thread Kevin H. Hobbs
I'm moving to a new job, and will no longer be able to maintain my
nightly builds (even in their neglected state.)

Please expect the expected builds from bubbles, murron, and k450e to
dissapear.



signature.asc
Description: OpenPGP digital signature
-- 

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] Profile Cmake scripts

2016-01-05 Thread Ben Boeckel
On Tue, Jan 05, 2016 at 09:18:49 +0100, Bartosz Kosiorek wrote:
> That's great news.
> What is the branch name/link to these improvement?
> Is it possible to push these improvements partially?

Because the changes are so pervasive, I'd like for the branch to be
bisectable, so every commit should pass the test suite on at least the
common platforms (make, ninja, visual studio, xcode).

https://github.com/mathstuf/cmake/tree/dev/string-overloads

> Maybe CMake community could continue working on that improvement?

I have no problem with anyone taking over the branch as long as the
branch ends up bisectable. If anyone wants to take it over and put the
branch together, I can run the test suite.

> It will be great to create ticket, in which propose solution will be
> described.
> 
> BTW: Do you know why the Xcode and MS Visual Studio is slower than CMake
> one ?

As Petr said, it is because these generators generate a build for each
configuration. You can help this by removing configurations you don't
care about from CMAKE_CONFIGURATION_TYPES (like, say, MinSizeRel) to
help reduce the time.

There are also probably some places in the genex evaluator where
computed values could be cached to improve times (e.g., make a cache of
the transitive closure for each target's include directories, link
libraries, etc. when evaluating $ and
friends). Alternatively, cmTarget could cache them (but that may not be
as straight forward since cmTarget is editable while genex evaluation
occurs when everything is read-only). Not sure how much it would help
the multi-config generators since they already memoize
configuration-independent evaluations.

--Ben
-- 

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 0015904]: ExternalProject UPDATE_DISCONNECTED does not work with custom UPDATE_COMMAND

2016-01-05 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=15904 
== 
Reported By:Jaak Ristioja
Assigned To:
== 
Project:CMake
Issue ID:   15904
Category:   Modules
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2016-01-05 10:33 EST
Last Modified:  2016-01-05 10:33 EST
== 
Summary:ExternalProject UPDATE_DISCONNECTED does not work
with custom UPDATE_COMMAND
Description: 
This CMakeLists.txt file:
  CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
  PROJECT(test NONE)
  INCLUDE(ExternalProject)
  SET_PROPERTY(DIRECTORY PROPERTY EP_UPDATE_DISCONNECTED 1)
  ExternalProject_Add(sf GIT_REPOSITORY
"https://github.com/sharemind-sdk/vm_m4.git; UPDATE_COMMAND ${CMAKE_COMMAND} -E
echo "Hello, World!")

yields in the following `make`output:
  Scanning dependencies of target sf
  [ 14%] Creating directories for 'sf'
  [ 28%] Performing download step (git clone) for 'sf'
  Cloning into 'sf'...
  Already on 'master'
  Your branch is up-to-date with 'origin/master'.
  [ 42%] No patch step for 'sf'
  make[2]: *** No rule to make target 'sf-prefix/src/sf-stamp/sf-skip-update',
needed by 'sf-prefix/src/sf-stamp/sf-configure'.  Stop.
  CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/sf.dir/all' failed
  make[1]: *** [CMakeFiles/sf.dir/all] Error 2
  Makefile:83: recipe for target 'all' failed
  make: *** [all] Error 2

Same error with UPDATE_DISCONNECTED set on the external project itself.

Additional Information: 
Tested with cmake-3.3.2 and cmake-3.4.1.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-01-05 10:33 Jaak Ristioja  New 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


[cmake-developers] [CMake 0015905]: It seems that CMake ignores "Debug" in CMAKE_TRY_COMPILE_CONFIGURATION

2016-01-05 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=15905 
== 
Reported By:Ivan K
Assigned To:
== 
Project:CMake
Issue ID:   15905
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2016-01-06 02:06 EST
Last Modified:  2016-01-06 02:06 EST
== 
Summary:It seems that CMake ignores "Debug" in
CMAKE_TRY_COMPILE_CONFIGURATION
Description: 
https://github.com/urho3d/Urho3D/issues/1136#issuecomment-169250581
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-01-06 02:06 Ivan K New 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


[cmake-developers] (Experimental) Refactored extra-generators

2016-01-05 Thread Alexander Neundorf
Hi,

I spent a few hours on the extra-generators, and you can find the result here 
on github:
https://github.com/neundorf/CMake/tree/RefactorExtraGeneratorsExperimental 

In this branch, the extra-generators are not tied anymore hardcoded to the 
generators (so the generator list is short again), but each extra-generator 
can be enabled and disabled via a cmake option 
CMAKE_ENABLE_EXTRA_GENERATOR_.
I.e. for every build directory zero, one or multiple extra-generators can be 
enabled and disabled (in an existing build tree).

This would e.g. also be suitable for a generic JSON-generator.

The code on github is not ready to be merged, and unfortunately I don't have 
the time to bring it into mergeable state, including tests, documentation, 
etc.

But if somebody is interested, you can have a look and give it a try.

Alex

-- 

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] Profile Cmake scripts

2016-01-05 Thread Daniel Pfeifer
On Tue, Jan 5, 2016 at 9:18 AM, Bartosz Kosiorek  wrote:
>
> Hi Ben.
>
> 2016-01-04 17:39 GMT+01:00 Ben Boeckel :
>>
>> The
>> big remaining problem is passing char* as an argument where functions do
>> std::string(arg) right away. I fixed all of those which did explicit
>> std::string conversions (via assignment or otherwise), but those which
>> are conditional should get std::string overloads to avoid a
>> malloc/copy/free penalty. There is a *lot* of work here though. The
>> branch I had been working on (which is now woefully out-of-date) is 100
>> commits long.

This improvement should be semi-automated with clang-tidy. We have
many functions that take `const char*` and are called by passing a
`string.c_str()`. The function signature should be changed to `const
std::string&` manually, but changing all the call sites should be done
automatically (ideally by kwrobot, periodically, on multiple
platforms).

Here is how to run clang-tidy on projects built with CMake:

$ cd 
$ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON 
$ run-clang-tidy.py -p  -fix
-checks='-*,readability-redundant-string-cstr' /Source/

The run-clang-tidy.py script is here:
https://llvm.org/svn/llvm-project/clang-tools-extra/trunk/clang-tidy/tool/run-clang-tidy.py
The `-fix` argument tells clang-tidy to fix the violations inplace.
Without this argument the diagnostics are just printed.

I wanted to demonstrage the ability of the `redundant-string-cstr`
checker, but apparently there are no violations found.
I have attached a patch that was generated by the
`container-size-empty` checker.
Please don't apply it. Such changes should be performed by kwrobot.

You can output all possible checks with:

$ clang-tidy -p  -checks='*' -list-checks 

> That's great news.
> What is the branch name/link to these improvement?
> Is it possible to push these improvements partially?
>
> Maybe CMake community could continue working on that improvement?
> It will be great to create ticket, in which propose solution will be
> described.
>
> BTW: Do you know why the Xcode and MS Visual Studio is slower than CMake one
> ?
>
> Here is the benchmarks for my internal project:
>
> Xcode generation:
>real 6m31.733s
>user 4m51.862s
>sys 0m20.268s
>
> Make generation:
>real 4m45.089s
>user 2m56.117s
>sys 0m17.481s
>
> Ninja generation:
>   real 2m48.585s
>   user 2m30.712s
>   sys 0m6.313s

Generators for Xcode and Visual Studio have to generate more files.
From 46a5639a27bab0b227b457e1224c702dd143af33 Mon Sep 17 00:00:00 2001
From: Daniel Pfeifer 
Date: Tue, 5 Jan 2016 13:28:16 +0100
Subject: [PATCH] demonstrate clang-tidy

---
 Source/CTest/cmCTestRunTest.cxx | 4 ++--
 Source/CTest/cmCTestTestHandler.cxx | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index d108592..87e9f62 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -207,7 +207,7 @@ bool cmCTestRunTest::EndTest(size_t completed, size_t total, bool started)
 {
 bool success =
   !forceFail &&  (retVal == 0 ||
-  this->TestProperties->RequiredRegularExpressions.size());
+  !this->TestProperties->RequiredRegularExpressions.empty());
 if(this->TestProperties->SkipReturnCode >= 0
   && this->TestProperties->SkipReturnCode == retVal)
   {
@@ -584,7 +584,7 @@ void cmCTestRunTest::ComputeArguments()
  << std::endl);
 
   // Print any test-specific env vars in verbose mode
-  if (this->TestProperties->Environment.size())
+  if (!this->TestProperties->Environment.empty())
 {
 cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT, this->Index << ": "
<< "Environment variables: " << std::endl);
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index a8f983f..df91ac5 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1318,7 +1318,7 @@ void cmCTestTestHandler::AttachFiles(cmXMLWriter& xml,
  cmCTestTestResult* result)
 {
   if(result->Status != cmCTestTestHandler::COMPLETED
- && result->Properties->AttachOnFail.size())
+ && !result->Properties->AttachOnFail.empty())
 {
 result->Properties->AttachedFiles.insert(
   result->Properties->AttachedFiles.end(),
-- 
2.6.4

-- 

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 

Re: [cmake-developers] Profile Cmake scripts

2016-01-05 Thread Petr Kmoch
On Tue, Jan 5, 2016 at 1:33 PM, Daniel Pfeifer 
wrote:

>
> Generators for Xcode and Visual Studio have to generate more files.
>

... and they have to process all configurations (Debug, Release,
MinSizeRel, RelWithDbgInfo) during the generation stage, instead of just
one being processed for single-config generators like Makefiles or Ninja.

Petr
-- 

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