Re: [cmake-developers] set_test_properties ignoring multiple properties

2016-03-08 Thread Ben Boeckel
On Tue, Mar 08, 2016 at 14:36:38 -0700, Kael Dai wrote:
> I have a test that outputs multiple lines and want to use
> set_tests_properties with the PASS_REGULAR_EXPRESSION property to check
> different lines in the output. I've tried doing
> 
> set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1"
> PASS_REGULAR_EXPRESSION "value2")
> 
> I've also tried to split up the properties
> 
> set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1")
> set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value2")
> 
> In both cases, ctest is ignoring the test of "value1" and only checking if
> "value2" passes or not.

Right, PASS_REGULAR_EXPRESSION is being set to "value1" and then to
"value2". You can use set_property(TEST test1 APPEND) to append "value2"
to the existing property value (or use "value1;value2" to set it at
once).

> Is there any way to check multiple regular expression on the same test and
> check them all? The documentation for 3.1 seems to suggest you can, but it
> isn't working when building the tests.

If any one matches, the test is considered to have passed. Maybe you
want "value1.*value2;value2.*value1"?

--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] set_test_properties ignoring multiple properties

2016-03-08 Thread Nils Gladitz

On 08.03.2016 22:36, Kael Dai wrote:

Hi,

I have a test that outputs multiple lines and want to use 
set_tests_properties with the PASS_REGULAR_EXPRESSION property to 
check different lines in the output. I've tried doing


set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1" 
PASS_REGULAR_EXPRESSION "value2")


I've also tried to split up the properties

set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1")
set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value2")

In both cases, ctest is ignoring the test of "value1" and only 
checking if "value2" passes or not.


Is there any way to check multiple regular expression on the same test 
and check them all? The documentation for 3.1 seems to suggest you 
can, but it isn't working when building the tests.


The current documentation has an example on how to set the property with 
multiple values:

https://cmake.org/cmake/help/v3.5/prop_test/PASS_REGULAR_EXPRESSION.html

set_tests_properties() does not append to existing properties; it 
replaces them.
If you do want to append you can use set_property() with the APPEND 
keyword instead.


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

[cmake-developers] set_test_properties ignoring multiple properties

2016-03-08 Thread Kael Dai
Hi,

I have a test that outputs multiple lines and want to use
set_tests_properties with the PASS_REGULAR_EXPRESSION property to check
different lines in the output. I've tried doing

set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1"
PASS_REGULAR_EXPRESSION "value2")

I've also tried to split up the properties

set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value1")
set_tests_properties(test1 PROPERTIES PASS_REGULAR_EXPRESSION "value2")

In both cases, ctest is ignoring the test of "value1" and only checking if
"value2" passes or not.

Is there any way to check multiple regular expression on the same test and
check them all? The documentation for 3.1 seems to suggest you can, but it
isn't working when building the tests.

Thanks
-- 

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] [ANNOUNCE] CMake 3.5.0 available for download

2016-03-08 Thread 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 Apple platforms like 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 background image setting using supplied PNG 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"
  "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" value.

* The "FindBoost" module now provides imported targets such as
  "Boost::boost" and "Boost::filesystem".

* The "FindFLEX" module "FLEX_TARGET" macro learned a new
  "DEFINES_FILE" option to specify a custom output header to be
  generated.

* The "FindGTest" module now provides imported targets.

* The "FindGTK2" module, when "GTK2_USE_IMPORTED_TARGETS" is
  enabled, now sets "GTK2_LIBRARIES" to contain the list of imported
  targets instead of the paths to the libraries.  Moreover it now sets
  a new "GTK2_TARGETS" variable containing all the targets imported.

* The "FindOpenMP" module learned to support Clang.

* The "FindOpenSSL" module gained a new "OPENSSL_MSVC_STATIC_RT"
  option to 

Re: [cmake-developers] CTest custom HTML

2016-03-08 Thread Brad King
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

  /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


[cmake-developers] CTest custom HTML

2016-03-08 Thread Charles Huet
Hi,

to customize our test results, we developped a small test wrapper that
outputs some HTML markup (mostly useful to display images, since some of
our tests compare images with ImageMagick).
However, this does not work since CMake 3.3 because of the refactoring of
ctest to use cmXMLWriter, because cmXMLWriter is smart and wants to output
correct XML, and thus escapes everything.

While I completely understand and applaud the motivation and work behind
cmXMLWriter, it annoys me that we cannot have our custom reporting anymore.

Sadly, I have no idea how to have both the correctness provided by
cmXMLWriter and the flexibility of outputting custom HTML via the test's
stdout.

How could this be done with CMake > 3.3 ?
If it needs additional development on the CTest side I would of course try
and accomplish it, if anyone has an idea.

Thanks
-- 

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] C++11 only for a specified subdirectory

