[cmake-developers] A variable for the role of the man who runs cmake?

2013-08-20 Thread Yury G. Kudryashov
Hi!

Sometimes I see discussions about default settings in buildsystem. Say,
- should the buildsystem run update-mime-database?
- should the buildsystem bytecompile installed python modules?
- should the buildsystem install a Python part of the package if required 
python dependency was not found?
- what to do with bundled libraries (evil for packagers, convenient for 
users with old system libs)?


The answer highly depends on who builds the package:
- a packager (or distro buildfarm);
- a developer;
- a user who just want to run git version;

Currently I see various hacks like "test if ENV{DESTDIR} is empty during 
install phase" etc. What do you think about introducing a standard 
(recommended?) cache variable for this type of information? Sure, every 
developer can just
set(YOUR_ROLE Developer CACHE STRING "Who are you?")
set_properties(CACHE YOUR_ROLE PROPERTY STRINGS 
"Developer;Packager;Maintainer;User")
but in this case a common name will help users (at least, once buildsystems 
will start really use this variable).
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH] Fix a typo in documentation

2013-08-15 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 Source/CPack/cmCPackDocumentVariables.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Source/CPack/cmCPackDocumentVariables.cxx 
b/Source/CPack/cmCPackDocumentVariables.cxx
index 1dfaaf9..8b16ae9 100644
--- a/Source/CPack/cmCPackDocumentVariables.cxx
+++ b/Source/CPack/cmCPackDocumentVariables.cxx
@@ -28,7 +28,7 @@ void cmCPackDocumentVariables::DefineVariables(cmake* cm)
  " the so-called top level directory. The purpose of"
  " is to include (set to 1 or ON or TRUE) the top level directory"
  " in the package or not (set to 0 or OFF or FALSE).\n"
- "Each CPack generator as a built-in default value for this"
+ "Each CPack generator has a built-in default value for this"
  " variable. E.g. Archive generators (ZIP, TGZ, ...) includes"
  " the top level whereas RPM or DEB don't. The user may override"
  " the default value by setting this variable.\n"
-- 
1.8.1.2

--

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] [PATCH] spell: fix a few typos in comments

2013-01-21 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 Source/cmMakefile.cxx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b432986..d1dc5a2 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2243,7 +2243,7 @@ bool cmMakefile::CanIWriteThisFile(const char* fileName)
 {
 return true;
 }
-  // If we are doing an in-source build, than the test will always fail
+  // If we are doing an in-source build, then the test will always fail
   if ( cmSystemTools::SameFile(this->GetHomeDirectory(),
this->GetHomeOutputDirectory()) )
 {
@@ -2254,8 +2254,8 @@ bool cmMakefile::CanIWriteThisFile(const char* fileName)
 return true;
 }
 
-  // Check if this is subdirectory of the source tree but not a
-  // subdirectory of a build tree
+  // Check if this is a subdirectory of the source tree but not a
+  // subdirectory of the build tree
   if ( cmSystemTools::IsSubDirectory(fileName,
   this->GetHomeDirectory()) &&
 !cmSystemTools::IsSubDirectory(fileName,
-- 
1.8.0

--

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] add_library(OBJECT) and AUTOMOC

2013-01-14 Thread Yury G. Kudryashov
2013/1/14 Alexander Neundorf :
> On Friday 11 January 2013, Brad King wrote:
>> On 01/11/2013 04:47 AM, Yury G. Kudryashov wrote:
>> > Look at
>> > $ git pull gitorious:~urkud1/cmake/urkud-cmake.git w/automoc-object
>> > please.
>>
>> The commit message for the first commit seems incomplete.
>> Also please use commit messages starting in "Automoc: ".
>>
>> Alex, can you please review this too?  It combines features we
>> each implemented.
>
> I have nothing more to add.
> If the test works for you, it's ok with me,.
Pushed an updated branch with new commit messages. Could you push it
to the repo, please?
--
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] add_library(OBJECT) and AUTOMOC

2013-01-11 Thread Yury G. Kudryashov
Hi!

Look at
$ git pull gitorious:~urkud1/cmake/urkud-cmake.git w/automoc-object
please.

It fixes CMAKE_AUTOMOC in the following scenario:

set(CMAKE_AUTOMOC ON)
# test.cpp has '#include "test.moc"' line
add_library(objlib OBJECT test.cpp)

add_executable(foo $ foo.cpp)

The second commit in the branch updates Tests/QtAutomoc.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Exporting dependent library targets in multiple export sets

2012-09-17 Thread Yury G. Kudryashov
2012/9/16 Alexander Neundorf :
> On Tuesday 11 September 2012, Brad King wrote:
>> On 09/11/2012 04:08 PM, Yury G. Kudryashov wrote:
>> > 2012/9/11 Alexander Neundorf :
>> >> Hi Yury,
>> >>
>> >> will you be able to work on this for the 2.8.10 release ?
>> >
>> > What are the deadlines?
>>
>> Features not finished by the end of September may not be included.
>
> I gave it a try today.
Thanks a lot! I had a lot of bureaucratic work last week, and did not
know if it will be finished soon. It seems that each Russian
bureaucrat wants to let citizens do much more paper work than it is
written in the law... The only way to resist is to cite the law or
give them a printed version to read.

It would be nice if you'll give me a couple of days to review your
branch. If I'll become silent again, just go on.
-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Exporting dependent library targets in multiple export sets

2012-09-17 Thread Yury G. Kudryashov
2012/9/17 Brad King :
> On 09/15/2012 04:45 PM, Alexander Neundorf wrote:
> Also, one of Yury's commit messages says:
>
>  TODO: remove another clear() because it doesn't delete TargetExports.
>
> What is that about?
clear() on a vector of TargetExport* does not call delete on each element.

BTW, do we really support the reinitialization of all cmake
structures? I think that there are quite a few memory leaks in this
case.
-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Exporting dependent library targets in multiple export sets

2012-09-11 Thread Yury G. Kudryashov
2012/9/11 Alexander Neundorf :
> Hi Yury,
>
> will you be able to work on this for the 2.8.10 release ?
What are the deadlines?
-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Exporting dependent library targets in multiple export sets

2012-08-23 Thread Yury G. Kudryashov
Hi!
2012/8/23 Daniel Pfeifer :
> 2012/8/22 Yury G. Kudryashov :
>>> Any "latest install" strategy is bound to generate subtle problems.
>>> Dependencies among export sets should be explicit:
>>>
>>>   install(EXPORT MyExport DEPENDS YourExport)
>> How should I choose between different
>> install(EXPORT YourExport)
>> commands?
>
> What about:
>
>   install(EXPORT MyExport DEPENDS YourPackage1 YourPackage2)
>
> ? That could create:
>
>   if(NOT __MyExport_include_guard)
> set(__MyExport_included TRUE)
> find_package(YourPackage1)
> find_package(YourPackage2)
>   endif()
>
> before declaring the imported targets.
> That way, we get the package dependencies resolved transitively.

This does not solve the problem of resolving namespaces.

What do you think about the following algorithm:

1. Export set lookup
1a. Look in the current export set.
1b. If failed, look in the export sets listed in DEPENDS parameter.
1c. If failed, look if the target belongs to a unique export set.
1d. If failed, produce an error message.

