Your message dated Fri, 16 Oct 2009 23:33:10 +0300
with message-id <[email protected]>
and subject line Re: Bug#550908: cmake: Source files properties don't propagate 
across subdirectories
has caused the Debian Bug report #550908,
regarding cmake: Source files properties don't propagate across subdirectories
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
550908: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=550908
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: cmake
Version: 2.6.4-3
Severity: important


The recent cmake update appears to have broken source file properties.  Here is
how to reproduce it minimally:

### begin ###
# rm -rf bindir srcdir
mkdir -p srcdir/subdir
mkdir bindir
cat <<EOF > srcdir/CMakeLists.txt
cmake_minimum_required(VERSION 2.6)
project(dummy)

set(file "\${CMAKE_BINARY_DIR}/output.cpp")

set_source_files_properties("\${file}" PROPERTIES SOME_USER_DEFINED_PROP blah)

get_source_file_property(val \${file} SOME_USER_DEFINED_PROP)

# Will print "blah", as expected
message(STATUS "\${val}")

add_subdirectory("subdir")
EOF

cat <<EOF > srcdir/subdir/CMakeLists.txt
get_source_file_property(val \${file} SOME_USER_DEFINED_PROP)
# Will print "NOTFOUND" instead of "blah", indicating the property was never
# defined.
message(STATUS "\${val}")
EOF

cd bindir
cmake ../srcdir
### end ###

Other forms of properties (eg target properties) are inherited as expected.

The bug is still present when:

- using different property setting functions like set_property().
- having the source file as an OUTPUT of an add_custom_command().
- calling define_property() before setting the property.
- locating the file in the srcdir instead of bindir.
- using a non-user defined property like GENERATED.

I did not test properties defined by cmake other than GENERATED (set by
add_custom_command()) because I'm not sure exactly when they are defined by the
system.  I did test that add_custom_command() correctly sets the property in the
local scope; it just isn't inherited.

Apart from the obvious compatibility issues, this is a particularly problematic
bug because cmake will fail to configure if it cannot find a file existing in
the file system unless the file has the property GENERATED defined to a true
value.  This property is automatically set by add_custom_command() which means
you can generate some file and then add_executable() with it.

Since only a subset of people will be affected by this bug I have not marked it
grave, but it does mean that anyone who meta-generates anything (eg. unit tests,
flex, bison, etc) can't use this version of cmake without hacks.  Consequently
it might cause Debian package builds to fail in odd ways.

The workaround is to be aware in advance of what sources will be generated and
set the property to true in the directory where you add_executable().

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (300, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-2-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cmake depends on:
ii  cmake-data             2.6.4-3           CMake data files (modules, templat
ii  libc6                  2.9-25            GNU C Library: Shared libraries
ii  libcurl3-gnutls        7.19.5-1.1        Multi-protocol file transfer libra
ii  libexpat1              2.0.1-4           XML parsing C library - runtime li
ii  libgcc1                1:4.4.1-4         GCC support library
ii  libstdc++6             4.4.1-4           The GNU Standard C++ Library v3
ii  libxmlrpc-c3           1.06.27-1         A lightweight RPC library based on
ii  zlib1g                 1:1.2.3.3.dfsg-15 compression library - runtime

cmake recommends no packages.

cmake suggests no packages.

-- no debconf information



--- End Message ---
--- Begin Message ---
Hello,

On trečiadienis 14 Spalis 2009 19:53:54 James Webber wrote:
> 
> Sorry if I wasted time and thanks for the quick handling of the initial
>  report of this not-really-a-bug.  ;)
> 
> I did not write to the -close address because this behaviour might be weird
> enough to warrant further scrutiny, but as far as I can see the matter is
> resolved and, looking at the source,

Closing.

-- 
Modestas Vainius <[email protected]>

Attachment: signature.asc
Description: This is a digitally signed message part.


--- End Message ---

Reply via email to