Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-12 Thread Andrew Melo
On Tue, Jul 12, 2016 at 10:48 PM, Chaos Zhang  wrote:
> Thanks for your reply Raymond, by 'If you got 96% both times, then I would
> say there's a problem.', did you mean if make performed like this, it means
> this project can't use make -jN?

If "make -j1" and "make -j8" ran in the same amount of time, there
would be a problem. Since "make -j1" uses 96% CPU and "make -j8" uses
690% CPU, it implies that the "-j" options make compilation time
scale, which is what you want.

> BTW, does CMake support some options to
> turn on hardware acceleration?

What do you mean by "hardware acceleration"?



>
> Raymond Wan-2 wrote
>> Hi Chao,
>>
>>
>> On Wed, Jul 13, 2016 at 10:54 AM, Chaos Zhang 
>
>> zcsd2012@
>
>>  wrote:
>>> I was trying to compile my project using CMake, after CMake generated
>>> Makefile.
>>> I used `/usr/bin/time -v make` to make the Makefile,  got the result:
>>> 'Percent of CPU this job got: 96%'.
>>> Then i used `/usr/bin/time -v make -j8` to make the Makefile, the result
>>> of
>>> CPU used is  'Percent of CPU this job got: 648%'.
>>> So i wonder if Makefile generated by CMake support make -jN, BTW my CPU
>>> is
>>> I7-4790, and after i use 'cat /proc/cpuinfo', there are 8 processors.
>>
>>
>> I'm not sure what you are asking...
>>
>> You ran make with -j 8 and you got a percentage greater than 96% ...
>> this implies that the Makefile does support -jN, doesn't it?  If you
>> got 96% both times, then I would say there's a problem.
>>
>> Is what you're wondering why it is 648% and not 800%?  I think that
>> depends on the dependencies in your Makefile.  It's possible that some
>> of them depend on each other in such a way that 8 parallel threads is
>> not possible.
>>
>> Also, I can't remember the value returned by /usr/bin/time -v, but I
>> guess 648% is the average and not maximum.  So, perhaps there are
>> parts within the Makefile that only one thread could be used and then
>> it gets averaged out?
>>
>> Ray
>> --
>>
>> 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
>
>
>
>
>
> --
> View this message in context: 
> http://cmake.3232098.n2.nabble.com/Does-Makefile-generated-by-CMake-support-make-jN-tp7593949p7593951.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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



-- 
--
Andrew Melo
-- 

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


Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-12 Thread J Decker
On Tue, Jul 12, 2016 at 7:54 PM, Chaos Zhang  wrote:

> Hi, all,
>
> I was trying to compile my project using CMake, after CMake generated
> Makefile.
> I used `/usr/bin/time -v make` to make the Makefile,  got the result:
> 'Percent of CPU this job got: 96%'.
> Then i used `/usr/bin/time -v make -j8` to make the Makefile, the result of
> CPU used is  'Percent of CPU this job got: 648%'.
> So i wonder if Makefile generated by CMake support make -jN, BTW my CPU is
> I7-4790, and after i use 'cat /proc/cpuinfo', there are 8 processors.
>
>
All the sources, headers, etc come from the IO system, from the disk,
probably you're running into the bottleneck of how long it takes to move
the memory for the compiler to do work on?  did you profile IO ?


> Thanks a lot,
> Chao
>
>
>
> --
> View this message in context:
> http://cmake.3232098.n2.nabble.com/Does-Makefile-generated-by-CMake-support-make-jN-tp7593949.html
> Sent from the CMake mailing list archive at Nabble.com.
> --
>
> 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
>
-- 

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

[Cmake-commits] CMake branch, master, updated. v3.6.0-359-g056db89

2016-07-12 Thread Kitware Robot
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  056db896e396b7fb15d8f813ad1989c67c6f623f (commit)
  from  49f5818d8a4d134ff9a6060596078d9da4c38f95 (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=056db896e396b7fb15d8f813ad1989c67c6f623f
commit 056db896e396b7fb15d8f813ad1989c67c6f623f
Author: Kitware Robot <kwro...@kitware.com>
AuthorDate: Wed Jul 13 00:01:03 2016 -0400
Commit: Kitware Robot <kwro...@kitware.com>
CommitDate: Wed Jul 13 00:01:03 2016 -0400

CMake Nightly Date Stamp

diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 61847ff..ba264f6 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 6)
-set(CMake_VERSION_PATCH 20160712)
+set(CMake_VERSION_PATCH 20160713)
 #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
http://public.kitware.com/mailman/listinfo/cmake-commits


Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-12 Thread Chaos Zhang
Thanks for your reply Raymond, by 'If you got 96% both times, then I would
say there's a problem.', did you mean if make performed like this, it means
this project can't use make -jN? BTW, does CMake support some options to
turn on hardware acceleration?

Raymond Wan-2 wrote
> Hi Chao,
> 
> 
> On Wed, Jul 13, 2016 at 10:54 AM, Chaos Zhang 

> zcsd2012@