2. Installation of an export set lookup.
2a. For the current export set, use the current installation.
2b. For dependencies, if an export set was not installed or was
installed more than once, fail; otherwise, use the unique
installation.

Some questions:
1. What should we do in the APPEND mode?
2. Should we include(/path/to/dependency)? Or find_package() as
suggested by Daniel?
2a. If yes, using relative or absolute path?
-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Exporting dependent library targets in multiple export sets

2012-08-22 Thread Yury G. Kudryashov
2012/8/23 Brad King :
> On 08/22/2012 04:57 PM, Yury G. Kudryashov wrote:
>> I'm going to push the current state of my work to
>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git w/export-set
>> in a few minutes.
>
> Thanks for working on this!
>
>> It should work, though I haven't tested it yet. The idea is simple:
>> each target remembers the latest
>> install(TARGETS ... EXPORT)
>> command, and each export set remembers teh latest
>> install(EXPORT MyExport)
>> command. Then we query this information.
>
> Any "latest install" strategy is bound to generate subtle problems.
> Dependencies among export sets should be explicit:
>
>   install(EXPORT MyExport DEPENDS YourExport)
How should I choose between different
install(EXPORT YourExport)
commands?
-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Exporting dependent library targets in multiple export sets

2012-08-22 Thread Yury G. Kudryashov
Hi,

2012/8/23 Alexander Neundorf :
> Hi,
>
> If I would do this, I would get the error for the BarExport export set, that
> it does not contain target foo, which it depends on.
>
> We'd like to make this work, since we need this in KDE.
>
> How can this be done ?
Sorry for the very long silence. I had rather rich real life (e.g., my
son born about a month ago).

> Here's a relatively simple (I think) idea: export it anyway, and make sure in
> the generated targets file that those targets which were not part of the
> export-set exist:
I'm going to push the current state of my work to
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git w/export-set
in a few minutes.

It should work, though I haven't tested it yet. The idea is simple:
each target remembers the latest
install(TARGETS ... EXPORT)
command, and each export set remembers teh latest
install(EXPORT MyExport)
command. Then we query this information.


> There is an issue with the used namespace. Maybe it could simply assume that
> the targets which are not present use the same namespace as it does itself (as
> shown in the example above) ?
>
> Also, CMake could still error out if it detects that a library which an
> exported library depends on, is not exported at all, also taking into account
> the namespace.
>
> Would that work ?
> Did I miss something ?
> Better ideas ?
>
> Alex



-- 
Yours Yury,
mailto: urkud.ur...@gmail.com
--

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] Welcome to June, time for the next release candidate

2012-06-05 Thread Yury G. Kudryashov
Stephen Kelly wrote:

> David Cole wrote:
> 
>> We are preparing to build CMake 2.8.9, release candidate one, in the next
>> few days (or possibly as late as next week).
>> 
>> Is there any pending/outstanding work that anybody thinks is critical for
>> inclusion in CMake 2.8.9?
> 
> I'd very much like the POSITION_INDEPENDENT_CODE topic to be part of it.
> 
>> 
>> (I don't want to trigger a flurry of activity by sending this out... but
>> I suppose it's better to have it before we decide to cut rc1 than after.
>> ;-)
> 
> Yury did some work on export-sets:
> 
> http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7257/focus=7274
Currently it just moves export-sets to a dedicated class, so it can be 
merged if there are no objections. This change would simplify adding 
additional logic to install(EXPORT ...).
> 
> But I don't think it's 'done' enough for inclusion yet unfortunately. The
> existing tests pass, but new ones are needed. Hopefully we can get it
> ready early in the next cycle.
The problem is that I have a few deadlines in June: 2 grant applications 
have deadlines on 15th, and one on 20th... I'll try to find some time for 
cmake, but I'm not sure...
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] FindCXX11.cmake

2012-04-09 Thread Yury G. Kudryashov
Brad King wrote:

> On 4/6/2012 12:11 PM, Rolf Eike Beer wrote:
>> Attached is what I currently have.
> 
> Neat.  I like the change to "CheckCXX11Features" instead of "FindCXX11".
OK. I want some way to explicitly state the required and optional C++11 
features, and don't waste CPU checking for other features.

What do you think about the following syntax? I'm ready to implement it and 
write documentation next week-end.

# check for two optional features
check_cxx11_features(feature1 feature2)

# check for two required features
check_cxx11_features(feature1 feature2 REQUIRED)

# check for optional AND required features
check_cxx11_features(
REQUIRED required1 required2
        OPTIONAL optional1 optional2)
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] FindCXX11.cmake

2012-04-04 Thread Yury G. Kudryashov
Hi!

I'm going to write FinCXX11.cmake that will do the following:
* find compiler flags that enable C++11 functionality, and store them in 
CXX11_CXX_FLAGS;
* declare a component for some (each?) new language feature, and test it 
using check_cxx_source_compiles().

I have a few questions:
- for each of supported compilers other than gcc and clang, which flags 
should I check?
- for each new language feature, do you have a minimal code example that 
check if this feature is available?

Current version of FindCXX11.cmake is attached. This version is not ready 
for review.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru
include(CheckCXXCompilerFlag)
include(CMakePushCheckState)

set(_cxx11_flags_GNU "-std=gnu++11" "-std=gnu++0x")
set(_cxx11_flags_Clang "-std=gnu++11" "-std=gnu++0x")

unset(CXX11_CXX_FLAGS)

if(DEFINED _cxx11_flags_${CMAKE_CXX_COMPILER_ID})
  foreach(flag ${_cxx11_flags_${CMAKE_CXX_COMPILER_ID}})
string(REGEX REPLACE "[^a-zA-Z0-9]" "_" _tmp ${flag})
check_cxx_compiler_flag("${flag}" "${_tmp}")
if(${_tmp})
  set(CXX11_CXX_FLAGS "${flag}")
  break()
endif()
  endforeach()
  if(NOT DEFINED CXX11_CXX_FLAGS)
set(_cxx11_flags_notfound_reason "compiler ${CMAKE_CXX_COMPILER_ID} accepts none flags of ${_cxx11_flags_${CMAKE_CXX_COMPILER_ID}}")
  endif()
else()
  set(_cxx11_flags_notfound_reason "don't know how to tell ${CMAKE_CXX_COMPILER_ID} to use C++11")
endif()

if(NOT DEFINED CXX11_CXX_FLAGS)
  if(NOT DEFINED _cxx11_flags_notfound_reason) # Should never happen
set(_cxx11_flags_notfound_reason "unknown reason")
  endif()
  set(_message "Failed to find flags for C++11: ${_cxx11_flags_notfound_reason}")
  if(CXX11_FIND_REQUIRED)
message(SEND_ERROR "${_message}")
  else()
message(STATUS "${_message}")
  endif()
endif()

