Re: [CMake] depend.make

2013-12-16 Thread Lars
That sounds like a decent solution from my point of view. 
 
I will create an issue for this topic.
 
Regards,
Lars
 
Date: Fri, 13 Dec 2013 10:53:49 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; bill.hoff...@kitware.com; cmake@cmake.org
Subject: Re: [CMake] depend.make


  

  
  
On 13.12.2013 10:43, Lars wrote:



  
  Using the include_regular_expression macro made a
huge difference. The build time was reduced by more than 50%.

 

The regular expression appear to be only applied to part of
the dependency file path. So in the case of Boost this
works pretty well for us because we use #include
boost/filesystem.hpp but more difficult to remove qt
dependency like #include QDir. How do you view adding a
feature that allow applying regex to the absolute path?
Secondly, the documentation of include_regular_expression should
probably mention something about the target string (relative
path, not absolute).

  

Maybe CMake could filter out includes in system directories (like
gcc -MM does).

System directories in this case could be directories added with e.g.
include_directories(SYSTEM).



Nils
  --

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-13 Thread Lars
Using the include_regular_expression macro made a huge difference. The build 
time was reduced by more than 50%.
 
The regular expression appear to be only applied to part of the dependency file 
path. So in the case of Boost this works pretty well for us because we use 
#include boost/filesystem.hpp but more difficult to remove qt dependency like 
#include QDir. How do you view adding a feature that allow applying regex to 
the absolute path? Secondly, the documentation of include_regular_expression 
should probably mention something about the target string (relative path, not 
absolute).
 
Regards, Lars
 
 Date: Thu, 12 Dec 2013 14:23:53 -0500
 From: bill.hoff...@kitware.com
 To: laasu...@hotmail.com; cmake@cmake.org
 Subject: Re: [CMake] depend.make
 
 On 12/12/2013 1:07 PM, Lars wrote:
  Building our software using CMake and VS2005 on Windows platform is very
  slow. Debugging this issue I discovered the several of the depent.make
  files are huge. One example is a depent.make file that is roughly 10 MB.
  In this file most of the object files dependent on almost all boost
  header files. I am guessing a huge depent.make file would affect at
  least dependency scanning.
 
  Obviously I do not know how much this affect performance.
 
  Will take a look at ninja.
 
  Any other suggestions?
 
 You could do this:
 include_regular_expression(^([^b]|b[^o]|bo[^o]|boo[^s]|boos[^t]|boost[^/]).*$)
 
 Then see if it impacts your performance. I would be interested to here 
 if it did or did not.
 
 -Bill
 
  --

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-13 Thread Nils Gladitz

On 13.12.2013 10:43, Lars wrote:
Using the include_regular_expression macro made a huge difference. The 
build time was reduced by more than 50%.


The regular expression appear to be only applied to part of 
the dependency file path. So in the case of Boost this 
works pretty well for us because we use #include 
boost/filesystem.hpp but more difficult to remove qt 
dependency like #include QDir. How do you view adding a feature 
that allow applying regex to the absolute path? Secondly, the 
documentation of include_regular_expression should probably 
mention something about the target string (relative path, not absolute).
Maybe CMake could filter out includes in system directories (like gcc 
-MM does).
System directories in this case could be directories added with e.g. 
include_directories(SYSTEM).


Nils
--

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Lars
Thank you for your feedback. 
 
This however only explain part of the issue as far as I can tell. To debug the 
issue I added 
#pragma message(boost tr1 iostream) 
at the top of the boost/tr1/iostream file. When building the source that 
message is shown in the console windows which then indicate the compiler has 
accessed the file. So far so good. I then did the same trick with 
boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are the 
three first boost reference in depend.make and none of them not show up during 
building.  
 
So why are these files included in the depend.make?
 
Regards,
Lars
Date: Wed, 11 Dec 2013 16:08:28 +0100
From: nilsglad...@gmail.com
To: laasu...@hotmail.com; cmake@cmake.org
Subject: Re: [CMake] depend.make


  

  
  
On 11.12.2013 12:53, Lars wrote:



  
   

Here is the source code used (which does not use the Boost
library).

#include iostream

int main(int argc, char **argv)

{

  std::cout  Hello world  std::endl;

 

  return 0;

}

  

