Re: [cmake-developers] Using CMake generated ninja file as a subninja file

2016-03-09 Thread Ben Boeckel
On Tue, Mar 08, 2016 at 12:36:31 +0100, Nicolas Desprès wrote:
> Did you have a chance to review my patches?

So I looked at it today, and it looks good overall. A few niggles:

+inline bool cmEndsWith(const std::string& str, const std::string& what)
+{
+  assert(str.size() >= what.size());

Probably better to just "return false;" if this would fire. Better than
crashing if something in a release would have hit this.

+  return str.compare(str.size() - what.size(), what.size(), what) == 0;
+}
+
+inline void cmStripSuffixIfExists(std::string* str,
+  const std::string& suffix)
+{
+  assert(str != NULL);

Why not just use a reference rather than a pointer?

+  if (cmEndsWith(*str, suffix))
+str->resize(str->size() - suffix.size());

Missing braces.

-std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path)
+static void EnsureTrailingSlash(std::string* path)
+{
+  assert(path != NULL);

Same thing: why not a reference?

+  if (path->empty())
+return;
+  std::string::value_type last = (*path)[path->size()-1];
+#ifdef _WIN32
+  if (last != '\\')
+*path += '\\';
+#else
+  if (last != '/')
+*path += '/';
+#endif

Missing braces in the if statements here.

-  cmGlobalNinjaGenerator::WriteDefault(os,
-   outputs,
-   "Make the all target the default.");
+  if (!this->HasOutputPathPrefix())
+cmGlobalNinjaGenerator::WriteDefault(os,
+ outputs,
+ "Make the all target the default.");

Missing braces.

+void
+cmGlobalNinjaGenerator::StripNinjaOutputPathPrefixAsSuffix(std::string* path)
+{
+  assert(path != NULL);

More pointers :) .

+  if (path->empty())
+return;

And braces.

As for the tests:

+  file(WRITE "${top_build_ninja}" "\
+subninja sub/build.ninja
+default sub/all
+")

I think adding the (documented) bit:

+rule RERUN
+  command = true
+  description = Testing regeneration
+  generator = 1
+
+build build.ninja: RERUN || sub/build.ninja
+  pool = console

here and testing that if the CMakeLists.txt is touched that CMake reruns
would be worth it. It seems to work here, so keeping it working would be
great.

Thanks!

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

Re: [cmake-developers] [ANNOUNCE] CMake 3.5.0 available for download

2016-03-09 Thread Konstantin Podsvirov
Thank you!

Experimental installer (based on IFW generator):

Windows offline 32-bit (MSVC2013):

http://ifw.podsvirov.pro/cmake/files/v3.5/cmake-3.5.0-win32-x86.exe

Windows offline 64-bit (MSVC2013):

http://ifw.podsvirov.pro/cmake/files/v3.5/cmake-3.5.0-win64-x64.exe

Today online master:

https://ci.appveyor.com/project/podsvirov/cmake

http://ifw.podsvirov.pro/cmake/cmake-master-win32-online.exe

http://ifw.podsvirov.pro/cmake/cmake-master-win64-online.exe

If used before, then after ~30 minutes you can update :-)

08.03.2016, 21:55, "Robert Maynard" :
> I am proud to announce that CMake 3.5.0 is now available for download at:
> https://cmake.org/download/
>
> Documentation is available at:
> https://cmake.org/cmake/help/v3.5
>
> Release notes appear below and are also published at
> https://cmake.org/cmake/help/v3.5/release/3.5.html
>
> Some of the more significant features of CMake 3.5 are:
>
> * The precompiled Windows binary provided on "cmake.org" is now a
> ".msi" package instead of an installer executable. One may need to
> manually uninstall CMake versions lower than 3.5 before installing
> the new package.
>
> * The "cmake-gui(1)" learned an option to set the toolset to be used
> with VS IDE and Xcode generators, much like the existing "-T" option
> to "cmake(1)".
>
> * Find modules for Boost, FLEX, GTest, GTK2, PNG, TIFF, and XercesC
> now provide imported targets.
>
> * The "FindOpenMP" module learned to support Clang.
>
> * A new platform file for cross-compiling in the Cray Linux
> Environment to target compute nodes was added. See Cross Compiling
> for the Cray Linux Environment for usage details.
>
> * The "Compile Features" functionality is now aware of features
> supported by Clang compilers on Windows (MinGW).
>
> * Support was added for the ARM Compiler (arm.com) with compiler id
> "ARMCC".
>
> * When building for embedded platforms like Apple iOS, CMake learned
> to build and install combined targets which contain both a device
> and a simulator build. This behavior can be enabled by setting the
> "IOS_INSTALL_COMBINED" target property.
>
> * The "CPackDMG" module learned new variable to specify AppleScript
> file run to customize appearance of "DragNDrop" installer folder
> including setting background image using PNG supplied or multi-
> resolution TIFF file. See the "CPACK_DMG_DS_STORE_SETUP_SCRIPT" and
> "CPACK_DMG_BACKGROUND_IMAGE" variables.
>
> Deprecated and Removed Features:
>
> * The "cmake(1)" "-E time" command now properly passes arguments
> with spaces or special characters through to the child process.
> This may break scripts that worked around the bug with their own
> extra quoting or escaping.
>
> * The "Xcode" generator was fixed to escape backslashes in strings
> consistently with other generators. Projects that previously worked
> around the inconsistecy with an extra level of backslashes
> conditioned on the Xcode generator must be updated to remove the
> workaround for CMake 3.5 and greater.
>
> CMake 3.5 Release Notes
> ***
>
> Changes made since CMake 3.4 include the following.
>
> New Features
> 
>
> GUI
> ---
>
> * The "cmake-gui(1)" gained options to control warnings about
> deprecated functionality.
>
> * The "cmake-gui(1)" learned an option to set the toolset to be used
> with VS IDE and Xcode generators, much like the existing "-T" option
> to "cmake(1)".
>
> * The "cmake-gui(1)" gained a Regular Expression Explorer which may
> be used to create and evaluate regular expressions in real-time. The
> explorer window is available via the "Tools" menu.
>
> Command-Line
> 
>
> * The "-Wdev" and "-Wno-dev" "cmake(1)" options now also enable and
> suppress the deprecated warnings output by default.
>
> * The suppression of developer warnings as errors can now be
> controlled with the new "-Werror=dev" and "-Wno-error=dev"
> the "cmake(1)" options.
>
> * The "cmake(1)" "-E" command-line tools "copy",
> "copy_if_different", "copy_directory", and "make_directory" learned
> to support multiple input files or directories.
>
> Commands
> 
>
> * The "cmake_parse_arguments()" command is now implemented natively.
> The "CMakeParseArguments" module remains as an empty placeholder for
> compatibility.
>
> * The "install(DIRECTORY)" command learned to support "generator
> expressions" in the list of directories.
>
> Variables
> -
>
> * The "CMAKE_ERROR_DEPRECATED" variable can now be set using the
> "-Werror=deprecated" and "-Wno-error=deprecated" "cmake(1)" options.
>
> * The "CMAKE_WARN_DEPRECATED" variable can now be set using the
> "-Wdeprecated" and "-Wno-deprecated" "cmake(1)" options.
>
> Properties
> --
>
> * The "VS_GLOBAL_" target property is now implemented for
> VS 2010 and above. Previously it worked only in VS 2008 and below.
>
> Modules
> ---
>
> * The "ExternalProject" module learned a new "GIT_REMOTE_NAME"
> option to control the "git clone --origin" 

Re: [cmake-developers] Using CMake generated ninja file as a subninja file

2016-03-09 Thread Ben Boeckel
On Tue, Mar 08, 2016 at 12:36:31 +0100, Nicolas Desprès wrote:
> Did you have a chance to review my patches?

Sorry, not yet. I hope to have a peek at it today or tomorrow.

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

Re: [cmake-developers] [PATCH SET] Support of Clang/C2 compiler

2016-03-09 Thread Brad King
On 02/27/2016 09:38 AM, Mariusz Pluciński wrote:
> Following is the list of patches with descriptions:

Thanks!

> 1. kwsys: fix build on VS Clang/C2 toolset
> Makes it possible to build CMake itself with Clang/C2.

Applied to KWSys [upstream] (http://review.source.kitware.com/#/c/20856/)
and merged to CMake.

> 2. CMakeDetermineCompilerId: allow to detect clang.exe bundled with Visual 
> Studio
> CMAKE_C(XX)?_COMPILER variables should point to clang.exe instead of cl.exe
> 
> 3. Visual Studio: in Clang/C2 toolset, setup correct compiler settings
> clang.exe takes most of options in clang/gcc-compatible format instead of 
> cl.exe format.
> 
> 4. Clang testable features: don't enable cxx_decltype_incomplete_return_type 
> in MSVC simluation mode
> This feature does not work. Honestly, I am not sure about the reason - may be 
> the bug in the compiler.
> 
> 5. Visual Studio 14: support of  tag in project files
> Projects using Clang/C2 use this tag to control language standard version.

Applied with minor tweaks:

 CMakeDetermineCompilerId: Add detection of clang.exe bundled with VS
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0a0c98ce

 VS: in Clang/C2 toolset, setup correct compiler settings
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1f913700

 Features: Clang has no cxx_decltype_incomplete_return_type in MSVC sim mode
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99b38f32

 VS 14: Add flag map for -std= to CppLanguageStandard tag in project files
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=384a9f6b

Mostly I changed use of CMAKE_GENERATOR_TOOLSET to CMAKE_VS_PLATFORM_TOOLSET.
The former is the user input.  The latter is provided by the VS generator to
indicate the actual toolset chosen, even if it is just a default when the
user does not specify one.

> 6. Tests: fix AliasTarget building on Clang/C2
> Clang in C++98 mode is unable to parse some of headers bundled with MSVC, so 
> using C++11 is necessary.
> 
> 7. Tests: fix Module.GenerateExportHeader building on Clang/C2
> Clang/C2 uses gcc attributes syntax for deprecations, but uses cl.exe syntax 
> for dllimports/exports.
> Also, includes same fix as in patch 6.
> 
> 9. Tests: fix Complex building on Clang/C2
> Same as in patch 6.
> 
> 10. Tests: fix complexOneConfig building on Clang/C2
> Same as in patch 6.
> 
> 12. Tests: fix Plugin building on Clang/C2
> Same as in patch 6.
> 
> 13. Tests: fix PDBDirectoryAndName on Clang/C2
> Clang/C2 does not generate pdb files for static libraries. Note that 
> debugging information is not lost - they're put into the .lib itself, and 
> when the binary is created, they seem to be extracted and placed into 
> binary's own pdb file.
> 
> 14. Tests: do not build PrecompiledHeader on Clang/C2
> Precompiled headers are not (yet?) supported in this compiler.

Applied, thanks:

 Tests: fix AliasTarget building on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2ec61500

 Tests: fix Module.GenerateExportHeader building on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1a902f24

 Tests: fix Complex building on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7726767a

 Tests: fix complexOneConfig building on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=71c09356

 Tests: fix Plugin building on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1e9d121

 Tests: fix PDBDirectoryAndName on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5fdd7b6b

 Tests: do not build PrecompiledHeader on Clang/C2
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c8a101e

I also added a release note:

 Help: Add notes for topic 'vs-clang-cl'
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eab94259

> 11. Tests: do not build ExternalProjectLocal/TutorialStep5 when path is too 
> long
> This toolset uses a bit longer names of some files, which may cause full path 
> size to exceed 256 characters.

The condition for this one needs to be thought out a bit more.
We no longer support Windows 98 so the old condition can simply
be replaced.  I expect it applies to all Windows versions anyway.
Anyway, this is mostly orthogonal to Clang/C2 support.

> 8. Tests: fix Module.WriteCompilerDetectionHeader building on Clang/C2
> Visual Studio does not handle this test very well. Not sure why.
> 
> 15. Tests: disable VSMidl on Clang/C2
> I don't know why this test fails.

I'm going to let these fail for now until someone has time to investigate
them more.

Would you be able to run nightly testing with this generator/compiler?
Instructions are here:

 https://cmake.org/Wiki/CMake/Git/Dashboard

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: 

Re: [cmake-developers] CTest custom HTML

2016-03-09 Thread Brad King
On 03/09/2016 04:13 AM, Charles Huet wrote:
> We used to use this, by creating a composite image containing the reference,
> generated and diff, but in some cases comparing accurately was tedious.
> Having the 3 images separately allows us to open each in a tab and quickly
> switch from one to the other, making human comparison much easier.
> 
> Also, we have added some HTML buttons and tables, which we would lose by 
> using this.

This work seems more suited for development on the CDash side to influence
how it displays the images.

For VTK testing we have an interactive slider to help compare the images:

 https://open.cdash.org/testDetails.php?test=422454265=4246600

-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


[cmake-developers] CTest Usage

2016-03-09 Thread CHEVRIER, Marc
Hi,

Is there someone able to help me regarding ctest usage with labels?

Here is the problem: I have various tests which have labels attached to them:
set_property (TEST test1 PROPERTY LABELS LABEL1)
set_property (TEST test2 PROPERTY LABELS LABEL1 LABEL2)
set_property (TEST test3 PROPERTY LABELS LABEL2)

Now, I want to be able to select tests which have labels LABEL1 AND LABEL2 
attached to them. Unfortunately, the command ctest –L LABEL1 –L LABEL2 will 
select all the tests rather than on the test test2 (a OR is applied on the 
various –L options).

Is there a way to get a AND on the labels specified?
If not, I think it will be very valuable to introduce this enhancement to be 
able to manage labels when a lot are created. In my example the direct solution 
is to create LABEL3 for tests2 but it become rapidly impossible to manage a 
specific label per subset tests when number of labels increase.

Marc

-- 

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] CTest custom HTML

2016-03-09 Thread Charles Huet
Sadly this is quite not good enough.
We used to use this, by creating a composite image containing the
reference, generated and diff, but in some cases comparing accurately was
tedious.
Having the 3 images separately allows us to open each in a tab and quickly
switch from one to the other, making human comparison much easier.

Also, we have added some HTML buttons and tables, which we would lose by
using this.



Le mar. 8 mars 2016 à 19:27, Brad King  a écrit :

> On 03/08/2016 11:09 AM, Charles Huet wrote:
> > mostly useful to display images, since some of our tests compare
> > images with ImageMagick
>
> CTest/CDash already supports sending images for display.  It was
> developed for the same purpose for VTK testing.  The test output
> can contain
>
>type="image/png">/path/to/file.png
>
> CTest will load the named file and send it as part of the submission
> to CDash.
>
> -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] CMake for 64Win7