>  wrote:
>> I was trying to compile my project using CMake, after CMake generated
>> Makefile.
>> I used `/usr/bin/time -v make` to make the Makefile,  got the result:
>> 'Percent of CPU this job got: 96%'.
>> Then i used `/usr/bin/time -v make -j8` to make the Makefile, the result
>> of
>> CPU used is  'Percent of CPU this job got: 648%'.
>> So i wonder if Makefile generated by CMake support make -jN, BTW my CPU
>> is
>> I7-4790, and after i use 'cat /proc/cpuinfo', there are 8 processors.
> 
> 
> I'm not sure what you are asking...
> 
> You ran make with -j 8 and you got a percentage greater than 96% ...
> this implies that the Makefile does support -jN, doesn't it?  If you
> got 96% both times, then I would say there's a problem.
> 
> Is what you're wondering why it is 648% and not 800%?  I think that
> depends on the dependencies in your Makefile.  It's possible that some
> of them depend on each other in such a way that 8 parallel threads is
> not possible.
> 
> Also, I can't remember the value returned by /usr/bin/time -v, but I
> guess 648% is the average and not maximum.  So, perhaps there are
> parts within the Makefile that only one thread could be used and then
> it gets averaged out?
> 
> Ray
> -- 
> 
> 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





--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Does-Makefile-generated-by-CMake-support-make-jN-tp7593949p7593951.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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


[cmake-developers] [PATCH] Improve FindGIF version detection (fix for issue #16196)

2016-07-12 Thread Ben Campbell

A fix for https://gitlab.kitware.com/cmake/cmake/issues/16196

This is my first attempt at doing anything with CMake, so I'd appreciate 
any feedback on my patch! In particular, the pairs of file()/string() 
commands seem a bit convoluted for extracting strings out of the header 
file - is there a more idiomatic approach?
Also, I'm a bit concerned that they are polluting scope by leaking out 
the GIFMAJ/GIFMIN/GIFREL working variables... how would I improve this?



---
 Modules/FindGIF.cmake | 20 ++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/Modules/FindGIF.cmake b/Modules/FindGIF.cmake
index 7bbb8cf..283a299 100644
--- a/Modules/FindGIF.cmake
+++ b/Modules/FindGIF.cmake
@@ -61,7 +61,8 @@ set(GIF_LIBRARIES ${GIF_LIBRARY})
 # to be always " Version 2.0, " in versions 3.x of giflib.
 # In version 4 the member UserData was added to GifFileType, so we 
check for this

 # one.
-# http://giflib.sourcearchive.com/documentation/4.1.4/files.html
+# Versions after 4.1.6 define GIFLIB_MAJOR, GIFLIB_MINOR, and 
GIFLIB_RELEASE

+# see http://giflib.sourceforge.net/gif_lib.html#compatibility
 if(GIF_INCLUDE_DIR)
   include(${CMAKE_CURRENT_LIST_DIR}/CMakePushCheckState.cmake)
   include(${CMAKE_CURRENT_LIST_DIR}/CheckStructHasMember.cmake)
@@ -71,7 +72,22 @@ if(GIF_INCLUDE_DIR)
   set(CMAKE_REQUIRED_INCLUDES "${GIF_INCLUDE_DIR}")
   CHECK_STRUCT_HAS_MEMBER(GifFileType UserData gif_lib.h 
GIF_GifFileType_UserData )

   if(GIF_GifFileType_UserData)
-set(GIF_VERSION 4)
+# OK. So we're version 4 or higher. Check for specific version defines
+file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h GIFMAJ REGEX "^[ 
\t]*#define[ \t]+GIFLIB_MAJOR")
+string(REGEX REPLACE "^.*GIFLIB_MAJOR ([0-9]+).*$" "\\1" GIFMAJ 
${GIFMAJ})

+# extract minor version
+file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h GIFMIN REGEX "^[ 
\t]*#define[ \t]+GIFLIB_MINOR")
+string(REGEX REPLACE "^.*GIFLIB_MINOR ([0-9]+).*$" "\\1" GIFMIN 
${GIFMIN})

+# point release
+file(STRINGS ${GIF_INCLUDE_DIR}/gif_lib.h GIFREL REGEX "^[ 
\t]*#define[ \t]+GIFLIB_RELEASE")
+string(REGEX REPLACE "^.*GIFLIB_RELEASE ([0-9]+).*$" "\\1" GIFREL 
${GIFREL})

+if(GIFMAJ)
+  # yay - got exact version info
+  set(GIF_VERSION ${GIFMAJ}.${GIFMIN}.${GIFREL})
+else(GIFMAJ)
+  # couldn't find the defines - assume version 4
+  set(GIF_VERSION 4)
+endif(GIFMAJ)
   endif()
   CMAKE_POP_CHECK_STATE()
 endif()
--
2.7.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 subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


Re: [CMake] Does Makefile generated by CMake support make -jN?

2016-07-12 Thread Raymond Wan
Hi Chao,