${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
iostream header which your #include iostream probably
picks up.

Maybe that further includes the other boost headers?



Nils
  --

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Marco Clemencic
Hi,

I cannot find it anymore in the documentation , but I remember to have read 
that the dependency scanner of CMake does not take into account the 
preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
actual dependencies.
It is quite probable that boost/tr1/iostream _may_ include the other headers 
under some particular combination of preprocessor macros, so they are not used 
at compile time, but they taken into account by CMake.

Cheers
Marco

On Thursday 12 December 2013 11:51:52 Lars wrote:
 Thank you for your feedback.
 
 This however only explain part of the issue as far as I can tell. To debug
 the issue I added #pragma message(boost tr1 iostream)
 at the top of the boost/tr1/iostream file. When building the source that
 message is shown in the console windows which then indicate the compiler
 has accessed the file. So far so good. I then did the same trick with
 boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
 the three first boost reference in depend.make and none of them not show up
 during building.
 
 So why are these files included in the depend.make?
 
 Regards,
 Lars
 Date: Wed, 11 Dec 2013 16:08:28 +0100
 From: nilsglad...@gmail.com
 To: laasu...@hotmail.com; cmake@cmake.org
 Subject: Re: [CMake] depend.make
 
 
 
 
 
 
 On 11.12.2013 12:53, Lars wrote:
 
 
 
 
 
 
 Here is the source code used (which does not use the Boost
 library).
 
 #include iostream
 
 int main(int argc, char **argv)
 
 {
 
   std::cout  Hello world  std::endl;
 
 
 
   return 0;
 
 }
 
 
 
 ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
 iostream header which your #include iostream probably
 picks up.
 
 Maybe that further includes the other boost headers?
 
 
 
 Nils

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] depend.make

2013-12-12 Thread Lars
Very interesting.
 
Found this thread where Brad King is saying more or less the same thing (this 
is in 2009). Can anyone confirm this is still the case?

How can we filter out boost from depend.make? Using include_regular_expression 
only allows files filtering and that does not really help in this case.
 
Regards,
Lars
 
 From: marco.clemen...@cern.ch
 To: cmake@cmake.org
 CC: laasu...@hotmail.com; nilsglad...@gmail.com
 Subject: Re: [CMake] depend.make
 Date: Thu, 12 Dec 2013 12:03:06 +0100
 
 Hi,
 
 I cannot find it anymore in the documentation , but I remember to have read 
 that the dependency scanner of CMake does not take into account the 
 preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
 actual dependencies.
 It is quite probable that boost/tr1/iostream _may_ include the other headers 
 under some particular combination of preprocessor macros, so they are not 
 used 
 at compile time, but they taken into account by CMake.
 
 Cheers
 Marco
 
 On Thursday 12 December 2013 11:51:52 Lars wrote:
  Thank you for your feedback.
  
  This however only explain part of the issue as far as I can tell. To debug
  the issue I added #pragma message(boost tr1 iostream)
  at the top of the boost/tr1/iostream file. When building the source that
  message is shown in the console windows which then indicate the compiler
  has accessed the file. So far so good. I then did the same trick with
  boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
  the three first boost reference in depend.make and none of them not show up
  during building.
  
  So why are these files included in the depend.make?
  
  Regards,
  Lars
  Date: Wed, 11 Dec 2013 16:08:28 +0100
  From: nilsglad...@gmail.com
  To: laasu...@hotmail.com; cmake@cmake.org
  Subject: Re: [CMake] depend.make
  
  
  
  
  
  
  On 11.12.2013 12:53, Lars wrote:
  
  
  
  
  
  
  Here is the source code used (which does not use the Boost
  library).
  
  #include iostream
  
  int main(int argc, char **argv)
  
  {
  
std::cout  Hello world  std::endl;
  
  
  
return 0;
  
  }
  
  
  
  ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
  iostream header which your #include iostream probably
  picks up.
  
  Maybe that further includes the other boost headers?
  
  
  
  Nils
 
  --

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Lars
Here is the link: http://www.itk.org/Bug/print_bug_page.php?bug_id=8561
 
From: laasu...@hotmail.com
To: marco.clemen...@cern.ch; cmake@cmake.org
Date: Thu, 12 Dec 2013 13:58:36 +0100
Subject: Re: [CMake] depend.make




Very interesting.
 
Found this thread where Brad King is saying more or less the same thing (this 
is in 2009). Can anyone confirm this is still the case?

How can we filter out boost from depend.make? Using include_regular_expression 
only allows files filtering and that does not really help in this case.
 