set(_cxx11_source_ENUM_CLASS "
enum class A { X, Y };
enum class B { X, Y };
int main () {
  A x = A::X;
  if (x == A::Y)
x = A::Y;
  return 0;
}
")

set(_cxx11_source_EXTENDED_SIZEOF "
struct C {
  int m;
  static int size_of_m() { return sizeof(m); }
};
int main () {
  return sizeof(C::m);
}
")

cmake_push_check_state()
set(CMAKE_REQUIRED_FLAGS ${CXX11_CXX_FLAGS})
foreach(component ${CXX11_FIND_COMPONENTS})
  if(DEFINED _cxx11_source_${component})
check_cxx_source_compiles("${_cxx11_source_${component}}" CXX11_${component}_FOUND)
  else()
message(AUTHOR_WARNING "Unknown component ${component}, mark as not found")
set(CXX11_${component}_FOUND FALSE)
  endif()
endforeach()
cmake_pop_check_state()
--

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] The lib64 case

2012-03-26 Thread Yury G. Kudryashov
Rolf Eike Beer wrote:

> ok, I now have:
> 
> find_path(VAR header.h
>  HINTS /opt/p1
>  PATHS /opt/p2
>  PATH_SUFFIXES foo)
> 
> This would search in /usr/include, /usr/foo, /opt/p1/foo, /opt/p2/foo, but
> neither in /opt/p1/include nor /opt/p2/include. Correct?
As far as I understand, it will search:
/opt/p1, /opt/p1/foo, /usr/include, /usr/include/foo, /opt/p2, /opt/p2/foo.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Doxygen documentation

2012-03-06 Thread Yury G. Kudryashov
Brad King wrote:

> On 3/6/2012 2:23 AM, Yury G. Kudryashov wrote:
>> Hi!
>>
>> I've just found that there are two doxygen configs in cmake source tree:
>> * cmake/doxygen.config
> 
> I think you can remove this one.
> 
>> * cmake/Utilities/Doxygen/* VTK magic
>>
>> The second one can be enabled by BUILD_DOCUMENTATION but doc_makeall.sh
>> references some VTK_* variables.
>>
>> Which one should I use/fix/..?
> 
> ...and remove VTK references of course.  Those are left from *way* back.
Did I understand correctly that I should remove the first one and work on 
the second one?

Where can I find the scripts referenced by the second one? In VTK source 
tree? Do we really need those scripts?

>From doc_makeall.sh.in:
# INTERMEDIATE_DOX_DIR:
# Directory where the intermediate Doxygen files should be stored (mainly
# these headers files converted from the VTK format to the Doxygen format).

What is the "VTK format"? Doesn't cmake use plain doxygen format?
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Doxygen documentation

2012-03-05 Thread Yury G. Kudryashov
Hi!

I've just found that there are two doxygen configs in cmake source tree:
* cmake/doxygen.config
* cmake/Utilities/Doxygen/* VTK magic

The second one can be enabled by BUILD_DOCUMENTATION but doc_makeall.sh 
references some VTK_* variables.

Which one should I use/fix/..?
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Two more patches

2012-03-03 Thread Yury G. Kudryashov
Hi!

Review the following two branches in 
git://gitorious.org/~urkud1/cmake/urkud-cmake.git, please:
* rename-used-commands;
* remove-unused-members.

You can either pull them or open in web browser:
https://gitorious.org/~urkud1/cmake/urkud-cmake/commits/remove-unused-
members
https://gitorious.org/~urkud1/cmake/urkud-cmake/commits/rename-used-commands
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Introducing: message(DEBUG)

2012-03-03 Thread Yury G. Kudryashov
Rolf Eike Beer wrote:

> I have a small patch to CMake that looks like this:
> +  if (!this->Makefile->IsOn("CMAKE_DEBUG_MESSAGES"))
I propose to print message if one of the following holds:
* CMAKE_DEBUG_MESSAGES is true;
* CMAKE_DEBUG_MESSAGES_FileName is true, where FileName is 
CMAKE_CURRENT_LIST_FILE's name without extension;
* Current list file is CMakeLists.txt and 
CMAKE_DEBUG_MESSAGES_CurrentDirectory is true.

This will allow

# Turn all debug messages
-DCMAKE_DEBUG_MESSAGES=ON
# Turn all debug messages in FindBoost.cmake
-DCMAKE_DEBUG_MESSAGES_FindBoost=ON
# Turn all debug messages in mysubdir/CMakeLists.txt 
-DCMAKE_DEBUG_MESSAGES_mysubdir=ON
# Turn all debug messages in **/CMakeLists.txt
-DCMAKE_DEBUG_MESSAGES_CMakeLists=ON
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Two pull requests

2012-02-29 Thread Yury G. Kudryashov
Brad King wrote:

> On 2/28/2012 4:21 PM, Brad King wrote:
>> On 2/28/2012 4:02 PM, Yury G. Kudryashov wrote:
>>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git
>>> run-vim-spellcheck
> 
> Merged, thanks:
> 
>   http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=adc2c990
> 
>>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git doxygen-fixes
> 
> Our style checker limits .h and .cxx files to 79 columns.
> Some of the updated comments exceed this limit.  Please
Force-pushed.

BTW, what is the policy for
const MyClass*
vs
MyClass const*?

Which parts of STL are allowed in sources that are needed for bootstrap?
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Two pull requests

2012-02-29 Thread Yury G. Kudryashov
Brad King wrote:

> On 2/28/2012 4:21 PM, Brad King wrote:
>> On 2/28/2012 4:02 PM, Yury G. Kudryashov wrote:
>>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git doxygen-fixes
> 
> Our style checker limits .h and .cxx files to 79 columns.
> Some of the updated comments exceed this limit.  Please
> reformat them.
Where can I find the style checker sources? I'll run it to pre-commit hook 
then.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH 1/2] cmPropertyDefinition::IsChained is const

2012-02-29 Thread Yury G. Kudryashov
Brad King wrote:

> On Tue, Feb 28, 2012 at 4:07 PM, Yury G.  Kudryashov
>  wrote:
>> This branch compiles with -Werror here:
>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git add-const-
>> qualifiers
> 
> I still get warnings like:
> 
>  Source/cmCommand.h:99:16: warning: ‘virtual bool
> cmCommand::IsScriptable() const’ was hidden [-Woverloaded-virtual]
>  Source/cmMacroCommand.cxx:53:16: warning:   by ‘virtual bool
> cmMacroHelperCommand::IsScriptable()’ [-Woverloaded-virtual]
> 
> Please add -Woverloaded-virtual and try again.
Done, fixed. Pushed to the same branch.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH 1/2] cmPropertyDefinition::IsChained is const

2012-02-28 Thread Yury G. Kudryashov
Brad King wrote:

> On 2/25/2012 3:19 AM, Yury G. Kudryashov wrote:
>> Yury G. Kudryashov wrote:
>>
>>> From: "Yury G. Kudryashov"
>>> 
>> Mailman says that the next patch is too big. The compressed version is
>> attached.
> 
> While building I get:
This branch compiles with -Werror here:
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git add-const-
qualifiers
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Two pull requests

2012-02-28 Thread Yury G. Kudryashov
Brad King wrote:

> On 2/28/2012 2:46 PM, Yury G. Kudryashov wrote:
>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git
>> ready/fix-typos
> 
> Please combine those commits and write a single commit message
> that briefly explains the tools you ran to find the errors.
I've also renamed branch.

git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git run-vim-
spellcheck