2016-03-08 Thread Attila Krasznahorkay
Hi Roman,

If you only set

set( CMAKE_CXX_STANDARD 11 )

in that subdirectory, then this should happen automatically. (Since the 
variable will not be visible as soon as you go out of the scope of this 
"subdirectory".)

Otherwise you could just set the CXX_STANDARD property on the targets that 
should be built in C++11 mode.

https://cmake.org/cmake/help/v3.1/prop_tgt/CXX_STANDARD.html

Cheers,
Attila

> On 04 Mar 2016, at 14:20, Roman Wüger  wrote:
> 
> Hi,
> 
> is it possible to activate C++11 only for a subdirectory?
> 
> Regards
> Roman
> -- 
> 
> 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

Re: [cmake-developers] patch for module GetPrerequisites

2016-03-08 Thread Brad King
On 03/07/2016 05:41 PM, Benjamin Ballet wrote:
> We have to call :
> fixup_bundle("${CMAKE_INSTALL_PREFIX}/../test"...
> to fix an optional test folder installed near the app.

Thanks.  I've made a slightly different fix that should resolve that:

 GetPrerequisites: Fix gp_resolved_file_type on non-canonical paths
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=37e8ccee

-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] [CMake 0016009]: FILES_MATCHING does not exclude empty directories

2016-03-08 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://cmake.org/Bug/view.php?id=16009 
== 
Reported By:Tatsuyuki Ishi
Assigned To:
== 
Project:CMake
Issue ID:   16009
Category:   CMake
Reproducibility:always
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2016-03-08 06:48 EST
Last Modified:  2016-03-08 06:48 EST
== 
Summary:FILES_MATCHING does not exclude empty directories
Description: 
When installing headers using FILES_MATCHING approach, it's better ignore empty
directories. In this case, CMake build directory is same as the source and the
CMakeFiles dir pollutes install output.

It could be implemented by a new syntax or changing behavior.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-03-08 06:48 Tatsuyuki Ishi 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


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

2016-03-08 Thread Nicolas Desprès
Ben,

Did you have a chance to review my patches?

Cheers,
Nicolas

On Sunday, February 14, 2016, Nicolas Desprès 
wrote:

> Ben,
>
> I have pushed a complete version of the patch here:
> https://github.com/nicolasdespres/CMake/commits/ninja-output-path-prefix
>
> Since the last push, I have addressed the comments you made in your
> previous review (i.e. move some code to cmAlgorithm.h) and added a
> RunCMake.NinjaOutputPathPrefix tests.
>
> The 'default' statement is no longer generated when
> CMAKE_NINJA_OUTPUT_PATH_PREFIX is set because, unlike rules, "default"
> statement are not scoped. Thus, if the user does not include one in the top
> build.ninja only the default target of the subninja file was built. This
> was a surprising behaviour for me, since I expected to build all "leaf"
> output targets of the graph as usual when running ninja without argument.
>
> Let me know what you think about this change.
>
> Last note: some of the tests were failing on master (dec7d5c4de7870ec) on
> my machines (macbookpro and linux box), so I don't know if they are broken
> or not by my patch:
> 194 - CTestCoverageCollectGCOV (Failed)
> 393 - RunCMake.CommandLine (Failed)
> 401 - RunCMake.IfacePaths_INCLUDE_DIRECTORIES (Failed)
>
> Cheers,
> Nicolas
>
>
>
> On Fri, Jan 22, 2016 at 5:50 PM, Ben Boeckel  > wrote:
>
>> On Fri, Jan 22, 2016 at 17:34:03 +0100, Nicolas Desprès wrote:
>> > I have pushed a first draft of the patch here:
>> >
>> >
>> https://github.com/nicolasdespres/CMake/commit/67a4faad47378c07c97a29dd229d6f9fa500763b
>> >
>> > I have tested with a small project and it looks good.
>>
>> Looks like a good start to me as well. I added some comments on the
>> commit.
>>
>> > I would like to add some regression tests but I don't know from where to
>> > start.
>> >
>> > The principle would be to duplicate and modify existing tests so that
>> > CMAKE_NINJA_OUTPUT_PATH_PREFIX is set to "sub/" and the build directory
>> is
>> > changed from _build to _build/sub. A dummy build.ninja file containing
>> > "subninja sub/build.ninja" should be generated in _build/build.ninja and
>> > ninja should be called from _build instead of _build/sub.
>> >
>> > It would be great if you could point me some existing tests that could
>> > serve as a base to do the above.
>>
>> The RunCMake test infrastructure would probably be the best place to
>> start. It could be modified to do some of this work.
>>
>> Thanks,
>>
>> --Ben
>>
>
>
>
> --
> Nicolas Desprès
>


-- 
Nicolas Desprès
-- 

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