[cmake-developers] [CMake 0012646]: install() overwrites existing destination file

2012-01-01 Thread Mantis Bug Tracker

The following issue has been SUBMITTED. 
== 
http://public.kitware.com/Bug/view.php?id=12646 
== 
Reported By:Hugo Leisink
Assigned To:
== 
Project:CMake
Issue ID:   12646
Category:   CMake
Reproducibility:N/A
Severity:   feature
Priority:   normal
Status: new
== 
Date Submitted: 2012-01-01 04:10 EST
Last Modified:  2012-01-01 04:10 EST
== 
Summary:install() overwrites existing destination file
Description: 
The install() function overwrites the destination file if it exists. This
behaviour is not desirable for configuration files. I would like to have an
install_config() function which does not overwrite an existing destination file.


Optionally, it saves the destination file as filename.dist, so users can see
what has changed in the new default configuration file.
== 

Issue History 
Date ModifiedUsername   FieldChange   
== 
2012-01-01 04:10 Hugo Leisink   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


[cmake-developers] Rebase or not?

2012-01-01 Thread Eric Noulard
Hi,

Now that 2.8.7 is out I'd like to continue my work on CPack
documentation improvement.

My branch on stage is: ImproveCPackDoc
I did merge it to next on nov 13:
22236e48938b942a8b9d95d73d447fa5e54e19a0

see http://public.kitware.com/Bug/view.php?id=10067 as well.

This topic has never been merged to master.

How shall I continue:
  1) Go on with current branch and push to stage HEAD, merge to next
when ready etc... as usual

  2) Delete old stage branch
  Rebase on current master
  re-push to stage HEAD?


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
--

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] Trying to get build info for a target

2012-01-01 Thread Michael Hertling
On 01/01/2012 07:47 AM, Gary Kramlich wrote:
 On 12/31/2011 05:03 PM, Robert Dailey wrote:
 Storing the source directory will require the exact idea you had
 mentioned. Use an internal cache variable or, even better, a target
 property. This is how I have done it. Each target that I create
  specifies a list of its include directories (where other targets that
 depend on it can find its header files, and will append this directory
 to its list of searchable include directories).
 
 I learned the  hard way, that the target property can't be named
 SOURCE_LOCATION, since it just spit out the value for the LOCATION
 property, which seems like a bug, unless SOURCE_LOCATION was left around
 for compatibility, but I couldn't find it documented anywhere.

A target's sources may reside in arbitrary directories; there is no
guarantee that they're located next to the CMakeLists.txt file which
defines the target. Furthermore, source files with relative path are
searched w.r.t. CMAKE_CURRENT_SOURCE_DIR and - if not found - w.r.t.
CMAKE_CURRENT_BINARY_DIR, so the notion of a source directory
associated with a target is not reliable, IMO.

Apart from this, I can confirm that a target property ending in
_LOCATION does always yield the same result as the LOCATION
target property:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(LOCATION C)
FILE(WRITE ${CMAKE_BINARY_DIR}/main.c int main(void){return 0;}\n)
ADD_EXECUTABLE(main main.c)
SET_TARGET_PROPERTIES(main PROPERTIES XYZ_LOCATION xyz)
GET_TARGET_PROPERTY(p main XYZ_LOCATION)
MESSAGE(XYZ_LOCATION: ${p})

yields

XYZ_LOCATION: .../main

instead of xyz, and without the SET_TARGET_PROPERTIES() command, it
still yields the same instead of p-NOTFOUND. Indeed, this seems to
be strange behavior which is possibly worth a bug report, but maybe,
a CMake developer can provide some enlightenment.

 For defines, and I think cflags, you can use get_target_property().
 
 Coming up empty for the target and the directory.  Tried DEFINITIONS,
 COMPILE_DEFINITIONS, and COMPILE_FLAGS.  When used on the target, i get
 a -NOTFOUND, and I get an empty string when used on the source directory.

Each of these properties usually contains only a part of the flags/
definitions used to compile a target's source files, and even their
entirety does not necessarily contain all flags/definitions. AFAIK,
there's no single instance - variable, property or the like - that
one might query in order to retrieve the complete set of flags/
definitions that will be in effect for the compilations.

Moreover, note that these flags/definitions are configuration-specific,
and with multi-config generators, the configuration is chosen at build
time. Thus, gathering such information for a target at configuration
time is generally also not reliable, unless one takes the different
configurations into account.

 For libraries, I've also maintained a list in a target property. This is
 how you build recursive dependencies. CMake will automatically set up
 build order based on your dependencies, however you cannot query these
 libraries without maintaining them yourself. Also, another benefit to
 maintaining dependencies in target properties is that you can throw an
 error message if a target depends on another target that does not yet
 exist (used to ensure that targets are defined in the proper order in
 the cmake scripts).
 
 It looks like I'll have to be setting these up manually too, since even
 though cmake has knowledge about it, it won't give the information out
 to scripts.

The libraries a target's binary will be linked against may also depend
on the configuration - possibly chosen at build time - so predicting
them at configuration time is generally unreliable, too.

Regards,

Michael

 Maybe I'll be better off requiring that this module be included in the
 CMakeLists.txt for the target it's going to work on...  But that's
 really annoying that cmake is dictating how a module can work, even
 though all I'm trying to do is query a target...
 
 Hope that helps.
 
 It helps in the sense that I'm not chasing something that can't be done
 anymore ;)
--

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://www.cmake.org/mailman/listinfo/cmake


[Cmake-commits] CMake branch, master, updated. v2.8.6-454-g40aedcb

2012-01-01 Thread KWSys 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  40aedcbbaeddcb7e088c56e30f4252171e920baa (commit)
  from  7ce47e6908ec1e209b508e1661b3417c855ad2ae (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 -
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=40aedcbbaeddcb7e088c56e30f4252171e920baa
commit 40aedcbbaeddcb7e088c56e30f4252171e920baa
Author: KWSys Robot kwro...@kitware.com
AuthorDate: Mon Jan 2 00:05:04 2012 -0500
Commit: KWSys Robot kwro...@kitware.com
CommitDate: Mon Jan 2 00:05:04 2012 -0500

KWSys Nightly Date Stamp

diff --git a/Source/kwsys/kwsysDateStamp.cmake 
b/Source/kwsys/kwsysDateStamp.cmake
index 0c58336..bec94b3 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR  2012)
 SET(KWSYS_DATE_STAMP_MONTH 01)
 
 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   01)
+SET(KWSYS_DATE_STAMP_DAY   02)

---

Summary of changes:
 Source/kwsys/kwsysDateStamp.cmake |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake
___
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits