Re: [cmake-developers] Review request: use PKG_CONFIG

2014-02-25 Thread Brad King
On 02/24/2014 06:14 PM, Christoph Grüninger wrote:
 overhauled version at
 https://github.com/gruenich/CMake/commit/75f5f2a8df590c560455ce8310f3d9fe76af01b1

Thanks.  Can you explain the purpose of the hunk adding
PKG_CONFIG_VERSION_STRING:

- REQUIRED_VARS PKG_CONFIG_EXECUTABLE
+ REQUIRED_VARS PKG_CONFIG_EXECUTABLE PKG_CONFIG_VERSION_STRING

?

It seems unrelated to the other parts of the change.

Thanks,
-Brad

-- 

Powered by www.kitware.com

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

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

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


Re: [cmake-developers] Review request: use PKG_CONFIG

2014-02-25 Thread Christoph Grüninger
Hi Brad,
there is a statement in the commit message:
  FPHSA now checks for PKG_CONFIG_VERSION_STRING to ensure
  that the executable given by PKG_CONFIG is an executable
  and has a --version parameter.

While testing, I set PKG_CONFIG to a random path like
/usr/bin/kate. This was accepted by FindPkgConfig.
Requiring PKG_CONFIG_VERSION_STRING ensures, that at
least the --version thing is supported. This makes it
more likely that a pkg-config executable is found.

Is my idea wrong or just my explanation not precise enough?

Bye
Christoph

 Brad King brad.k...@kitware.com hat am 25. Februar 2014 um 14:35 
 geschrieben:


 On 02/24/2014 06:14 PM, Christoph Grüninger wrote:
  overhauled version at
  https://github.com/gruenich/CMake/commit/75f5f2a8df590c560455ce8310f3d9fe76af01b1

 Thanks.  Can you explain the purpose of the hunk adding
 PKG_CONFIG_VERSION_STRING:

 - REQUIRED_VARS PKG_CONFIG_EXECUTABLE
 + REQUIRED_VARS PKG_CONFIG_EXECUTABLE PKG_CONFIG_VERSION_STRING

 ?

 It seems unrelated to the other parts of the change.

 Thanks,
 -Brad
-- 

Powered by www.kitware.com

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

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

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

Re: [cmake-developers] Review request: use PKG_CONFIG

2014-02-25 Thread Brad King
On 02/25/2014 08:49 AM, Christoph Grüninger wrote:
 there is a statement in the commit message:
   FPHSA now checks for PKG_CONFIG_VERSION_STRING to ensure
   that the executable given by PKG_CONFIG is an executable
   and has a --version parameter.

Sorry, I missed that.  Thanks.

 While testing, I set PKG_CONFIG to a random path like
 /usr/bin/kate. This was accepted by FindPkgConfig.
 Requiring PKG_CONFIG_VERSION_STRING ensures, that at
 least the --version thing is supported. This makes it
 more likely that a pkg-config executable is found.
 
 Is my idea wrong or just my explanation not precise enough?

The purpose of REQUIRED_VARS is to both check that it was
found but also tell the user what cache entries they need
to set to make the package found if it was not.  Since the
version string is computed and the user cannot set it
directly it does not make sense in this context.

I do not think we should try too hard to protect users
from themselves, but if you want a check for this then it
would need to be your own if().

-Brad

-- 

Powered by www.kitware.com

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

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

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

[cmake-developers] [CMake 0014771]: Ninja generator does not always honor SYMBOLIC rules with no command

2014-02-25 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://www.cmake.org/Bug/view.php?id=14771 
== 
Reported By:Brad King
Assigned To:
== 
Project:CMake
Issue ID:   14771
Category:   CMake
Reproducibility:always
Severity:   minor
Priority:   normal
Status: new
== 
Date Submitted: 2014-02-25 09:50 EST
Last Modified:  2014-02-25 09:50 EST
== 
Summary:Ninja generator does not always honor SYMBOLIC rules
with no command
Description: 
The SYMBOLIC source file property is a mark typically used on a custom command
output to say that the file will never actually exist.  This can be used to
create always-out-of-date rules that run on every build.

When a custom command has no actual command line and a symbolic output the Ninja
generator implements this by creating a phony build rule.  However, the Ninja
documentation states:

 If a phony build statement is written without any dependencies,
  the target will be considered out of date if it does not exist.

If there are order-only dependencies then Ninja does not consider a phony target
to be out of date.


Steps to Reproduce: 
$ cat ../CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(OrderedBuildAlways NONE)
add_custom_target(first)
add_custom_command(
  OUTPUT never-created
  COMMAND
  VERBATIM
  )
add_custom_command(
  OUTPUT always-printed
  COMMAND ${CMAKE_COMMAND} -E echo always printed
  COMMAND ${CMAKE_COMMAND} -E touch always-printed
  DEPENDS never-created
  VERBATIM
  )