> 
>> Next, I fixed some doxygen formatting.
>> git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git ready/apidocs-
>> fixes
> 
> Please prefix the commit messages with "doxygen: " since all the
> changes are for Doxygen comment formatting.
Done, new branch:
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git doxygen-fixes
> 
>> The last commit in this branch replaces all '///!' by '///'. This can
>> potentially conflict with many topic branches. One of the ways to avoid
>> such conflicts is to run `sed -e 's,///!,///' -i *.h` in each branch that
>> conflicts with apidocs-fixes branch.
> 
> I'd rather make that as a sweeping change and then rebase active
> topics on it.  This is better done right after a release when
> there are no major topics underway.  Let's drop that commit
> for now.
OK, dropped.
> 
>> P.S.: Do you accept gitorious pull requests, or should I send e-mails
>> like this? I don't want to fill a bug report in mantis for each small
>> fix.
> 
> We accept any form of patch that comes in if it is easy to apply.
> Fetching real Git commits is a nice way to get them :)
It seems that merge requests are disabled in repository settings.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Two pull requests

2012-02-28 Thread Yury G. Kudryashov
Hi!

I've published two branches on gitorious.

First, I run spellcheck on some source files.
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git ready/fix-typos

Next, I fixed some doxygen formatting.
git pull git://gitorious.org/~urkud1/cmake/urkud-cmake.git ready/apidocs-
fixes

The last commit in this branch replaces all '///!' by '///'. This can 
potentially conflict with many topic branches. One of the ways to avoid such 
conflicts is to run `sed -e 's,///!,///' -i *.h` in each branch that 
conflicts with apidocs-fixes branch.

P.S.: Do you accept gitorious pull requests, or should I send e-mails like 
this? I don't want to fill a bug report in mantis for each small fix.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH 2/2] Remove cmProperty.{h,cxx}

2012-02-28 Thread Yury G. Kudryashov
David Cole wrote:

> What's the motivation here?
The motivation was to remove a class that has no useful methods. The only 
useful method was AppendProperty, and it can be easily implemented in 
cmPropertyMap.

> 
> This will likely conflict (logically, at compile time) with the
> recently merged-to-next topic for the target-include-directories...
I'd move AddStringToProperty to cmPropertyMap (say, 
cmPropertyMap::PrependProperty). I'll prepare a patch in a few days (rather 
busy now).
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH] Drop if(...) check because condition is always true

2012-02-25 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

GetLocation returns std::string::c_str() which is never NULL
---
 Source/cmLocalGenerator.cxx |8 ++--
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index ffbeb48..ea48dd1 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1903,12 +1903,8 @@ bool cmLocalGenerator::GetRealDependency(const char* 
inName,
   case cmTarget::MODULE_LIBRARY:
   case cmTarget::UNKNOWN_LIBRARY:
 {
-// Get the location of the target's output file and depend on it.
-if(const char* location = target->GetLocation(config))
-  {
-  dep = location;
-  return true;
-  }
+dep = target->GetLocation(config);
+return true;
 }
 break;
   case cmTarget::UTILITY:
-- 
1.7.8

--

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] [PATCH 1/2] cmPropertyDefinition::IsChained is const

2012-02-25 Thread Yury G. Kudryashov
Yury G. Kudryashov wrote:

> From: "Yury G. Kudryashov"
> 
Mailman says that the next patch is too big. The compressed version is 
attached.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

0002-Add-const-qualifier-to-some-cmCommand-members.patch.xz
Description: application/xz
--

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] [PATCH 1/2] cmPropertyDefinition::IsChained is const

2012-02-25 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 Source/cmPropertyDefinition.h |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h
index f68db87..58d1472 100644
--- a/Source/cmPropertyDefinition.h
+++ b/Source/cmPropertyDefinition.h
@@ -31,7 +31,7 @@ public:
   cmPropertyDefinition() { this->Chained = false; };
 
   // is it chained?
-  bool IsChained() {return this->Chained; };
+  bool IsChained() const { return this->Chained; };
 
   // Get the section if any
   const std::string &GetDocumentationSection() const {
-- 
1.7.8

--

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] [PATCH 2/2] Remove cmProperty.{h,cxx}

2012-02-25 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

After previous commit cmProperty.h contained only one enum. Move it to
cmPropertyMap.h.
---
 Source/CMakeLists.txt |2 --
 Source/cmDocumentation.h  |2 +-
 Source/cmProperty.h   |   21 -
 Source/cmPropertyDefinition.h |2 +-
 Source/cmPropertyMap.h|7 ++-
 bootstrap |1 -
 6 files changed, 8 insertions(+), 27 deletions(-)
 delete mode 100644 Source/cmProperty.cxx
 delete mode 100644 Source/cmProperty.h

diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 0c420b9..e8404ff 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -225,8 +225,6 @@ SET(SRCS
   cmPolicies.cxx
   cmProcessTools.cxx
   cmProcessTools.h
-  cmProperty.cxx
-  cmProperty.h
   cmPropertyDefinition.cxx
   cmPropertyDefinition.h
   cmPropertyDefinitionMap.cxx
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 11bef16..0bf3669 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -13,7 +13,7 @@
 #define _cmDocumentation_h
 
 #include "cmStandardIncludes.h"
-#include "cmProperty.h"
+#include "cmPropertyMap.h"
 #include "cmDocumentationFormatter.h"
 #include "cmDocumentationFormatterHTML.h"
 #include "cmDocumentationFormatterDocbook.h"
diff --git a/Source/cmProperty.cxx b/Source/cmProperty.cxx
deleted file mode 100644
index e69de29..000
diff --git a/Source/cmProperty.h b/Source/cmProperty.h
deleted file mode 100644
index a2b3219..000
--- a/Source/cmProperty.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
-  CMake - Cross Platform Makefile Generator
-  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-
-  Distributed under the OSI-approved BSD License (the "License");
-  see accompanying file Copyright.txt for details.
-
-  This software is distributed WITHOUT ANY WARRANTY; without even the
-  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  See the License for more information.
-*/
-#ifndef cmProperty_h
-#define cmProperty_h
-
-namespace cmProperty
-{
-  enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
-   TEST, VARIABLE, CACHED_VARIABLE };
-}
-
-#endif
diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h
index 898e13b..e1c2648 100644
--- a/Source/cmPropertyDefinition.h
+++ b/Source/cmPropertyDefinition.h
@@ -12,7 +12,7 @@
 #ifndef cmPropertyDefinition_h
 #define cmPropertyDefinition_h
 
-#include "cmProperty.h"
+#include "cmPropertyMap.h"
 #include "cmStandardIncludes.h"
 
 class cmPropertyDefinition 
diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h
index add5aad..9759a27 100644
--- a/Source/cmPropertyMap.h
+++ b/Source/cmPropertyMap.h
@@ -12,11 +12,16 @@
 #ifndef cmPropertyMap_h
 #define cmPropertyMap_h
 
-#include "cmProperty.h"
 #include "cmStandardIncludes.h"
 
 class cmake;
 
