[cmake-developers] [CMake 0016133]: NO_DEFAULT_PATH is taken as a path when specified after the PATHS option.

2016-05-31 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
https://public.kitware.com/Bug/view.php?id=16133 
== 
Reported By:Alexis Wilke
Assigned To:
== 
Project:CMake
Issue ID:   16133
Category:   CMake
Reproducibility:always
Severity:   major
Priority:   normal
Status: new
== 
Date Submitted: 2016-05-31 20:27 EDT
Last Modified:  2016-05-31 20:27 EDT
== 
Summary:NO_DEFAULT_PATH is taken as a path when specified
after the PATHS option.
Description: 
I wanted to make sure that I could get a header from my environment (i.e. source
tree) first, then from the system if no specific version in the environment was
defined there. For this purpose, I used the NO_DEFAULT_PATH option as defined in
the documentation:

https://cmake.org/cmake/help/v3.5/command/find_path.html

However, the code would always return path "/usr/include" when I expect (in my
specific case) to see path "...path-to-source.../contrib/catch"

I found that by putting the NO_DEFAULT_PATH before the PATHS option, it worked
as I first expected. It seems to me, though, that it is not correct. There
should be a check and if a path defined after the PATHS option looks like a
flag, it should be taken as such and see it as the end of the list of PATHS or
HINTS.

Steps to Reproduce: 
The failing search looks like this:

FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
PATHS
${CMAKE_SOURCE_DIR}/contrib/catch 
${CMAKE_SOURCE_DIR}/contrib
NO_DEFAULT_PATH
)

IF(NOT CATCH_INCLUDE_DIR)
# Try again with default paths as per cmake
FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
)
ENDIF()


My Ubuntu installation includes a catch.hpp under /usr/include. This is because
I have the catch package already installed:

apt-get install catch

My source directory includes a contrib/catch/catch.hpp file.

Adding a MESSAGE("Found Path? ")(${CATCH_INCLUDE_DIR}) before the IF() shows us
that the CATCH_INCLUDE_DIR is already set and it is "/usr/include" instead of
the expected "${CMAKE_SOURCE_DIR}/contrib/catch".



Additional Information: 
There is a work around, which makes me think that the problem is that PATHS (and
probably HINTS) does not properly recognize NO_DEFAULT_PATH as a flag and no see
it as a path...

All I have to do is to put the NO_DEFAULT_PATH ahead of the PATHS specification.

FIND_PATH(CATCH_INCLUDE_DIR
catch.hpp
NO_DEFAULT_PATH
PATHS
${CMAKE_SOURCE_DIR}/contrib/catch 
${CMAKE_SOURCE_DIR}/contrib
)

See also my Stackoverflow.com entry here:

http://stackoverflow.com/questions/37534142/how-do-i-get-cmake-to-choose-the-header-found-in-my-contrib-directory/37534160#37534160
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2016-05-31 20:27 Alexis Wilke   New Issue
==

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers


[cmake-developers] Topic "add-opencl-imported-target" good to merge?

2016-05-31 Thread Matthäus G . Chajdas
Hi,

I've just pushed "add-opencl-imported-target" which adds an imported
target to FindOpenCL. The whole change is rather small:

https://cmake.org/gitweb?p=stage/cmake.git;a=commitdiff;h=6c53137a19e482140db3dc97b626af38348f2c71

Good to merge this to next for testing?

Cheers,
  Matthäus
-- 

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] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread Brad King
On 05/31/2016 02:28 PM, jerry@web.de wrote:
> thanks for the response. I was eager to solve this. I came up 
> with this solution:
>  
> -I$,\t-I>
>  
> I searched for a solution where i can use it without the quotes
> while the tab (\t) takes care that it is recognized as a generator
> expression. Now my command line looks a little bit odd with all these
> tabs but it works.
> 
> So i simply wonder whether it is possible to add to cmake 
> something like \s for a space.

One can already escape a space with `\ `, but it won't help you.

The only reason your `\t` hack works is because the incomplete
escaping performed by generators for add_custom_{command,target}
without the VERBATIM option does not consider TABs to need quoting.
Without that option, other needed quoting or escaping may not work.

There is no officially supported way to do what you're trying to do.
If you find a hack that happens to work due to implementation details
of the current version of CMake, there is no guarantee they will work
in future versions.  Please see my previous response for a supported
alternative approach.

-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] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread jerry . c . t
Hi,
 
thanks for the response. I was eager to solve this. I came up 
with this solution:
 
-I$,\t-I>
 
I searched for a solution where i can use it without the quotes
while the tab (\t) takes care that it is recognized as a generator
expression. Now my command line looks a little bit odd with all these
tabs but it works.
 
I choosed the \t because i need spaces between the arguments and 
there is no escape sequence for spaces.
 
So i simply wonder whether it is possible to add to cmake 
something like \s for a space.
 
Jerry
 
On 31.05.2016 16:22, Brad King wrote:
> On 05/28/2016 01:15 PM, jerry@web.de wrote:
>> "-I$, -I>"
>
> This tells CMake to generate a single argument consisting of the
> entire expanded value. We have no syntax to expand lists into
> multiple command line arguments after evaluation of generator
> expressions. Without the quotes the "$<" and ">" parts appear
> in different arguments to add_custom_command and so it is not
> recognized as a generator expression.
>
> It is not currently possible to do what you are trying to do.
> You'll need to use file(GENERATE) to produce a script holding
> the desired command instead. Then launch the script as the
> custom target's command.
>
> -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] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread jerry . c . t