On Wed, Jul 13, 2016 at 10:54 AM, Chaos Zhang  wrote:
> I was trying to compile my project using CMake, after CMake generated
> Makefile.
> I used `/usr/bin/time -v make` to make the Makefile,  got the result:
> 'Percent of CPU this job got: 96%'.
> Then i used `/usr/bin/time -v make -j8` to make the Makefile, the result of
> CPU used is  'Percent of CPU this job got: 648%'.
> So i wonder if Makefile generated by CMake support make -jN, BTW my CPU is
> I7-4790, and after i use 'cat /proc/cpuinfo', there are 8 processors.


I'm not sure what you are asking...

You ran make with -j 8 and you got a percentage greater than 96% ...
this implies that the Makefile does support -jN, doesn't it?  If you
got 96% both times, then I would say there's a problem.

Is what you're wondering why it is 648% and not 800%?  I think that
depends on the dependencies in your Makefile.  It's possible that some
of them depend on each other in such a way that 8 parallel threads is
not possible.

Also, I can't remember the value returned by /usr/bin/time -v, but I
guess 648% is the average and not maximum.  So, perhaps there are
parts within the Makefile that only one thread could be used and then
it gets averaged out?

Ray
-- 

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


[CMake] Does Makefile generated by CMake support make -jN?

2016-07-12 Thread Chaos Zhang
Hi, all,

I was trying to compile my project using CMake, after CMake generated
Makefile.
I used `/usr/bin/time -v make` to make the Makefile,  got the result:
'Percent of CPU this job got: 96%'.
Then i used `/usr/bin/time -v make -j8` to make the Makefile, the result of
CPU used is  'Percent of CPU this job got: 648%'. 
So i wonder if Makefile generated by CMake support make -jN, BTW my CPU is
I7-4790, and after i use 'cat /proc/cpuinfo', there are 8 processors.

Thanks a lot,
Chao



--
View this message in context: 
http://cmake.3232098.n2.nabble.com/Does-Makefile-generated-by-CMake-support-make-jN-tp7593949.html
Sent from the CMake mailing list archive at Nabble.com.
-- 

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


[cmake-developers] [PATCH v4] Add MinGW support for FStream

2016-07-12 Thread Dāvis Mosāns
std::basic_filebuf::open(const wchar_t *) isn't part of C++ standard
and it's only present for MSVC but it isn't present in libstdc++ (MinGW)
so we implement this functionality using GNU libstdc++ stdio_filebuf
extension and _wfopen function.
---
 CMakeLists.txt  |  14 +++
 Source/kwsys/CMakeLists.txt |   8 ++
 Source/kwsys/FStream.hxx.in | 235 +++-
 3 files changed, 187 insertions(+), 70 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 792b5a5..b53c6b1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -273,6 +273,20 @@ macro (CMAKE_BUILD_UTILITIES)
 CMAKE_SET_TARGET_FOLDER(${KWSYS_NAMESPACE}TestSharedForward 
"${kwsys_folder}")
   endif()
 
+  IF(KWSYS_USE_SystemTools)
+SET(KWSYS_USE_Directory 1)
+SET(KWSYS_USE_FStream 1)
+SET(KWSYS_USE_Encoding 1)
+  ENDIF()
+
+  IF(KWSYS_USE_FStream)
+INCLUDE(CheckIncludeFileCXX)
+CHECK_INCLUDE_FILE_CXX(ext/stdio_filebuf.h HAVE_EXT_STDIO_FILEBUF_H)
+IF(HAVE_EXT_STDIO_FILEBUF_H)
+  add_definitions(-DHAVE_EXT_STDIO_FILEBUF_H=1)
+ENDIF()
+  ENDIF()
+
   #-
   # Setup third-party libraries.
   # Everything in the tree should be able to include files from the
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 33a97e6..02ba2db 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -636,6 +636,14 @@ IF(KWSYS_USE_SystemInformation)
   ENDIF()
 ENDIF()
 
+IF(KWSYS_USE_FStream)
+  INCLUDE(CheckIncludeFileCXX)
+  CHECK_INCLUDE_FILE_CXX(ext/stdio_filebuf.h HAVE_EXT_STDIO_FILEBUF_H)
+  IF(HAVE_EXT_STDIO_FILEBUF_H)
+add_definitions(-DHAVE_EXT_STDIO_FILEBUF_H=1)
+  ENDIF()
+ENDIF()
+
 #-
 # Choose a directory for the generated headers.
 IF(NOT KWSYS_HEADER_ROOT)
diff --git a/Source/kwsys/FStream.hxx.in b/Source/kwsys/FStream.hxx.in
index 681e4d8..eb911c9 100644
--- a/Source/kwsys/FStream.hxx.in
+++ b/Source/kwsys/FStream.hxx.in
@@ -14,152 +14,247 @@
 
 #include <@KWSYS_NAMESPACE@/Encoding.hxx>
 #include 