+namespace cmProperty
+{
+  enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
+   TEST, VARIABLE, CACHED_VARIABLE };
+}
+
 class cmPropertyMap : public std::map
 {
 public:
diff --git a/bootstrap b/bootstrap
index f5eacbd..327f6c8 100755
--- a/bootstrap
+++ b/bootstrap
@@ -188,7 +188,6 @@ CMAKE_CXX_SOURCES="\
   cmDocumentationFormatter \
   cmDocumentationFormatterText \
   cmPolicies \
-  cmProperty \
   cmPropertyMap \
   cmPropertyDefinition \
   cmPropertyDefinitionMap \
-- 
1.7.8

--

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] Remove cmProperty class

2012-02-25 Thread Yury G. Kudryashov
The cmProperty class is used only in cmPropertyMap, and it seems easier to
implement this logic in cmPropertyMap.

--

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] [PATCH 1/2] Drop cmProperty class

2012-02-25 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

This class contains nothing but name (already stored in cmPropertyMap key) and
value (string).
---
 Source/cmProperty.cxx |   40 
 Source/cmProperty.h   |   24 ++--
 Source/cmPropertyDefinition.h |1 +
 Source/cmPropertyMap.cxx  |   28 
 Source/cmPropertyMap.h|5 ++---
 Source/cmTestGenerator.cxx|2 +-
 6 files changed, 14 insertions(+), 86 deletions(-)

diff --git a/Source/cmProperty.cxx b/Source/cmProperty.cxx
index 3b37cf3..e69de29 100644
--- a/Source/cmProperty.cxx
+++ b/Source/cmProperty.cxx
@@ -1,40 +0,0 @@
-/*
-  CMake - Cross Platform Makefile Generator
-  Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
-
-  Distributed under the OSI-approved BSD License (the "License");
-  see accompanying file Copyright.txt for details.
-
-  This software is distributed WITHOUT ANY WARRANTY; without even the
-  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-  See the License for more information.
-*/
-#include "cmProperty.h"
-#include "cmSystemTools.h"
-
-void cmProperty::Set(const char *name, const char *value)
-{
-  this->Name = name;
-  this->Value = value;
-  this->ValueHasBeenSet = true;
-}
-
-void cmProperty::Append(const char *name, const char *value, bool asString)
-{
-  this->Name = name;
-  if(!this->Value.empty() && *value && !asString)
-{
-this->Value += ";";
-}
-  this->Value += value;
-  this->ValueHasBeenSet = true;
-}
-
-const char *cmProperty::GetValue() const
-{
-  if (this->ValueHasBeenSet)
-{
-return this->Value.c_str();
-}
-  return 0;
-}
diff --git a/Source/cmProperty.h b/Source/cmProperty.h
index e0fcd63..a2b3219 100644
--- a/Source/cmProperty.h
+++ b/Source/cmProperty.h
@@ -12,30 +12,10 @@
 #ifndef cmProperty_h
 #define cmProperty_h
 
-#include "cmStandardIncludes.h"
-
-class cmProperty 
+namespace cmProperty
 {
-public:
   enum ScopeType { TARGET, SOURCE_FILE, DIRECTORY, GLOBAL, CACHE,
TEST, VARIABLE, CACHED_VARIABLE };
-
-  // set this property
-  void Set(const char *name, const char *value);
-
-  // append to this property
-  void Append(const char *name, const char *value, bool asString = false);
-
-  // get the value
-  const char *GetValue() const;
-
-  // construct with the value not set
-  cmProperty() { this->ValueHasBeenSet = false; };
-
-protected:
-  std::string Name;
-  std::string Value;
-  bool ValueHasBeenSet;
-};
+}
 
 #endif
diff --git a/Source/cmPropertyDefinition.h b/Source/cmPropertyDefinition.h
index f68db87..898e13b 100644
--- a/Source/cmPropertyDefinition.h
+++ b/Source/cmPropertyDefinition.h
@@ -13,6 +13,7 @@
 #define cmPropertyDefinition_h
 
 #include "cmProperty.h"
+#include "cmStandardIncludes.h"
 
 class cmPropertyDefinition 
 {
diff --git a/Source/cmPropertyMap.cxx b/Source/cmPropertyMap.cxx
index a4d0bf3..74bbec6 100644
--- a/Source/cmPropertyMap.cxx
+++ b/Source/cmPropertyMap.cxx
@@ -13,21 +13,6 @@
 #include "cmSystemTools.h"
 #include "cmake.h"
 
-cmProperty *cmPropertyMap::GetOrCreateProperty(const char *name)
-{
-  cmPropertyMap::iterator it = this->find(name);
-  cmProperty *prop;
-  if (it == this->end())
-{
-prop = &(*this)[name];
-}
-  else
-{
-prop = &(it->second);
-}
-  return prop;
-}
-
 void cmPropertyMap::SetProperty(const char *name, const char *value,
 cmProperty::ScopeType scope)
 {
@@ -54,8 +39,7 @@ void cmPropertyMap::SetProperty(const char *name, const char 
*value,
   (void)scope;
 #endif
 
-  cmProperty *prop = this->GetOrCreateProperty(name);
-  prop->Set(name,value);
+  (*this)[name] = value;
 }
 
 void cmPropertyMap::AppendProperty(const char* name, const char* value,
@@ -80,8 +64,12 @@ void cmPropertyMap::AppendProperty(const char* name, const 
char* value,
   (void)scope;
 #endif
 
-  cmProperty *prop = this->GetOrCreateProperty(name);
-  prop->Append(name,value,asString);
+  cmStdString &old = (*this)[name];
+  if(!old.empty() && !asString)
+{
+old += ";";
+}
+  old += value;
 }
 
 const char *cmPropertyMap
@@ -118,6 +106,6 @@ const char *cmPropertyMap
   }
 return 0;
 }
-  return it->second.GetValue();
+  return it->second.c_str();
 }
 
diff --git a/Source/cmPropertyMap.h b/Source/cmPropertyMap.h
index 94275e2..add5aad 100644
--- a/Source/cmPropertyMap.h
+++ b/Source/cmPropertyMap.h
@@ -13,14 +13,13 @@
 #define cmPropertyMap_h
 
 #include "cmProperty.h"
+#include "cmStandardIncludes.h"
 
 class cmake;
 
-class cmPropertyMap : public std:

[cmake-developers] [PATCH] Fix typo in documentation

2012-02-24 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 Source/cmDocumentVariables.cxx |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Source/cmDocumentVariables.cxx b/Source/cmDocumentVariables.cxx
index 1cab2b5..366ebaa 100644
--- a/Source/cmDocumentVariables.cxx
+++ b/Source/cmDocumentVariables.cxx
@@ -895,7 +895,7 @@ void cmDocumentVariables::DefineVariables(cmake* cm)
 
   cm->DefineProperty
 ("BORLAND", cmProperty::VARIABLE,
- "True of the borland compiler is being used.",
+ "True if the borland compiler is being used.",
  "This is set to true if the Borland compiler is being used.",false,
  "Variables That Describe the System");
 
-- 
1.7.8

--

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] Coding style questions

2012-02-24 Thread Yury G. Kudryashov
Hi!

I have a few questions about cmake coding style:

1. Some classes/methods have doxygen comments, others haven't. Will you 
accept patches that add such comments?

2. The same about 'const' qualifiers on methods.

3. When do you use std::string vs char *?

3a. What is the difference between std::string and cmStdString?
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH] Remove unused file cmake.1