Hi,

 

thanks for the response. I was eager to solve this. I came up with this solution:

 

-I$,\t-I>

 

I searched for a solution where i can use it without the quotes while the tab (\t) takes care

that it is recognized as a generator _expression_. Now my command line looks a little bit odd

with all this tabs but it works.

 

I choosed the \t because i need spaces between the arguments and there is no escape

sequence for spaces.

 

So i simply wonder whether it is possible to add to cmake something like \s for a space.

 

Jerry

 

On 31.05.2016 16:22, Brad King wrote:
> On 05/28/2016 01:15 PM, jerry@web.de wrote:
>> "-I$, -I>"
>
> This tells CMake to generate a single argument consisting of the
> entire expanded value. We have no syntax to expand lists into
> multiple command line arguments after evaluation of generator
> expressions. Without the quotes the "$<" and ">" parts appear
> in different arguments to add_custom_command and so it is not
> recognized as a generator _expression_.
>
> It is not currently possible to do what you are trying to do.
> You'll need to use file(GENERATE) to produce a script holding
> the desired command instead. Then launch the script as the
> custom target's command.
>
> -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] [MODERN] CMake ~3.6 vs Qt 5.6 vs MSVC2015

2016-05-31 Thread Konstantin Podsvirov
Hi all! Modern master updated! :-)

It's time to upgrade: CMake 3.5.20160531 now available!

Previously had problems with that, but now it seems that it works.

Let me remind you of the link.

Windows 32bit:

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

Windows 64bit:

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

If you have used it before, you can update via "CMake Maintenance Tool"

I used Windows 7, but it should work for Windows Vista and Windows 8 and 
Windows 10.

I ask those wishing to test the functionality.

And new:

Linux (Debian) amd64:

http://ifw.podsvirov.pro/cmake/cmake-master-amd64-online.run

Please test it :-)

> 01.10.2015, 09:29, Konstantin Podsvirov" :
>>  Hi all! Modern master alive! :-)
>>
>>  It's been almost a month and it's time to upgrade:
>>
>>  3.3.20150901 CMake => CMake 3.3.20151001
>>
>>  Dear friends, I have a question and call for help.
>>
>>  With my assistance the project has an option for component installation 
>> project:
>>
>>  CMake_INSTALL_COMPONENTS
>>
>>  Unfortunately not all files found your component.
>>  The files to be installed without specifying a component fall into 
>> 'Unspecified' component.
>>  Need to parse them out and assign them to the component context.
>>
>>  Now have the components:
>>
>>  - cmake;
>>  - ctest;
>>  - cpack;
>>  - cmake-gui;
>>  - sphinx-man;
>>  - sphinx-html;
>>  - sphinx singlehtml;
>>  - sphinx-qthelp
>>
>>  and General for everything else
>>
>>  Is Unspecified;
>>
>>  A list of unaccounted for 'Unspecified' of files to install on the Window 
>> is attached.
>>
>>  Links to the installers were specified earlier (see below).
>>
>>  On 28.07.2015, 17:49, "Konstantin Podsvirov" :
>>>  Hi dear CMake developers!
>>>
>>>  27.07.2015, 18:52, "Brad King" :
  On 07/24/2015 03:46 AM, Konstantin Podsvirov wrote:
>  To solve the problem you run cmake-gui is now possible with the
>  the following changes:

  Applied as two separate commits with minor tweaks:

  cmake-gui: Install Qt5 Windows platform plugin
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=42f0155b

  CMake: Add option CMake_INSTALL_DEPENDENCIES
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=068e7962
>>>
>>>  Code now in 'master' branch.
>>>
>>>  Thanks, Brad!
>>>
>>>  Meet/install/CMake built modern update on MSVC2015 c QtDialog based on Qt 
>>> 5.5 from today :-)
>>>
>>>  Windows 32bit:
>>>
>>>  http://ifw.podsvirov.pro/cmake/cmake-master-win32-online.exe
>>>
>>>  Windows 64bit:
>>>
>>>  http://ifw.podsvirov.pro/cmake/cmake-master-win64-online.exe
>>>
>>>  cmake-gui should work now, but if not, then update your system and install
>>>
>>>  The Visual C++ Redistributable for Visual Studio 2015 from the link below:
>>>
>>>  http://www.microsoft.com/en-us/download/details.aspx?id=48145
>>>
>>>  As always, questions and suggestions are welcome.
>>
>>  --
>>  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
>
> 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

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 

Re: [cmake-developers] output expressions fails with either a build.ninja error or wrong escaped space

2016-05-31 Thread Brad King
On 05/28/2016 01:15 PM, jerry@web.de wrote:
>   "-I$, -I>"

This tells CMake to generate a single argument consisting of the
entire expanded value.  We have no syntax to expand lists into
multiple command line arguments after evaluation of generator
expressions.  Without the quotes the "$<" and ">" parts appear
in different arguments to add_custom_command and so it is not
recognized as a generator expression.

It is not currently possible to do what you are trying to do.
You'll need to use file(GENERATE) to produce a script holding
the desired command instead.  Then launch the script as the
custom target's command.

-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