set_property(SOURCE never-created PROPERTY SYMBOLIC 1)
add_custom_target(drive ALL DEPENDS always-printed)
add_dependencies(drive first)

$ cmake .. -G Ninja
$ ninja
[1/1] Generating always-printed
always printed
$ ninja
ninja: no work to do.

== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2014-02-25 09:50 Brad King  New Issue
==

-- 

Powered by www.kitware.com

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

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

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


Re: [cmake-developers] [New Module] FindOpenCL, FindHg

2014-02-25 Thread Brad King
Hi Matthäus,

On 02/23/2014 03:34 AM, Rolf Eike Beer wrote:
 Looks better.

Thanks for your work on these.  I've split your branch into
separate topics for FindHg and FindOpenCL.  The FindHg changes
are now in master:

 FindHg: Search for TortoiseHg
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8993df6c

 FindHg: Add Hg_WC_INFO macro
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcefbe73

I rebased and squashed the FindOpenCL module topic, with the
current draft here:

 Add FindOpenCL module
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85f681f2

in a topic called 'add-FindOpenCL'.  However, the names of the
cache entries and result variables are not correct.  Please
read the Find Modules section of the cmake-developer(7)
manual:

 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/manual/cmake-developer.7.rst;hb=8619a453#l667

Basically the names

 OpenCL_LIBRARY
 OpenCL_INCLUDE_DIR

should be cache entries (through find_library, find_path, etc.)
that the user can set to the location of individual components
of the package.  They do not need to be in the documentation
but could be mentioned in a separate section about what cache
entries the module defines.

The names

  OpenCL_FOUND
  OpenCL_INCLUDE_DIRS
  OpenCL_LIBRARIES
  OpenCL_VERSION_STRING

should be normal variables, not cache entries, that report the
results for use by the calling application code.  These should
be documented.

Please fetch and checkout the topic from the stage and add
commits to revise the module accordingly.

Thanks,
-Brad

-- 

Powered by www.kitware.com

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

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

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


Re: [cmake-developers] [New Module] FindOpenCL, FindHg

2014-02-25 Thread Matthäus G. Chajdas
Hi Brad,

thanks for splitting the patches  the review. I've just pushed the
requested changes to the add-FindOpenCL topic.

If there is still something missing, please drop me a line; I appreciate
your patience with a new contributor!

Cheers,
  Matthäus

On 25.02.2014 17:36, Brad King wrote:
 Hi Matthäus,
 
 On 02/23/2014 03:34 AM, Rolf Eike Beer wrote:
 Looks better.
 
 Thanks for your work on these.  I've split your branch into
 separate topics for FindHg and FindOpenCL.  The FindHg changes
 are now in master:
 
  FindHg: Search for TortoiseHg
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8993df6c
 
  FindHg: Add Hg_WC_INFO macro
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bcefbe73
 
 I rebased and squashed the FindOpenCL module topic, with the
 current draft here:
 
  Add FindOpenCL module
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=85f681f2
 
 in a topic called 'add-FindOpenCL'.  However, the names of the
 cache entries and result variables are not correct.  Please
 read the Find Modules section of the cmake-developer(7)
 manual:
 
  
 http://cmake.org/gitweb?p=cmake.git;a=blob;f=Help/manual/cmake-developer.7.rst;hb=8619a453#l667
 
 Basically the names
 
  OpenCL_LIBRARY
  OpenCL_INCLUDE_DIR
 
 should be cache entries (through find_library, find_path, etc.)
 that the user can set to the location of individual components
 of the package.  They do not need to be in the documentation
 but could be mentioned in a separate section about what cache
 entries the module defines.
 
 The names
 
   OpenCL_FOUND
   OpenCL_INCLUDE_DIRS
   OpenCL_LIBRARIES
   OpenCL_VERSION_STRING
 
 should be normal variables, not cache entries, that report the
 results for use by the calling application code.  These should
 be documented.
 
 Please fetch and checkout the topic from the stage and add
 commits to revise the module accordingly.
 
 Thanks,
 -Brad
 

-- 

Powered by www.kitware.com

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

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

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

Re: [cmake-developers] Review request: use PKG_CONFIG

2014-02-25 Thread Christoph Grüninger
Hi Brad,
thanks for your patience. In the past I misused REQUIRED_VARS several
times...

Find my most recent attempt:
https://github.com/gruenich/CMake/commit/9c0ced4b46599c08e0d3c4c5cb913e52562ea1d2

Bye
Christoph

-- 
You have to fall in love with the process of becoming great.
[Blake Griffin quoting his collage coach]
-- 

Powered by www.kitware.com

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

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

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