+#if defined(_WIN32)
+#  if !defined(_MSC_VER) && defined(HAVE_EXT_STDIO_FILEBUF_H)
+#include 
+#  elif !defined(_MSC_VER) || _MSC_VER < 1400
+#pragma message("WARNING: Opening non-ASCII files might fail!")
+#  endif
+#endif
 
 namespace @KWSYS_NAMESPACE@
 {
-#if defined(_MSC_VER) && _MSC_VER >= 1400
+#if defined(_WIN32) && (defined(_MSC_VER) || defined(HAVE_EXT_STDIO_FILEBUF_H))
 # if defined(_NOEXCEPT)
 #  define @KWSYS_NAMESPACE@_FStream_NOEXCEPT _NOEXCEPT
 # else
 #  define @KWSYS_NAMESPACE@_FStream_NOEXCEPT
 # endif
+
+#if defined(_MSC_VER)
+
   template
   class basic_filebuf : public std::basic_filebuf
   {
+# if _MSC_VER >= 1400
 public:
   typedef std::basic_filebuf my_base_type;
   basic_filebuf *open(char const *s,std::ios_base::openmode mode)
   {
+const std::wstring wstr = Encoding::ToWide(s);
 return static_cast(
-  my_base_type::open(Encoding::ToWide(s).c_str(), mode)
+  my_base_type::open(wstr.c_str(), mode)
   );
   }
+# endif
+  };
+
+#else
+
+  inline std::wstring getcmode(const std::ios_base::openmode mode) {
+std::wstring cmode;
+bool plus = false;
+if (mode & std::ios_base::app) {
+  cmode += L"a";
+  plus = mode & std::ios_base::in ? true : false;
+} else if (mode & std::ios_base::trunc ||
+(mode & std::ios_base::out && (mode & std::ios_base::in) == 
0)) {
+  cmode += L"w";
+  plus = mode & std::ios_base::in ? true : false;
+} else {
+  cmode += L"r";
+  plus = mode & std::ios_base::out ? true : false;
+}
+if (plus) {
+  cmode += L"+";
+}
+if (mode & std::ios_base::binary) {
+  cmode += L"b";
+} else {
+  cmode += L"t";
+}
+return cmode;
   };
 
+#endif
+
   template >
-  class basic_ifstream : public std::basic_istream
+  class basic_efilebuf
   {
+public:
+#if defined(_MSC_VER)
+  typedef basic_filebuf internal_buffer_type;
+#else
+  typedef __gnu_cxx::stdio_filebuf internal_buffer_type;
+#endif
+
+  basic_efilebuf() : file_(0)
+  {
+buf_ = 0;
+  }
+
+  bool _open(char const *file_name,std::ios_base::openmode mode)
+  {
+if (is_open() || file_) {
+  return false;
+}
+#if defined(_MSC_VER)
+const bool success = buf_->open(file_name,mode) != 0;
+#else
+const std::wstring wstr = Encoding::ToWide(file_name);
+bool success = false;
+std::wstring cmode = getcmode(mode);
+file_ = _wfopen(wstr.c_str(), cmode.c_str());
+if (file_) {
+  if (buf_) {
+delete buf_;
+  }
+  buf_ = new internal_buffer_type(file_, mode);
+  success = true;
+}
+#endif
+  

[cmake-developers] [PATCH] CMake installation improvements

2016-07-12 Thread Konstantin Podsvirov
Hello Brad,

please apply my changes.

--
Regards,
Konstantin Podsvirov
From 56137a0f7096bae99eeb45ca83567a5ee87d4cee Mon Sep 17 00:00:00 2001
From: Konstantin Podsvirov 
Date: Wed, 13 Jul 2016 00:10:28 +0300
Subject: [PATCH 1/3] CMake: install COMPONENT cmcldeps

Added in Tools group with IFW installer
---
 CMakeCPack.cmake   |  3 +++
 CMakeCPackOptions.cmake.in | 10 +-
 Source/CMakeLists.txt  | 18 +++---
 3 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 8879cb9..60011ae 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -70,6 +70,9 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
   # Components
   if(CMake_INSTALL_COMPONENTS)
 set(_CPACK_IFW_COMPONENTS_ALL cmake ctest cpack)
+if(WIN32 AND NOT CYGWIN)
+list(APPEND _CPACK_IFW_COMPONENTS_ALL cmcldeps)
+endif()
 if(APPLE)
   list(APPEND _CPACK_IFW_COMPONENTS_ALL cmakexbuild)
 endif()
diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in
index 59ae224..1d61613 100644
--- a/CMakeCPackOptions.cmake.in
+++ b/CMakeCPackOptions.cmake.in
@@ -102,13 +102,21 @@ if(CPACK_GENERATOR MATCHES "IFW")
   set(CPACK_IFW_COMPONENT_CPACK_PRIORITY 87)
   set(CPACK_IFW_COMPONENT_CPACK_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
 
+  set(CPACK_COMPONENT_CMCLDEPS_DISPLAY_NAME "cmcldeps")
+  set(CPACK_COMPONENT_CMCLDEPS_DESCRIPTION
+"The \"cmcldeps\" executable is wrapper around \"cl\" program")
+  set(CPACK_COMPONENT_CMCLDEPS_GROUP Tools)
+  set(CPACK_IFW_COMPONENT_CMCLDEPS_NAME "CMClDeps")
+  set(CPACK_IFW_COMPONENT_CMCLDEPS_PRIORITY 86)
+  set(CPACK_IFW_COMPONENT_CMCLDEPS_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
+
   set(CPACK_COMPONENT_CMAKEXBUILD_DISPLAY_NAME "cmakexbuild")
   set(CPACK_COMPONENT_CMAKEXBUILD_DESCRIPTION
 "The \"cmakexbuild\" executable is a wrapper program for \"xcodebuild\"")
   set(CPACK_COMPONENT_CMAKEXBUILD_REQUIRED TRUE)
   set(CPACK_COMPONENT_CMAKEXBUILD_GROUP Tools)
   set(CPACK_IFW_COMPONENT_CMAKEXBUILD_NAME "CMakeXBuild")
-  set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 86)
+  set(CPACK_IFW_COMPONENT_CMAKEXBUILD_PRIORITY 85)
   set(CPACK_IFW_COMPONENT_CMAKEXBUILD_VERSION "@_CPACK_IFW_PACKAGE_VERSION@")
 
   # Dialogs
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index d49ebbb..a790994 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -530,11 +530,14 @@ set(SRCS ${SRCS}
   cmNinjaUtilityTargetGenerator.h
   )
 
+# Temporary variable for tools targets
+set(_tools)
+
 if(WIN32 AND NOT CYGWIN)
   set_source_files_properties(cmcldeps.cxx PROPERTIES COMPILE_DEFINITIONS _WIN32_WINNT=0x0501)
   add_executable(cmcldeps cmcldeps.cxx ${MANIFEST_FILE})
+  list(APPEND _tools cmcldeps)
   target_link_libraries(cmcldeps CMakeLib)
-  install(TARGETS cmcldeps DESTINATION bin)
 endif()
 
 foreach(v CURL_CA_BUNDLE CURL_CA_PATH)
@@ -746,6 +749,7 @@ endif()
 
 if(APPLE)
   add_executable(cmakexbuild cmakexbuild.cxx)
+  list(APPEND _tools cmakexbuild)
   target_link_libraries(cmakexbuild CMakeLib)
   add_executable(OSXScriptLauncher
 CPack/OSXScriptLauncher.cxx)
@@ -755,14 +759,17 @@ endif()
 
 # Build CMake executable
 add_executable(cmake cmakemain.cxx cmcmd.cxx cmcmd.h ${MANIFEST_FILE})
+list(APPEND _tools cmake)
 target_link_libraries(cmake CMakeLib)
 
 # Build CTest executable
 add_executable(ctest ctest.cxx ${MANIFEST_FILE})
+list(APPEND _tools ctest)
 target_link_libraries(ctest CTestLib)
 
 # Build CPack executable
 add_executable(cpack CPack/cpack.cxx ${MANIFEST_FILE})
+list(APPEND _tools cpack)
 target_link_libraries(cpack CPackLib)
 
 # Curses GUI
@@ -781,15 +788,12 @@ include (${CMake_SOURCE_DIR}/Source/LocalUserOptions.cmake OPTIONAL)
 
 # Install tools
 
-set(_tools cmake ctest cpack)
-
-if(APPLE)
-  list(APPEND _tools cmakexbuild)
-endif()
-
 foreach(_tool ${_tools})
   CMake_OPTIONAL_COMPONENT(${_tool})
   install(TARGETS ${_tool} DESTINATION ${CMAKE_BIN_DIR} ${COMPONENT})
 endforeach()
 
 install(FILES cmCPluginAPI.h DESTINATION ${CMAKE_DATA_DIR}/include)
+
+# Unset temporary variables
+unset(_tools)
-- 
2.8.3.windows.1

From bfa20dc8074c0c70b94ebbc8b150df001590088e Mon Sep 17 00:00:00 2001
From: Konstantin Podsvirov 
Date: Wed, 13 Jul 2016 00:50:10 +0300
Subject: [PATCH 2/3] QtIFW: process USE_LGPL when CMake_INSTALL_COMPONENTS

---
 CMakeCPack.cmake | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake
index 60011ae..34bb6bb 100644
--- a/CMakeCPack.cmake
+++ b/CMakeCPack.cmake
@@ -90,8 +90,10 @@ if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
 endif()
 if(BUILD_QtDialog)
   list(APPEND _CPACK_IFW_COMPONENTS_ALL cmake-gui)
-  set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES "set(CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES
-\"LGPLv2.1\" \"${CMake_SOURCE_DIR}/Licenses/LGPLv2.1.txt\")")
+  if(USE_LGPL)
+set(_CPACK_IFW_COMPONENT_CMAKE-GUI_LICENSES 

[Cmake-commits] CMake branch, next, updated. v3.6.0-788-gf405373

2016-07-12 Thread Chuck Atkins
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, next has been updated
   via  f4053736f27e15046f0f130d8559414c3bee0c9d (commit)
   via  d5e4516ec279318d3c639cda2f20149f0a588220 (commit)
   via  4ece8bdd0fa36d8e69dabf8c620f9e5017e8 (commit)
   via  87c1cd9c517bb57a537ba1f75548e6c20966553d (commit)
  from  0d7f858b7a6e8f1d0e49fadce08b57ea56eab062 (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=f4053736f27e15046f0f130d8559414c3bee0c9d
commit f4053736f27e15046f0f130d8559414c3bee0c9d
Merge: 0d7f858 d5e4516
Author: Chuck Atkins 
AuthorDate: Tue Jul 12 15:55:06 2016 -0400
Commit: CMake Topic Stage 
CommitDate: Tue Jul 12 15:55:06 2016 -0400

Merge topic 'fix-misc-hdf5-issues' into next

d5e4516e FindHDF5: Cleanup inconsistent use of HDF5_ROOT
4ece8bdd FindHDF5: Properly fail when required components are not found.
87c1cd9c FindHDF5: Fix h5cc arg parsing to work with homebrew on Mac


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d5e4516ec279318d3c639cda2f20149f0a588220
commit d5e4516ec279318d3c639cda2f20149f0a588220
Author: Chuck Atkins 
AuthorDate: Tue Jul 12 15:32:10 2016 -0400
Commit: Chuck Atkins 
CommitDate: Tue Jul 12 15:32:10 2016 -0400

FindHDF5: Cleanup inconsistent use of HDF5_ROOT

diff --git a/Modules/FindHDF5.cmake b/Modules/FindHDF5.cmake
index a81ba13..50e1892 100644
--- a/Modules/FindHDF5.cmake
+++ b/Modules/FindHDF5.cmake
@@ -378,6 +378,10 @@ macro( _HDF5_parse_compile_line
 endforeach()
 endmacro()
 
+if(NOT HDF5_ROOT)
+set(HDF5_ROOT $ENV{HDF5_ROOT})
+endif()
+
 # Try to find HDF5 using an installed hdf5-config.cmake
 if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
 find_package(HDF5 QUIET NO_MODULE)
@@ -478,7 +482,6 @@ if(NOT HDF5_FOUND AND NOT HDF5_ROOT)
   # search options with the wrapper
   find_program(HDF5_${__lang}_COMPILER_EXECUTABLE
 NAMES ${HDF5_${__lang}_COMPILER_NAMES} NAMES_PER_DIR
-HINTS ENV HDF5_ROOT
 PATH_SUFFIXES bin Bin
 DOC "HDF5 ${__lang} Wrapper compiler.  Used only to detect HDF5 
compile flags."
   )
@@ -590,10 +593,14 @@ elseif(NOT HDF5_FOUND AND NOT _HDF5_NEED_TO_SEARCH)
   endif()
 endif()
 
+if(HDF5_ROOT)
+set(SEARCH_OPTS NO_DEFAULT_PATH)
+endif()
 find_program( HDF5_DIFF_EXECUTABLE
 NAMES h5diff
-HINTS ENV HDF5_ROOT
+HINTS ${HDF5_ROOT}
 PATH_SUFFIXES bin Bin
+${SEARCH_OPTS}
 DOC "HDF5 file differencing tool." )
 mark_as_advanced( HDF5_DIFF_EXECUTABLE )
 
@@ -608,9 +615,6 @@ if( NOT HDF5_FOUND )
 set(HDF5_Fortran_LIBRARY_NAMEShdf5_fortran   ${HDF5_C_LIBRARY_NAMES})
 set(HDF5_Fortran_HL_LIBRARY_NAMES hdf5_hl_fortran 
${HDF5_C_HL_LIBRARY_NAMES} ${HDF5_Fortran_LIBRARY_NAMES})
 
-if(HDF5_ROOT)
-set(SEARCH_OPTS NO_DEFAULT_PATH)
-endif()
 foreach(__lang IN LISTS HDF5_LANGUAGE_BINDINGS)
 # find the HDF5 include directories
 if(LANGUAGE STREQUAL "Fortran")
@@ -622,7 +626,7 @@ if( NOT HDF5_FOUND )
 endif()
 
 find_path(HDF5_${__lang}_INCLUDE_DIR ${HDF5_INCLUDE_FILENAME}
-HINTS ${HDF5_ROOT} ENV HDF5_ROOT
+HINTS ${HDF5_ROOT}
 PATHS $ENV{HOME}/.local/include
 PATH_SUFFIXES include Include
 ${SEARCH_OPTS}
@@ -648,12 +652,12 @@ if( NOT HDF5_FOUND )
 endif()
 find_library(HDF5_${LIB}_LIBRARY_DEBUG
 NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
-HINTS ${HDF5_ROOT} ENV HDF5_ROOT PATH_SUFFIXES lib Lib
+HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
 ${SEARCH_OPTS}
 )
 find_library( HDF5_${LIB}_LIBRARY_RELEASE
 NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
-HINTS ${HDF5_ROOT} ENV HDF5_ROOT PATH_SUFFIXES lib Lib
+HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
 ${SEARCH_OPTS}
 )
 select_library_configurations( HDF5_${LIB} )
@@ -685,12 +689,12 @@ if( NOT HDF5_FOUND )
 endif()
 find_library(HDF5_${LIB}_LIBRARY_DEBUG
 NAMES ${THIS_LIBRARY_SEARCH_DEBUG}
-HINTS ${HDF5_ROOT} ENV HDF5_ROOT PATH_SUFFIXES lib Lib
+HINTS ${HDF5_ROOT} PATH_SUFFIXES lib Lib
 ${SEARCH_OPTS}
 )
 find_library( HDF5_${LIB}_LIBRARY_RELEASE
 NAMES ${THIS_LIBRARY_SEARCH_RELEASE}
-HINTS ${HDF5_ROOT} ENV HDF5_ROOT PATH_SUFFIXES lib Lib
+   

Re: [CMake] best way to handle subdirectory libraries ?

2016-07-12 Thread Bill Hoffman

On 7/12/2016 2:11 PM, Dan Ibanez wrote:


Other projects have a whole system atop CMake that manages this.
I'm trying to get a sense of what the "best" setup looks like using pure
CMake.


See  Usage Requirements:

https://cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html#id10
https://cmake.org/cmake/help/v3.0/prop_tgt/INTERFACE_INCLUDE_DIRECTORIES.html

-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://public.kitware.com/mailman/listinfo/cmake


[CMake] best way to handle subdirectory libraries ?

2016-07-12 Thread Dan Ibanez
Hello,

I've used CMake for a while but only recently
discovered several features for better installing a package, and am
trying to update the way I use CMake.

My question as to do with projects which contain
several modules/components/libraries, each of which is in a subdirectory.
Each library may depend on other libraries in other subdirectories.
I've set up two GitHub repos with my current understanding
of how this should be done in CMake:

https://github.com/ibaned/two_libs
https://github.com/ibaned/use_two_libs

This works, but a few things are naggingly sub-optimal, such
as the way include directories are passed from one sub-dir to another:

https://github.com/ibaned/two_libs/blob/master/add_nums/CMakeLists.txt#L8

Is there a better way to carry include dirs across scopes ?

Our real project right now generates Config.cmake files for each
subdirectory
and then other subdirectories use find_package just to get this info across:

https://github.com/SCOREC/core/blob/master/pcu/CMakeLists.txt#L44

Other projects have a whole system atop CMake that manages this.
I'm trying to get a sense of what the "best" setup looks like using pure
CMake.

Any advice about this is much appreciated,

Thank you
-- 

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

[CMake] OSX Code Signing best practice

2016-07-12 Thread Harry Mallon
Hello all,

What is the current best practice for code signing OSX .apps and binaries? I am 
using:

1. MAC_OSX_BUNDLE for my .app targets.
2. unix style executables
3. dylibs
4. A prefpane (which I haven't got working yet) using something like the below:

add_library(prefpane MODULE
${sourceFiles}
)

set_target_properties(codexprefpane PROPERTIES
BUNDLE YES
BUNDLE_EXTENSION prefPane
XCODE_ATTRIBUTE_WRAPPER_EXTENSION prefPane
MACOSX_BUNDLE_INFO_PLIST ${prefpane_plist_file}
)

I am not using the CPackBundle generator so I cannot use the signing in that. I 
have tried:

1. Using set_target_properties(  "XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY" 
"${SIGN_ID}")
2. Using an add_custom_command step. This code signs before all the Resources 
are copied in so the signatures are invalid

Any ideas?
Harry

Harry Mallon
CODEX | Software Engineer
60 Poland Street | London | England | W1F 7NT
E ha...@codexdigital.com | T +44 203 7000 989
-- 

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


Re: [CMake] CMake Reports Incorrect HDF5 Libraries on OS X after 3.6.0 Upgrade

2016-07-12 Thread Robert Maynard
Hi Breannan,

You can track the status of the fix at
https://gitlab.kitware.com/cmake/cmake/merge_requests/34

On Mon, Jul 11, 2016 at 8:52 AM, Robert Maynard
 wrote:
> Hi Breannan,
>
> I am able to reproduce this and will start digging into why this is occurring.
>
> On Sun, Jul 10, 2016 at 6:34 PM, Breannan Smith  
> wrote:
>> After upgrading to CMake 3.6.0 from 3.5.2, CMake fails to find HDF5 on OS X.
>>
>> With 3.5.2, find_package(HDF5 REQUIRED COMPONENTS C) reports the
>> following for HDF5_LIBRARIES. Note the presences of libhdf5.dylib, in
>> this list:
>>
>> /usr/local/Cellar/hdf5/1.8.16_1/lib/libhdf5.dylib;/usr/local/opt/szip/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib
>>
>> With 3.6.0, the same find_package command gives the following
>> HDF5_LIBRARIES. Notice that libhdf5.dylib is not even present:
>>
>> /usr/local/lib/libsz.dylib;/usr/lib/libz.dylib;/usr/lib/libdl.dylib;/usr/lib/libm.dylib
>>
>> The contents of the HDF5_LIBRARIES and HDF5_C_LIBRARIES are the same
>> under 3.6.0. Interestingly, the FindHDF5.cmake module does not report
>> a failure under 3.6.0 even though it fails to locate the HDF5 library.
>>
>> I did not see any changes to FindHDF5.cmake listed under the 3.6
>> release notes [1], but diffing the module files there were extensive
>> edits made.
>>
>> Has anyone else run into this issue or found a fix? Thank you!
>>
>> [1] https://cmake.org/cmake/help/v3.6/release/3.6.html
>> --
>>
>> 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
-- 

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


Re: [cmake-developers] CpackRPM doesn't escape filenames

2016-07-12 Thread Harry Mallon
Hi Brad,

A simple version, which covers the main test case is shown here. The %files 
list in the auto spec file shows "%dist.txt" when I think it should show 
"%%dist.txt". Even when I manually changed it to %% it didn't work for me 
though. Maybe someone who knows RPM better would be able to tell me why. Other 
cases could also be tested by adding more files (for those who have any of 
?|*.\'" in their file names).

--

CMakeLists.txt:

cmake_minimum_required(VERSION 3.5)

set(CPACK_GENERATOR "RPM")

project(Test)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/%dist.txt" "")

install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/%dist.txt"
DESTINATION foo
)

include(CPack)



Harry Mallon
CODEX | Software Engineer
60 Poland Street | London | England | W1F 7NT
E ha...@codexdigital.com | T +44 203 7000 989
> On 11 Jul 2016, at 19:10, Brad King  wrote:
>
> On 07/11/2016 11:32 AM, Harry Mallon wrote:
>> When using CPackRPM my filenames in auto generated RPM SPEC
>> look like "/usr/share/foo/bar10%.xml" when the "%" symbol
>> (which is in the filename should be escaped to "%%".
>
> Thanks.  Please open an issue here:
>
> https://gitlab.kitware.com/cmake/cmake/issues
>
> Ideally please include a http://sscce.org/ showing how to
> reproduce the problem.  Then perhaps it can be adapted as
> a test case.
>
> 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] QtAutoGenerators output in Ninja

2016-07-12 Thread Kevin Funk
On Tuesday, July 12, 2016 10:43:52 AM CEST Daniel Pfeifer wrote:
> Hi,
> 
> CMake currently puts messages like "Generating moc source" into the
> buildlog. This conflicts with the convention "no output == all good".

+1

> The messages blend nicely in the colorful output of Unix Makefiles,
> but when using the Ninja generator, they create quite some noise.

Indeed.

> How can this be improved?
> * remove the messages (no output == all good)
> * add an option to silence them
> * add an option to show them and hide them per default
> * ...

While it probably still makes sense to have it for Unix Makefiles; can we just 
disable this particular output in case Ninja files are used?

After all it's just a call to `cmake -E cmake_autogen`, right? Can we 
parameterize this call?

Just my 2 ct.

Cheers,
Kevin

> Cheers, Daniel


-- 
Kevin Funk | kf...@kde.org | http://kfunk.org

signature.asc
Description: This is a digitally signed message part.
-- 

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] QtAutoGenerators output in Ninja

2016-07-12 Thread Daniel Pfeifer
Hi,

CMake currently puts messages like "Generating moc source" into the
buildlog. This conflicts with the convention "no output == all good".
The messages blend nicely in the colorful output of Unix Makefiles,
but when using the Ninja generator, they create quite some noise.

How can this be improved?
* remove the messages (no output == all good)
* add an option to silence them
* add an option to show them and hide them per default
* ...

Cheers, Daniel
-- 

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] Splitting in multiple directories

2016-07-12 Thread portolan

Hello,

I am new to Cmake and I have a pretty strange behaviour: I set my c+++ 
project to work with a single CMakefile.txt, and now I am trying to have 
a more proper version with a .txt for each subdirectory


Pretty normal stuff, my source tree is:

 --Lib(my sources)

 --Logger   (as the name says, a logger)

--Lib_UT  (Unitary tests for CxxTest)

--Lib_UT_Runner  (the Cxx-generated test runner)


I have a Lib_UT/CMakefile.txt and Lib_UT_Runner/CMakefile.txt, I call 
them using include_directory(Lib_UT) and 
include_directory(Lib_UT_Runner) and everything is fine (apart from the 
runner executable being in a different directory)


BUT is I do the same for the logger, Lib_UT_Runner has a linking error 
where it cannot link to LibLogger.so. But the shared library is 
correctly generated and it is on the command line :


/usr/bin/c++  -lpthread CMakeFiles/Lib_UT_Runner.dir/Runner.cpp.o  
-o Lib_UT_Runner ../Lib_UT/libLib_UT.so ../libLib.so ../libLogger.so 
-lpthread 
-Wl,-rpath,/home/michele/mast-devel/cmake_debug/Lib_UT:/home/michele/mast-devel/cmake_debug:/home/michele/mast-devel/cmake_debug/Logger


I tried using find_library, but I always get not-found

What am I missing?

Regards,

Michele
--

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