2016-03-09 Thread Bartosz Kosiorek
Hello.
I checked the generation performance for our huge project for Linux and
Windows, and there is big improvement for 64bit over 32 bit for Linux.

For Windows there is no such big difference between 32bit and 64bit in
generation time:

  CMake 3.5.0 Windows 64 bits:
  End time:   9.41:45
  Start time: 9.34:45
  Difference: 7:00

  CMake 3.5.0 Windows 32 bits:
  End time:   9.50:58
  Start time: 9.44:25
  Difference: 0.06:33


Of course it depends on project. I think it will be great to have 64
bit build for Windows.


Best Regards

Bartosz



2016-03-08 8:55 GMT+01:00 Konstantin Podsvirov :

> Good day!
>
> You can try the experimental installer (based on IFW generator) from my
> website:
>
> http://ifw.podsvirov.pro/cmake/files/v3.5/cmake-3.5.0-rc3-win64-x64.exe
>
> You can also try the online version, which is based on code from branch
> "master":
>
> http://ifw.podsvirov.pro/cmake/cmake-master-win64-online.exe
>
> Online installer supports online update.
>
> Good luck :-)
>
> 08.03.2016, 03:32, "LI, NING" :
> > Dear Sirs,
> >
> > There are only 32Win version of CMake( cmake-3.5.0-rc3-win32-x86.msi or
> cmake-3.5.0-rc3-win32-x86.zip ) on your web page(
> https://cmake.org/download/ ). When will the version for 64Win available?
> >
> > Thank you for the help!
> >
> > Ning.
> > ==
> > LI, Ning. Ph.D.
> > --
> > E-mail Address: l...@cec.sc.edu
> > ===The University of South Carolina===
>
> --
> Regards,
> Konstantin Podsvirov
> --
>
> 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