2012-02-24 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 cmake.1 |  112 ---
 1 files changed, 0 insertions(+), 112 deletions(-)
 delete mode 100644 cmake.1

diff --git a/cmake.1 b/cmake.1
deleted file mode 100644
index c7695b4..000
--- a/cmake.1
+++ /dev/null
@@ -1,112 +0,0 @@
-.\"  Hey, EMACS: -*- nroff -*-
-.\" First parameter, NAME, should be all caps
-.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
-.\" other parameters are allowed: see man(7), man(1)
-.TH CMAKE 1 "August 8, 2002"
-.\" Please adjust this date whenever revising the manpage.
-.\"
-.\" Some roff macros, for reference:
-.\" .nhdisable hyphenation
-.\" .hyenable hyphenation
-.\" .ad l  left justify
-.\" .ad b  justify to both left and right margins
-.\" .nfdisable filling
-.\" .fienable filling
-.\" .brinsert line break
-.\" .sp insert n+1 empty lines
-.\" for manpage-specific macros, see man(7)
-.SH NAME
-cmake \- Cross-platform Makefile generator.
-.SH SYNOPSIS
-.B cmake
-.RI < path-to-source > " " [ options ]
-.br
-.B ccmake
-.RI < path-to-source >
-.br
-.B ctest
-.RI [ -R " " < regex > ]
-.br
-.B cmaketest
-.RI < test-src-dir > " " < test-bin-dir > " " < test-executable >
-.SH DESCRIPTION
-
-This manual page documents briefly the \fBcmake\fP, \fBccmake\fP,
-\fBctest\fP and \fBcmaketest\fP commands.  It is not intended to aid
-authors of CMakeLists.txt files or to describe all advanced options
-available.  For full documentation, please visit
-\fBhttp://www.cmake.org\fP.
-
-.PP
-.\" TeX users may be more comfortable with the \fB\fP and
-.\" \fI\fP escape sequences to invode bold face and italics, 
-.\" respectively.
-
-CMake provides developers with a means of building their project on
-multiple platforms while writing only one build system configuration.
-The developer writes a set of CMakeLists.txt files that are read by
-CMake and used to generate a native build system for the current
-environment.  On unix platforms, Makefiles are generated.
-
-.PP
-
-\fBcmake\fP is used to generate the makefiles for a project from its
-source.  The first argument should specify a path to the source tree.
-The current directory will be used as the build tree for the project.
-Both in-source and out-of-source builds are supported, but
-out-of-source builds are preferred.  CMake provides functionality for
-tailoring the build to user preferences through settings in the cmake
-cache.  Options may be set interactively using the -i option (or
-\fBccmake\fP).  Once CMake has generated the makefiles in the build
-tree, one may use the standard \fBmake\fP tool to build the project.
-
-.PP
-
-\fBccmake\fP provides a curses interface front-end for \fBcmake\fP.
-The interface allows users to interactively configure the build
-options stored in the cmake cache.  This is the preferred interface
-for interactive builds.  Build scripts should use \fBcmake\fP
-directly.
-
-.PP
-
-\fBctest\fP runs tests found in the project's build tree after it has
-been compiled and displays a summary of test results.  Use the -R
-option to specify a regular expression of test names to match.
-
-\fBcmaketest\fP is provided to simplify project testing scripts.  It
-allows a CMake project to be compiled and tested from a single command
-line.
-
-.SH OPTIONS
-
-.TP
-.B \-\-help
-Available for \fBcmake\fP , \fBccmake\fP and \fBcmaketest\fP.
-.br
-Show version number and summary of options.
-
-.TP
-.B -R regex
-Available for \fBctest\fP.
-.br
-Run only tests matching the given regular expression.
-
-.TP
-.B -i
-Available for \fBcmake\fP.
-.br
-Run cmake in an interactive wizard mode to configure the build.
-
-.SH SEE ALSO
-.BR Dart (1),
-.BR VTK (1).
-
-.SH MAILING LIST
-For help using cmake, a mailing list is provided at
-\fbcm...@www.cmake.org\fP.  Please first read the full documentation
-at \fBhttp://www.cmake.org\fP before posting questions to the list.
-
-.SH AUTHOR
-This manual page was written by CMake authors at Kitware
-.
-- 
1.7.8

