Re: [CMake] Broken Cmake Behavior using --build VS2010

2011-12-17 Thread J Decker
Ya know... that's good and all, and I suppose 'proper' design accounts
for this, but there are several directories that have multiple targets
because they don't really merit a subdirectory; the code is less than
200 lines, and simple build with all the base rules yes, I could
make subdirectories and put the cmakes there - was doing that for a
while when I first learned the difficulties with mutiple projects per
file; but after learning that add_subdirectory projects didn't affect
the outer project which picked the solution name they got to have a
single project make many simple targets; and I don't think that having
mutiple targets to a single project is very elegant when outputting to
project based generators...



On Thu, Dec 15, 2011 at 12:10 AM, Rolf Eike Beer e...@sf-mail.de wrote:
 This is because we should really only allow one project command per
 CMakeLists.txt file, but since we do not error out, it's difficult to
 change at this point in time...

 --build uses the CMAKE_PROJECT_NAME cache variable to decide what sln file
 to use, and that corresponds to the first project command.

 Do you need multiple project commands in your CMakeLists.txt file?

 What benefit do you get from it?

 I'd like to understand how people are using multiple project commands, so
 we can fix this the right way.

 At my last employer we used multiple projects, too. But every
 CMakeLists.txt had at most one project(). We had a large number of
 libraries that had many dependencies regarding their include directories
 and so on. Also they could be used to build different parts of the
 software more or less standalone.

 So what we did was to use the add_subdirectory_once() macro I posted here
 a few time which does what add_subdirectory() does but will just do
 nothing if the given directory is already part of the build.

 And later we did things like
 include_directories(${LIB1_SOURCE_DIR}/include) to easily get the includes
 without too much relative paths.

 Eike
 --

 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
--

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


Re: [CMake] How to add modifiers to functions

2011-12-17 Thread Eric Noulard
2011/12/17 Renato Utsch renatout...@gmail.com:
 Doing this checking of in-source and out-of-source is easy!

 if( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )
    message( FATAL_ERROR
          Do not make an in-source build with this project.
    )
 endif( ${CMAKE_BINARY_DIR} STREQUAL ${CMAKE_SOURCE_DIR} )

Yes it is but it doesn't prevent your source tree to be cluttered with
CMakeCache.txt
etc...

Thus the next try to build out-of-source will in fact try an in-source build,
which usually puzzles the average user.

You'll have to remove CMakeCache.txt from the source tree in order to make
things work as you want again.

Try yourself and read the previously mentioned bug report,
you'll see what I mean.


 Ok, I will look the CMakeParseArguments module... thanks!

Please do not drop the ML address

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


[CMake] Change cpack install folder

2011-12-17 Thread Totte Karlsson

Hi,
How can I get my nsis installer to install my distribution to c:\myPackageName 
instead of C:\Program Files\myPackageName ?


My installation  is a library with headers and I don't it to be installed in 
Program Files folder. Is there a straightforward fix.


Thanks,
Totte
--

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


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 Totte Karlsson to...@dunescientific.com:
 Hi,
 How can I get my nsis installer to install my distribution to
 c:\myPackageName instead of C:\Program Files\myPackageName ?

 My installation  is a library with headers and I don't it to be installed
 in Program Files folder. Is there a straightforward fix.

NSIS installer does offer you the choice during installation right?
1) Do you want to provide an alternate default choice?
or
2) Do you want an NSIS command line?

for 2) it should already work:
http://www.kitware.com/blog/home/post/186

for 1) Normally you should set
CPACK_PACKAGING_INSTALL_PREFIX
and/or CPACK_PACKAGE_INSTALL_DIRECTORY

but do not know whether if NSIS honors those two vars.
-- 
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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Change cpack install folder

2011-12-17 Thread Totte Karlsson



How can I get my nsis installer to install my distribution to
c:\myPackageName instead of C:\Program Files\myPackageName ?


NSIS installer does offer you the choice during installation right?

Yes.


1) Do you want to provide an alternate default choice?

Thats it.



for 1) Normally you should set
CPACK_PACKAGING_INSTALL_PREFIX
and/or CPACK_PACKAGE_INSTALL_DIRECTORY