Regards,
Lars
 
 From: marco.clemen...@cern.ch
 To: cmake@cmake.org
 CC: laasu...@hotmail.com; nilsglad...@gmail.com
 Subject: Re: [CMake] depend.make
 Date: Thu, 12 Dec 2013 12:03:06 +0100
 
 Hi,
 
 I cannot find it anymore in the documentation , but I remember to have read 
 that the dependency scanner of CMake does not take into account the 
 preprocessor conditionals (#ifdef, etc), thus producing a superset of the 
 actual dependencies.
 It is quite probable that boost/tr1/iostream _may_ include the other headers 
 under some particular combination of preprocessor macros, so they are not 
 used 
 at compile time, but they taken into account by CMake.
 
 Cheers
 Marco
 
 On Thursday 12 December 2013 11:51:52 Lars wrote:
  Thank you for your feedback.
  
  This however only explain part of the issue as far as I can tell. To debug
  the issue I added #pragma message(boost tr1 iostream)
  at the top of the boost/tr1/iostream file. When building the source that
  message is shown in the console windows which then indicate the compiler
  has accessed the file. So far so good. I then did the same trick with
  boost/aligned_storage.hpp, boost/array.hpp and boost/assert.hpp which are
  the three first boost reference in depend.make and none of them not show up
  during building.
  
  So why are these files included in the depend.make?
  
  Regards,
  Lars
  Date: Wed, 11 Dec 2013 16:08:28 +0100
  From: nilsglad...@gmail.com
  To: laasu...@hotmail.com; cmake@cmake.org
  Subject: Re: [CMake] depend.make
  
  
  
  
  
  
  On 11.12.2013 12:53, Lars wrote:
  
  
  
  
  
  
  Here is the source code used (which does not use the Boost
  library).
  
  #include iostream
  
  int main(int argc, char **argv)
  
  {
  
std::cout  Hello world  std::endl;
  
  
  
return 0;
  
  }
  
  
  
  ${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an
  iostream header which your #include iostream probably
  picks up.
  
  Maybe that further includes the other boost headers?
  
  
  
  Nils
 
  

--

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://www.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:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Bill Hoffman

On 12/12/2013 8:17 AM, Lars wrote:

Here is the link: http://www.itk.org/Bug/print_bug_page.php?bug_id=8561
Is this causing you a problem?If there are some extra depends on 
boost files what is the harm?  I am assuming that you are not changing 
them that much...   You could also try the ninja generator that does the 
depends different and is faster anyway...



-Bill

--

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] depend.make

2013-12-12 Thread Lars
Building our software using CMake and VS2005 on Windows platform is very slow. 
Debugging this issue I discovered the several of the depent.make files are 
huge. One example is a depent.make file that is roughly 10 MB. In this file 
most of the object files dependent on almost all boost header files. I am 
guessing a huge depent.make file would affect at least dependency scanning.
Obviously I do not know how much this affect performance.
Will take a look at ninja.
Any other suggestions?
Regards,Lars

 Date: Thu, 12 Dec 2013 11:14:29 -0500
 From: bill.hoff...@kitware.com
 To: cmake@cmake.org
 Subject: Re: [CMake] depend.make
 
 On 12/12/2013 8:17 AM, Lars wrote:
  Here is the link: http://www.itk.org/Bug/print_bug_page.php?bug_id=8561
 Is this causing you a problem?If there are some extra depends on 
 boost files what is the harm?  I am assuming that you are not changing 
 them that much...   You could also try the ninja generator that does the 
 depends different and is faster anyway...
 
 
 -Bill
 
 --
 
 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://www.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:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-12 Thread Bill Hoffman

On 12/12/2013 1:07 PM, Lars wrote:

Building our software using CMake and VS2005 on Windows platform is very
slow. Debugging this issue I discovered the several of the depent.make
files are huge. One example is a depent.make file that is roughly 10 MB.
In this file most of the object files dependent on almost all boost
header files. I am guessing a huge depent.make file would affect at
least dependency scanning.

Obviously I do not know how much this affect performance.

Will take a look at ninja.

Any other suggestions?


You could do this:
include_regular_expression(^([^b]|b[^o]|bo[^o]|boo[^s]|boos[^t]|boost[^/]).*$)

Then see if it impacts your performance. I would be interested to here 
if it did or did not.


-Bill

--

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://www.cmake.org/mailman/listinfo/cmake


[CMake] depend.make

2013-12-11 Thread Lars
This test has been performed on Windows 7 SP1 (64bit) and using CMake 2.8.12.1 
and VS2005 SP1.
 
Here is the source code used (which does not use the Boost library).
#include iostream
int main(int argc, char **argv)
{
  std::cout  Hello world  std::endl;
 
  return 0;
}
 
Here is the CMakeLists.txt used which find and include Boost.
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.11)
FIND_PACKAGE(Boost 1.47.0 COMPONENTS
  program_options
  system
  regex
  math_c99)
IF(Boost_FOUND)
  SET(Boost_INCLUDE_DIRS 
${Boost_INCLUDE_DIR}/boost/tr1/tr1
${Boost_INCLUDE_DIR})
  INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
ENDIF()
SET(_SOURCES 
  main.cpp 
)
ADD_EXECUTABLE(Dummy 
  ${_SOURCES} 
)
TARGET_LINK_LIBRARIES(Dummy 
  ${Boost_LIBRARIES} 
)
 
This configuration compiles and links.
When building the target a depend.make file is generated. Viewing this file I 
was surprised to discover that main.cpp.obj appears to depend on a number of 
boost files. There are 1200 lines like there;
CMakeFiles\Dummy.dir\main.cpp.obj: ..\main.cpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\aligned_storage.hpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\array.hpp
CMakeFiles\Dummy.dir\main.cpp.obj: 
c:\Boost_r\1_47_0\include\boost-1_52\boost\assert.hpp
 
Why does depend.make contain so many dependencies between main.cpp.obj and 
boost headers?
 
  --

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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] depend.make

2013-12-11 Thread Nils Gladitz

On 11.12.2013 12:53, Lars wrote:


Here is the source code used (which does not use the Boost library).
#include iostream
int main(int argc, char **argv)
{
  std::cout  Hello world  std::endl;

  return 0;
}
${Boost_INCLUDE_DIR}/boost/tr1/tr1 does seem to contain an iostream 
header which your #include iostream probably picks up.

Maybe that further includes the other boost headers?

Nils
--

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://www.cmake.org/mailman/listinfo/cmake