--

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] [PATCH] CMakeFindPackageMode.cmake: fix 32/64bit detection if `file' is a symlink

2012-02-23 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

---
 Modules/CMakeFindPackageMode.cmake |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Modules/CMakeFindPackageMode.cmake 
b/Modules/CMakeFindPackageMode.cmake
index 4296577..bcf3014 100644
--- a/Modules/CMakeFindPackageMode.cmake
+++ b/Modules/CMakeFindPackageMode.cmake
@@ -71,7 +71,8 @@ if(UNIX)
   # use the file utility to check whether itself is 64 bit:
   find_program(FILE_EXECUTABLE file)
   if(FILE_EXECUTABLE)
-execute_process(COMMAND "${FILE_EXECUTABLE}" "${FILE_EXECUTABLE}" 
OUTPUT_VARIABLE fileOutput ERROR_QUIET)
+get_filename_component(FILE_ABSPATH "${FILE_EXECUTABLE}" ABSOLUTE 
CACHE)
+execute_process(COMMAND "${FILE_ABSPATH}" "${FILE_ABSPATH}" 
OUTPUT_VARIABLE fileOutput ERROR_QUIET)
 if("${fileOutput}" MATCHES "64-bit")
   set(CMAKE_SIZEOF_VOID_P 8)
 endif()
-- 
1.7.8

--

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] Making Config.cmake files easier to write

2012-02-17 Thread Yury G. Kudryashov
Eric Noulard wrote:

> 2012/2/17 Alexander Neundorf :
>> We discussed that too already.
> 
> Sorry, I surely missed this part if the discussion,
> next time don't bother re-explaining me I'll go and dig the ML.
A digest of the old discussion.

The only non-bloated version of "do all the cmake-config magic" command I 
see is write_basic_config_file_for_export(MyExport). This would require some 
changes on C++ side (i.e., make it possible to query MyExport DESTINTATION, 
NAMESPACE, list of targets etc.). And this will work only for simple cases 
(e.g., a few libraries/executables with simple version logic).
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Making Config.cmake files easier to write

2012-02-14 Thread Yury G. Kudryashov
Alexander Neundorf wrote:

> On Tuesday 14 February 2012, Brad King wrote:
> Alternatively, Yuri suggested this in a thread on kde-buildsystem, there
> could be a macro which completely generates the Config.cmake file.
> This would get rid of a bunch of problems, like having to write
> complicated code in the Config.cmake file, but OTOH it would have to take
> quite a lot of parameters, e.g. how it should set up the LIBRARY variables
> from the exported targets, in which namespace they have been exported,
> etc.
> 
> This would be a quite big macro.
Now I think that it would require a lot of code for no real gain.

A "simple" API would be "write me a basic Config.cmake file for this export 
set" but this would require a few changes in C++ code (i.e., turn export set 
into an object with properties like DESTINATION, FILE, NAMESPACE, TARGETS).
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Making Config.cmake files easier to write

2012-02-14 Thread Yury G. Kudryashov
Alexander Neundorf wrote:

> On Tuesday 14 February 2012, Yury G. Kudryashov wrote:
>> will substitute @PACKAGE_INCLUDE_INSTALL_DIR@ by "../../../include" and
>> @PACKAGE_MYPKGDATA_INSTALL_DIR@ by "../../../share/mypkg" (both
>> transformed to be relative to DESTINATION).
> 
> A problem I see here (and which we discussed already before on kde-
> buildsystem) is the handling of the install() command.
> 
> I thought a bit about a syntax like this, which I would like:
> 
> configure_config_file(BarConfig.cmake.in BarConfig.cmake
>   INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_DIR}
>   PATH_VARS INCLUDE_INSTALL_DIR DATA_INSTALL_DIR
>   EXPORT_FILE BarExport.cmake)
Why do you need EXPORT_FILE parameter? How can you use it? Include 
automatically? Then you need VERSION_FILE parameter as well.

> 
> but this can't work, can it ?
> 
> In the BarConfig.cmake file there would still be either a
> 
> set(BAR_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@")
> which would work for absolute paths, or a
> 
> set(BAR_INCLUDE_DIR "${SomePrefix}/@INCLUDE_INSTALL_DIR@")
> which would work only for relative paths, but a simple set() cannot work
> for both cases. Am I missing something ?
You'll have in BarConfig.cmake.in
set(BAR_INCLUDE_DIR "@PACKAGE_HELPER_INCLUDE_INSTALL_DIR@)

After configure_config_file() you'll have
# At top
get_filename_component(_PKG_CURRENT_DIR "${CURRENT_LIST_FILE}" PATH)
get_filename_component(_PKG_PREFIX_PATH "${_PKG_CURRENT_DIR}/../../.." 
ABSOLUTE)

#in place of your set()
set(BAR_INCLUDE_DIR "${_PKG_PREFIX_PATH}/include")
> 
> Do you have a working example ?
Not yet. I think about something like this (not tested).

  foreach(var ${PACAKGE_HELPER_PATH_VARS})
if(NOT DEFINED ${var})
  message(FATAL_ERROR ...)
else if(IS_ABSOLUTE ${${var}})
  file(RELATIVE_PATH PACKAGE_HELPER_${var} ${CMAKE_INSTALL_PREFIX} 
${${var}})
    else()
  set(PACKAGE_HELPER_${var} ${${var}})
endif()
  endforeach()

It would be nice to make those PACKAGE_HELPER_* vars local to 
configure_config_file() function.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] Making Config.cmake files easier to write

2012-02-14 Thread Yury G. Kudryashov
Brad King wrote:

> On 2/13/2012 4:52 PM, Alexander Neundorf wrote:
>> we are hoping that more and more libraries will install Config.cmake
>> files (and for kdelibs this is actually happening right now), so we
>> should make sure it is straighforward to create proper Config.cmake
>> files.
> 
> This is a worthwhile goal, but I do not like the approach proposed:
> 
> (1) It makes BarConfig.cmake depend on a file not distributed with it.
> 
> (2) The content of a relocatable BarConfig.cmake should not depend on
> where it happened to be installed when the package was built.
> 
> I'd rather see an approach that processes paths during configuration
> of the original package.  Provide some helper macros that can configure
> BarConfig.cmake with the proper code in it to compute paths relative
> to its location:
> 
>   include(CMakePackageConfigHelper)
>   cmake_package_config_for_install(Bar
> DESTINATION lib/cmake/Bar # install destination
> # INPUT BarConfig-install.cmake.in # alternate input
> )
> 
> This would look for "BarConfig.cmake.in" (or whatever INPUT says) and
> do configure_file along with install(FILES).  The module can document
> some standard @CONFIG@ variables that can be used inside the input
> file to get various paths:
> 
>   $ cat BarConfig.cmake.in
>   @PACKAGE_INIT@
>   set(BAR_INCLUDE_DIRS "@PACKAGE_PREFIX@/include/bar")
Another way to achieve the same result:

set(INCLUDE_INSTALL_DIR "include") # relative
set(MYPKGDATA_INSTALL_DIR ${CMAKE_PREFIX_PATH}/share/mypkg) # absolute

cmake_package_config_for_install(Bar
  DESTINATION lib/cmake/Bar
  INPUT BarConfig-install.cmake.in
  PATH_VARS
INCLUDE_INSTALL_DIR   # interpreted as relative to install prefix
MYPKGDATA_INSTALL_DIR # absolute
  )

will substitute @PACKAGE_INCLUDE_INSTALL_DIR@ by "../../../include" and 
@PACKAGE_MYPKGDATA_INSTALL_DIR@ by "../../../share/mypkg" (both transformed 
to be relative to DESTINATION).

The main advantage of this solution is that the relative path is calculated 
only once (when package is installed), not every time Config.cmake file is 
sourced. The main drawback is that one has to specify all required path 
variables explicitly.
-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH] FindPackageHandleStandardArgs: fix documentation

2012-01-20 Thread Yury G. Kudryashov
Brad King wrote:

> On 1/19/2012 2:41 PM, Yury G. Kudryashov wrote:
>> State explicitly what CONFIG_MODE argument does.
> [snip]
>> -# a find_package(... NO_MODULE) call, in this case all the information
>> -# provided by the config-mode of find_package() will be evaluated
>> -# automatically.
>> +# a find_package(... NO_MODULE) call, in this VERSION_VAR will be set to
>> +# NAME_VERSION and the macro will automatically check whether the Config
>> module +# was found.
> 
> I do not think that explanation is correct.  The find_package command
> in Config mode will set everything as needed.
Yes, so the old explanation is incorrect.
> The role of the CONFIG_MODE
> option is to produce a nice error message when the package is not found.
I've searched FPHSA.cmake for CONFIG_MODE, and found the following code 
snippets:

  IF(FPHSA_CONFIG_MODE)
LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG)
LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS)
SET(FPHSA_VERSION_VAR ${_NAME}_VERSION)
  ENDIF(FPHSA_CONFIG_MODE)
This code sets VERSION_VAR and requires ${_NAME}_CONFIG to be set.

IF(FPHSA_CONFIG_MODE)
  _FPHSA_HANDLE_FAILURE_CONFIG_MODE()
ELSE(FPHSA_CONFIG_MODE)
This code and the macro called from this code generates a nice error 
message.
> 
> Alex, as the author of the behavior can you suggest clearer wording?

-- 
Yury G. Kudryashov,
mailto: ur...@mccme.ru

--

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] [PATCH] FindPackageHandleStandardArgs: fix documentation

2012-01-19 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

State explicitly what CONFIG_MODE argument does.
---
 Modules/FindPackageHandleStandardArgs.cmake |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Modules/FindPackageHandleStandardArgs.cmake 
b/Modules/FindPackageHandleStandardArgs.cmake
index 1acb021..295d789 100644
--- a/Modules/FindPackageHandleStandardArgs.cmake
+++ b/Modules/FindPackageHandleStandardArgs.cmake
@@ -33,9 +33,9 @@
 # messages include information about the required version and the version
 # which has been actually found, both if the version is ok or not.
 # Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for
-# a find_package(... NO_MODULE) call, in this case all the information
-# provided by the config-mode of find_package() will be evaluated
-# automatically.
+# a find_package(... NO_MODULE) call, in this VERSION_VAR will be set to
+# NAME_VERSION and the macro will automatically check whether the Config module
+# was found.
 # Via FAIL_MESSAGE a custom failure message can be specified, if this is not
 # used, the default message will be displayed.
 #
-- 
1.7.8

--

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] [PATCH] FindPkgConfig: respect REQUIRED

2012-01-19 Thread Yury G. Kudryashov
find_package(PkgConfig REQUIRED) now fails if pkg-config is not installed
Bug 12620

---
 Modules/FindPkgConfig.cmake |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/Modules/FindPkgConfig.cmake b/Modules/FindPkgConfig.cmake
index c47f583..ce58899 100644
--- a/Modules/FindPkgConfig.cmake
+++ b/Modules/FindPkgConfig.cmake
@@ -85,14 +85,12 @@
 
 ### Common stuff 
 set(PKG_CONFIG_VERSION 1)
-set(PKG_CONFIG_FOUND   0)
 
 find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config 
executable")
 mark_as_advanced(PKG_CONFIG_EXECUTABLE)
 
-if(PKG_CONFIG_EXECUTABLE)
-  set(PKG_CONFIG_FOUND 1)
-endif(PKG_CONFIG_EXECUTABLE)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+find_package_handle_standard_args(PkgConfig DEFAULT_MSG PKG_CONFIG_EXECUTABLE)
 
 
 # Unsets the given variables
-- 
tg: (f2baff9..) t/pkg-config-required (depends on: master)
--

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] [PATCH] Remove duplicated sentense from docs

2012-01-17 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

install(TARGETS ...) documentation described twice what happens on non-DLL
systems.
---
 Source/cmInstallCommand.h |4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/Source/cmInstallCommand.h b/Source/cmInstallCommand.h
index 8f62322..377b43a 100644
--- a/Source/cmInstallCommand.h
+++ b/Source/cmInstallCommand.h
@@ -168,9 +168,7 @@ public:
   "On non-DLL platforms mySharedLib will be installed to /lib "
   "and /some/full/path.  On DLL platforms the mySharedLib DLL will be "
   "installed to /bin and /some/full/path and its import library "
-  "will be installed to /lib/static and /some/full/path. "
-  "On non-DLL platforms mySharedLib will be installed to /lib "
-  "and /some/full/path."
+  "will be installed to /lib/static and /some/full/path."
   "\n"
   "The EXPORT option associates the installed target files with an "
   "export called .  "
-- 
1.7.8

--

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] [PATCH] Fix indentation error in cmInstallCommand.cxx

2012-01-17 Thread Yury G. Kudryashov
From: "Yury G. Kudryashov" 

A large block of code was indented 2 spaces less than it should.
---
 Source/cmInstallCommand.cxx |  156 +-
 1 files changed, 78 insertions(+), 78 deletions(-)

diff --git a/Source/cmInstallCommand.cxx b/Source/cmInstallCommand.cxx
index 14deb24..3951f7d 100644
--- a/Source/cmInstallCommand.cxx
+++ b/Source/cmInstallCommand.cxx
@@ -602,98 +602,98 @@ bool 
cmInstallCommand::HandleTargetsMode(std::vector const& args)
 break;
   }
 
-  // These well-known sets of files are installed *automatically* for FRAMEWORK
-  // SHARED library targets on the Mac as part of installing the FRAMEWORK.
-  // For other target types or on other platforms, they are not installed
-  // automatically and so we need to create install files generators for them.
-  //
-  bool createInstallGeneratorsForTargetFileSets = true;
-
-  if(target.IsFrameworkOnApple())
-{
-createInstallGeneratorsForTargetFileSets = false;
-}
-
-  if(createInstallGeneratorsForTargetFileSets && !namelinkOnly)
-{
-const char* files = target.GetProperty("PRIVATE_HEADER");
-if ((files) && (*files))
+// These well-known sets of files are installed *automatically* for 
FRAMEWORK
+// SHARED library targets on the Mac as part of installing the FRAMEWORK.
+// For other target types or on other platforms, they are not installed
+// automatically and so we need to create install files generators for 
them.
+//
+bool createInstallGeneratorsForTargetFileSets = true;
+
+if(target.IsFrameworkOnApple())
   {
-  std::vector relFiles;
-  cmSystemTools::ExpandListArgument(files, relFiles);
-  std::vector absFiles;
-  if (!this->MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles))
-{
-return false;
-}
-
-  // Create the files install generator.
-  if (!privateHeaderArgs.GetDestination().empty())
-{
-privateHeaderGenerator = CreateInstallFilesGenerator(absFiles, 
- privateHeaderArgs, false);
-}
-  else
-{
-cmOStringStream e;
-e << "INSTALL TARGETS - target " << target.GetName() << " has "
-  << "PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION.";
-cmSystemTools::Message(e.str().c_str(), "Warning");
-}
+  createInstallGeneratorsForTargetFileSets = false;
   }
 
-files = target.GetProperty("PUBLIC_HEADER");
-if ((files) && (*files))
+if(createInstallGeneratorsForTargetFileSets && !namelinkOnly)
   {
-  std::vector relFiles;
-  cmSystemTools::ExpandListArgument(files, relFiles);
-  std::vector absFiles;
-  if (!this->MakeFilesFullPath("PUBLIC_HEADER", relFiles, absFiles))
+  const char* files = target.GetProperty("PRIVATE_HEADER");
+  if ((files) && (*files))
 {
-return false;
-}
+std::vector relFiles;
+cmSystemTools::ExpandListArgument(files, relFiles);
+std::vector absFiles;
+if (!this->MakeFilesFullPath("PRIVATE_HEADER", relFiles, absFiles))
+  {
+  return false;
+  }
 
-  // Create the files install generator.
-  if (!publicHeaderArgs.GetDestination().empty())
-{
-publicHeaderGenerator = CreateInstallFilesGenerator(absFiles, 
-  publicHeaderArgs, false);
-}
-  else
-{
-cmOStringStream e;
-e << "INSTALL TARGETS - target " << target.GetName() << " has "
-  << "PUBLIC_HEADER files but no PUBLIC_HEADER DESTINATION.";
-cmSystemTools::Message(e.str().c_str(), "Warning");
+// Create the files install generator.
+if (!privateHeaderArgs.GetDestination().empty())
+  {
+  privateHeaderGenerator = CreateInstallFilesGenerator(absFiles,
+  privateHeaderArgs, 
false);
+  }
+else
+  {
+  cmOStringStream e;
+  e << "INSTALL TARGETS - target " << target.GetName() << " has "
+<< "PRIVATE_HEADER files but no PRIVATE_HEADER DESTINATION.";
+  cmSystemTools::Message(e.str().c_str(), "Warning");
+  }
 }
-  }
 
-files = target.GetProperty("RESOURCE");
-if ((files) && (*files))
-  {
-  std::vector relFiles;
-  cmSystemTools::ExpandListArgument(files, relFiles);
-  std::vector absFiles;
-  if (!this->MakeFilesFullPath("RESOURCE", relFiles, absFiles))
+  files = target.GetProperty("PUBLIC_HEADER&q