I tried setting
set(CPACK_PACKAGING_INSTALL_PREFIX  C:\\)
but gets errors.
I also tried
set(CPACK_PACKAGING_INSTALL_PREFIX  C:)
and that removed the errors. However, the installer still  first points to 
C:\\Program Files\\



but do not know whether if NSIS honors those two vars.

Seem not. :(

But I found this NSIS specific setting
CPACK_NSIS_INSTALL_ROOT
But setting that as C:\\ still create the error: Function missing ending ) .

Not sure how to get this one right..

-totte
--

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


Re: [CMake] Broken Cmake Behavior using --build VS2010

2011-12-17 Thread David Cole
On Sat, Dec 17, 2011 at 5:00 AM, J Decker d3c...@gmail.com wrote:
 Ya know... that's good and all, and I suppose 'proper' design accounts
 for this, but there are several directories that have multiple targets
 because they don't really merit a subdirectory; the code is less than
 200 lines, and simple build with all the base rules yes, I could
 make subdirectories and put the cmakes there - was doing that for a
 while when I first learned the difficulties with mutiple projects per
 file; but after learning that add_subdirectory projects didn't affect
 the outer project which picked the solution name they got to have a
 single project make many simple targets; and I don't think that having
 mutiple targets to a single project is very elegant when outputting to
 project based generators...



 On Thu, Dec 15, 2011 at 12:10 AM, Rolf Eike Beer e...@sf-mail.de wrote:
 This is because we should really only allow one project command per
 CMakeLists.txt file, but since we do not error out, it's difficult to
 change at this point in time...

 --build uses the CMAKE_PROJECT_NAME cache variable to decide what sln file
 to use, and that corresponds to the first project command.

 Do you need multiple project commands in your CMakeLists.txt file?

 What benefit do you get from it?

 I'd like to understand how people are using multiple project commands, so
 we can fix this the right way.

 At my last employer we used multiple projects, too. But every
 CMakeLists.txt had at most one project(). We had a large number of
 libraries that had many dependencies regarding their include directories
 and so on. Also they could be used to build different parts of the
 software more or less standalone.

 So what we did was to use the add_subdirectory_once() macro I posted here
 a few time which does what add_subdirectory() does but will just do
 nothing if the given directory is already part of the build.

 And later we did things like
 include_directories(${LIB1_SOURCE_DIR}/include) to easily get the includes
 without too much relative paths.

 Eike
 --

 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
 --

 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


Bill committed a fix for this yesterday, including a two project
commands in a single CMakeLists file test. Today, the test passes on
all of our dashboard runs submitted so far:

  
http://www.cdash.org/CDash/testSummary.php?project=1name=CMakeDoubleProjectdate=2011-12-17

See these commits for the fix and the test:

  
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecf0e06b61327af4be5005281a6a92f9ac6de466
  
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7523858fdf497a9bc9193b7df5404679fb6008bf

Give the nightly build, or the 'next' branch a try. This should now be
fixed without having any negative side effects.

(Strictly speaking, we did change the behavior, but we don't believe
it should affect anybody other than fixing the negative that cmake
--build didn't work for such projects... The old behavior was to cache
the very first project command's name in the CMAKE_PROJECT_NAME cache
entry. Now we cache the name of the *last* project command in the
top-level CMakeLists file.)

Let us know how it works for you.


Thanks,
David
--

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


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

set(CPACK_NSIS_INSTALL_ROOT C:)

should work.

It is awkward but since the template contains:

InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

you cannot remove middle \, thus the unexpected C: (not back
slashes whatsoever)


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


Re: [CMake] Change cpack install folder

2011-12-17 Thread David Cole
On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


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

I disagree that C: is awkward compared to C:\\ -- it follows the
unwritten rule of thou shalt never end a directory name with a
trailing slash when using it as a variable value when the variable is
meant to be composed into a longer full path name.

(But I understand why you say it's awkward...)

That variable was added as a bug fix in this commit last January:

  
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.


HTH,
David
--

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


Re: [CMake] Change cpack install folder

2011-12-17 Thread Eric Noulard
2011/12/17 David Cole david.c...@kitware.com:
 On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


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

 I disagree that C: is awkward compared to C:\\ -- it follows the
 unwritten rule of thou shalt never end a directory name with a
 trailing slash when using it as a variable value when the variable is
 meant to be composed into a longer full path name.

 (But I understand why you say it's awkward...)

 That variable was added as a bug fix in this commit last January:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

 CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.

Too bad one did not use CPACK_PACKAGING_INSTALL_PREFIX...
they look like both have the same meaning.


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


Re: [CMake] Change cpack install folder

2011-12-17 Thread David Cole
On Sat, Dec 17, 2011 at 1:48 PM, Eric Noulard eric.noul...@gmail.com wrote:
 2011/12/17 David Cole david.c...@kitware.com:
 On Sat, Dec 17, 2011 at 12:32 PM, Eric Noulard eric.noul...@gmail.com 
 wrote:
 2011/12/17 Totte Karlsson to...@dunescientific.com:

 But I found this NSIS specific setting
 CPACK_NSIS_INSTALL_ROOT
 But setting that as C:\\ still create the error: Function missing ending
 ) .

 Not sure how to get this one right..

 set(CPACK_NSIS_INSTALL_ROOT C:)

 should work.

 It is awkward but since the template contains:

 InstallDir @CPACK_NSIS_INSTALL_ROOT@\@CPACK_PACKAGE_INSTALL_DIRECTORY@

 you cannot remove middle \, thus the unexpected C: (not back
 slashes whatsoever)


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

 I disagree that C: is awkward compared to C:\\ -- it follows the
 unwritten rule of thou shalt never end a directory name with a
 trailing slash when using it as a variable value when the variable is
 meant to be composed into a longer full path name.

 (But I understand why you say it's awkward...)

 That variable was added as a bug fix in this commit last January:

  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5a9e8e701e6e55ddacbc465f4bfb0da3d028ccb0

 CPACK_NSIS_INSTALL_ROOT is available in CPack 2.8.4 and later.

 Too bad one did not use CPACK_PACKAGING_INSTALL_PREFIX...
 they look like both have the same meaning.


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

Their meaning is similar, but subtly different, I think.

CPack uses the value of CPACK_PACKAGING_INSTALL_PREFIX as the prefix
of its own make install tree of your project that it uses in its
build tree as it's assembling the tree that gets passed as input to
the native packaging tool. That prefix does not necessarily have
anything to do with the default value that an end user installer
program displays to the end user about where to install a program by
default.

I suppose they *could* be the same values, but I think it's a good
thing to have separate variables for each concept.

CPACK_PACKAGING_INSTALL_PREFIX is used internally by CPack generators
and may (or may not) be used to set values that get communicated to
the end user.

CPACK_NSIS_INSTALL_ROOT is used only for the NSIS packager, and only
to change the root of the default suggestion from Program Files to
something else.


David
--

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-417-g84094cd

2011-12-17 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  84094cd155d415930631636e6c4c4822a861fd21 (commit)
  from  61da11ecd74461da6edb551d87e29d653df147ad (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=84094cd155d415930631636e6c4c4822a861fd21
commit 84094cd155d415930631636e6c4c4822a861fd21
Author: KWSys Robot kwro...@kitware.com
AuthorDate: Sun Dec 18 00:05:03 2011 -0500
Commit: KWSys Robot kwro...@kitware.com
CommitDate: Sun Dec 18 00:05:03 2011 -0500

KWSys Nightly Date Stamp

diff --git a/Source/kwsys/kwsysDateStamp.cmake 
b/Source/kwsys/kwsysDateStamp.cmake
index 86ad9b7..b66b239 100644
--- a/Source/kwsys/kwsysDateStamp.cmake
+++ b/Source/kwsys/kwsysDateStamp.cmake
@@ -18,4 +18,4 @@ SET(KWSYS_DATE_STAMP_YEAR  2011)
 SET(KWSYS_DATE_STAMP_MONTH 12)
 
 # KWSys version date day component.  Format is DD.
-SET(KWSYS_DATE_STAMP_DAY   17)
+SET(KWSYS_DATE_STAMP_DAY   18)

---

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