Re: [CMake] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini

Hi Marcel,

Yes, you are right but as I said to Ryan my problem is that I do not 
want to change the compiler flags for the whole library (in that case 
the set_target_properties would be the appropriated way to do) but only 
for a few files of my library.


What I want to do seems tricky (or perhaps non sense ?). What about the 
following approach ?


I will create two separate projects that I will call in my main 
CMakeLists.txt on the following way:


project(my_whole_project Fortran)

include(my_first_project)
include(my_second_project)

...

In doing so, each project does not see the other one (I hope) and I 
should be able to do whatever I want with one without disturbing

the other. What do you think ?.

Eric


Marcel Loose a écrit :

Hi Eric,

I'm not sure your solution is going to work. Once your file1, file2, ...
are compiled for building my_lib1, there's reason for CMake to compile
them again for my_lib2, because the object files are already up-to-date.
I guess you'll have a better chance using target_properties, as Ryan
suggested.

HTH,
Marcel Loose.

On Fri, 2010-10-01 at 17:10 +0200, pellegrini wrote:
  

Hi Ryan,

Yes, that might be the solution if I wanted to change the compiler flags 
for the whole library but in my case, that is not on the whole
library that I want to apply a new set of compiler flags but only on a 
small number of files.


Ryan Pavlik a écrit :


 Look at the target properties instead of the source file properties.

Ryan

On 10/01/2010 08:27 AM, pellegrini wrote:
  

Hello everybody,

I would like to build two libraries that contain the same files but 
with a slightly different set of compilation flags
from one library to another. This within the same makefile. I was 
thinking about an approach such as:


add_library(my_lib1, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)

add_library(my_lib2, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)


does cmake sensitive to the order of these instruction ?

thank you very much

Eric







  



--
Eric Pellegrini
Calcul Scientifique
Insitut Laue-Langevin
Grenoble, France

___
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] Stopping the VS build when configure fails

2010-10-01 Thread James Bigler
On Fri, Oct 1, 2010 at 6:22 AM, John Drescher  wrote:

> On Fri, Oct 1, 2010 at 2:21 AM, Rolf Eike Beer  wrote:
> > Am Friday 01 October 2010 schrieb John Drescher:
> >> On Thu, Sep 30, 2010 at 7:47 PM, James Bigler 
> wrote:
> >> > On Thu, Sep 30, 2010 at 5:42 PM, James Bigler 
> > wrote:
> >> >> I'm currently using VS 2008 64 bit with CMake 2.6.3.
> >> >
> >> > This also happens with 2.8.3 RC1.
> >>
> >> That is good. I would be worried if it did not. The error means a file
> >> (traversal.c) is missing in your source or at least not in the folder
> >> that CMake is expecting.
> >
> > As you can see from James' log CMake did in fact _not_ stop the build but
> > continued building even if there was an error in generating. And: yes, I
> have
> > seen MSVC builds e.g. running through "INSTALL" even if one of the
> projects
> > before failed to build.
> >
> Sorry. You are correct. I have never seen this. However I believe the
> op is doing a build directly from cmake which I never do.
>
> John
>
>
I just hit "Build Solution" which caused ZERO_CHECK project to run because
my CMakeLists.txt file had changed.  ZERO_CHECK ran CMake which attempted to
generate a new solution.  Typically this results in a good new project and
the VS plugin detects this and asks me to load the new project files.
However in this case, the new project files could not be generated due to
the error.  For whatever reason VS keeps going even though the ZERO_CHECK
target failed.

James
___
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] Build several libraries with different compilation flags

2010-10-01 Thread Michael Hertling
On 10/01/2010 05:10 PM, pellegrini wrote:
> Hi Ryan,
> 
> Yes, that might be the solution if I wanted to change the compiler flags 
> for the whole library but in my case, that is not on the whole
> library that I want to apply a new set of compiler flags but only on a 
> small number of files.

You could use symbolic links in junction with source properties:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(SYMLINKSOURCE C)
FILE(WRITE ${CMAKE_BINARY_DIR}/f1.c "void f(void){}\n")
ADD_LIBRARY(l1 SHARED f1.c)
ADD_CUSTOM_COMMAND(OUTPUT f2.c
  COMMAND ${CMAKE_COMMAND} -E create_symlink f1.c f2.c)
SET_SOURCE_FILES_PROPERTIES(f2.c PROPERTIES COMPILE_FLAGS "-O0")
ADD_LIBRARY(l2 SHARED f2.c)

So, the l{1,2} targets are compiled from the same source but with
different flags, and the latters can be specified per source file.

Regards,

Michael

> Ryan Pavlik a écrit :
>>  Look at the target properties instead of the source file properties.
>>
>> Ryan
>>
>> On 10/01/2010 08:27 AM, pellegrini wrote:
>>> Hello everybody,
>>>
>>> I would like to build two libraries that contain the same files but 
>>> with a slightly different set of compilation flags
>>> from one library to another. This within the same makefile. I was 
>>> thinking about an approach such as:
>>>
>>> add_library(my_lib1, STATIC, src_files ...)
>>> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
>>> ...)
>>> add_library(my_lib2, STATIC, src_files ...)
>>> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
>>> ...)
>>>
>>> does cmake sensitive to the order of these instruction ?
>>>
>>> thank you very much
>>>
>>> Eric
___
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] CMake/Buildbot xplat upload?

2010-10-01 Thread Eric Noulard
2010/10/1  :
>
> Hi list,
>
> I Googled for this but didn't find anything.
>
> CMake is integrating well with Buildbot to make a sort of poor-man's
> build farm. The one thing I can't seem to work out is a crossplatform
> way to upload CPack-built packages (Windows and Linux) to a web server
> (Ubuntu).

that's true you have file(DOWNLOAD ...) (which internally uses libcurl)
so it should be fairly easy to add file(UPLOAD ...) but currently
AFAIK this does not exists...
may be worth a feature request.

> The target web server supports SSH, SCP, DAV and possibly NFS.
> Any ideas? Or should I be asking Buildbot's mailing list?

I don't know or use buildbot but it appears to be written in python so may
I guess python may be required when using build bot.
May be using some 100% python SSH lib (in order to be cross platform)
like paramiko
(http://www.lag.net/paramiko/) is doable in order to transfer your
files using scp.

You may call your python scp script from CMake using execute_process
after a find_package(PythonInterp).

-- 
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] CMake/Buildbot xplat upload?

2010-10-01 Thread David Cole
On Fri, Oct 1, 2010 at 1:25 PM, Eric Noulard  wrote:

> 2010/10/1  :
> >
> > Hi list,
> >
> > I Googled for this but didn't find anything.
> >
> > CMake is integrating well with Buildbot to make a sort of poor-man's
> > build farm. The one thing I can't seem to work out is a crossplatform
> > way to upload CPack-built packages (Windows and Linux) to a web server
> > (Ubuntu).
>
> that's true you have file(DOWNLOAD ...) (which internally uses libcurl)
> so it should be fairly easy to add file(UPLOAD ...) but currently
> AFAIK this does not exists...
> may be worth a feature request.
>

We do not have "file(UPLOAD" but we do have "ctest_submit(FILES ..." -- it
is possible to hack together a ctest script that will send a file to a URL
via http post like we do with xml files as CDash submissions.

Still, it would be a worthy feature request to add this functionality to the
cmake file command. Then you could do in one line what it probably takes 20
right now to do with a ctest_submit hack.



> > The target web server supports SSH, SCP, DAV and possibly NFS.
> > Any ideas? Or should I be asking Buildbot's mailing list?
>
> I don't know or use buildbot but it appears to be written in python so may
> I guess python may be required when using build bot.
> May be using some 100% python SSH lib (in order to be cross platform)
> like paramiko
> (http://www.lag.net/paramiko/) is doable in order to transfer your
> files using scp.
>
> You may call your python scp script from CMake using execute_process
> after a find_package(PythonInterp).
>
> --
> 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
>
___
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] Stopping the VS build when configure fails

2010-10-01 Thread John Drescher
> I just hit "Build Solution" which caused ZERO_CHECK project to run because
> my CMakeLists.txt file had changed.  ZERO_CHECK ran CMake which attempted to
> generate a new solution.  Typically this results in a good new project and
> the VS plugin detects this and asks me to load the new project files.
> However in this case, the new project files could not be generated due to
> the error.  For whatever reason VS keeps going even though the ZERO_CHECK
> target failed.
>

I see. Now I am having some similar problems with 2.8.3-rc1 and
reloads. I did not notice that until today. After I change my
CMakeList.txt  in a subproject (not sure about the root project) and
click build in visual studio 2008 I am no longer getting prompted for
the reload but the build appears to never finish. I have to hit cancel
on the build then windows prompts me to reload the project. No dialog
appeared.

John
___
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] Removing overkill linking

2010-10-01 Thread Paul McEnery
On 1 October 2010 16:40, Marcel Loose  wrote:
> Hi Paul,
>
> Probably one of the packages that you "pull in" -- dbus, dbug-glib,
> libftdi, libglade, gtk+2, hal -- is introducing this dependency. Check
> the different *_LIBRARIES variables and you'll probably find the fly in
> your ointment.
>
> You may definitely want to look into the LINK_INTERFACE_LIBRARIES option
> of target_link_libraries to avoid over-linking.
>

Thanks Marcel.

I have managed to solve the issue on the shared library, however, I'm
still having an issue with the executable being excessively linked.
I've tried a number of different ways, but don't think I have the
syntax right for what I'm trying to achieve.


# Dependencies
find_package  (PkgConfig)
pkg_check_modules (DBUS   REQUIRED   dbus-1>=1.2.12)
pkg_check_modules (DBUS-GLIB  REQUIRED   dbus-glib-1>=0.80)
pkg_check_modules (FTDI   REQUIRED   libftdi>=0.13)
pkg_check_modules (GLADE  REQUIRED   libglade-2.0>=2.6.4)
pkg_check_modules (GTK2   REQUIRED   gtk+-2.0>=2.16.1)
pkg_check_modules (HALREQUIRED   hal>=0.5.12)

# Main config
add_definitions(-DGLADEFILE="${CMAKE_INSTALL_PREFIX}/${sharedir}/galinette_gtk.glade")
add_definitions(-DGALINETTE_VERSION="${GALINETTE_VERSION}")

# Include & build
include_directories   (. ${DBUS_INCLUDE_DIRS}
${DBUS-GLIB_INCLUDE_DIRS} ${GLADE_INCLUDE_DIRS} ${GTK2_INCLUDE_DIRS}
${HAL_INCLUDE_DIRS})
add_executable(galinette callbacks.c callbacks.h
galinette-gtk.c galinette_gtk.glade galinette-gtk.h hal.c hal.h
main.c)
add_dependencies  (galinette libgalinette)
target_link_libraries (galinette libgalinette ${DBUS_LIBRARIES}
${DBUS-GLIB_LIBRARIES} ${GLADE_LIBRARIES} ${GTK2_LIBRARIES}
${HAL_LIBRARIES})
target_link_libraries (galinette LINK_INTERFACE_LIBRARIES "")

# Other resources
add_custom_target (galinette_gtk.glade)

# Install
install (TARGETS galinette   DESTINATION ${bindir})
install (FILES   galinette_gtk.glade DESTINATION ${sharedir})


>From what I can gather from the lists and documentation, executables
are handled slightly differently to libraries. To solve the library
issue, I used the following which worked correctly:


# Dependencies
find_package  (PkgConfig)
pkg_check_modules (FTDI  REQUIRED  libftdi>=0.13)

# Include & build
include_directories   (. ${FTDI_INCLUDE_DIRS})
add_library   (libgalinette SHARED device.c error.c firmware.c
flash.c libgalinette.h libgalinette-private.h)
set_target_properties (libgalinette PROPERTIES PREFIX ""
LINK_INTERFACE_LIBRARIES "" SOVERSION 0)
target_link_libraries (libgalinette ${FTDI_LIBRARIES})

# Install
install (TARGETS libgalinette LIBRARY DESTINATION ${libdir})


set_target_properties doesn't seem to work on executables though.

Hopefully someone who knows a bit more than I do will be able to spot
what I'm doing wrong...

Kind regards,
Paul.
___
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] HOWTO: Generate Use*.cmake files for installation

2010-10-01 Thread kent williams
No, I didn't get any clues as to how this is handled.  In ITK it is
handled subtly, which is to say I couldn't figure out how it worked
from reading the CMakeLists.txt.

What I ended up doing is to create the Config file twice -- once for
the eventual installation, and once for the in-place usage.

The one that gets installed can be pretty straightforward, if you can
depend on things being installed in readily knowable paths with
respect to the Config.cmake file:

# find out where this file is
get_filename_component(CONFIG_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
#
# assume you're installed in ${CMAKE_INSTALL_PREFIX}/lib/MODULE
# include directory is parallel to lib
set(MODULE_INCLUDE_DIR "${CONFIG_DIR}/../../include/MODULE)
# assume Config file goes into lib/MODULE along with libraries
set(MODULE_LIBRARY_DIR "${CONFIG_DIR}")
# The Use file should be in same directory
set(MODULE_USE_FILE "${CONFIG_DIR}/UseMODULE.cmake")

Then the Use file you can include after find_package(MODULE REQUIRED)
sets things up for the user:

include_directories(BEFORE ${ModuleDescriptionParser_INCLUDE_DIRS})
link_directories(${MODULE_LIBRARY_DIR})
___
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] Build several libraries with different compilation flags

2010-10-01 Thread J Decker
On Fri, Oct 1, 2010 at 8:32 AM, Marcel Loose  wrote:
> Hi Eric,
>
> I'm not sure your solution is going to work. Once your file1, file2, ...
> are compiled for building my_lib1, there's reason for CMake to compile
> them again for my_lib2, because the object files are already up-to-date.
> I guess you'll have a better chance using target_properties, as Ryan
> suggested.
>

That's not really true... objects get built into .dir ...
so they are different. the problem is cmake only maintains a single
list of sources, and the flags end up getting set for both versions.
Really have to use target_properties ...

or somehow invent a way to set_target_source_files_properties( target
source  )

maybe seperate the sources that need different flags into another
library, and apply said flags to that target.. then link the whole
mess together?

> HTH,
> Marcel Loose.
>
> On Fri, 2010-10-01 at 17:10 +0200, pellegrini wrote:
>> Hi Ryan,
>>
>> Yes, that might be the solution if I wanted to change the compiler flags
>> for the whole library but in my case, that is not on the whole
>> library that I want to apply a new set of compiler flags but only on a
>> small number of files.
>>
>> Ryan Pavlik a écrit :
>> >  Look at the target properties instead of the source file properties.
>> >
>> > Ryan
>> >
>> > On 10/01/2010 08:27 AM, pellegrini wrote:
>> >> Hello everybody,
>> >>
>> >> I would like to build two libraries that contain the same files but
>> >> with a slightly different set of compilation flags
>> >> from one library to another. This within the same makefile. I was
>> >> thinking about an approach such as:
>> >>
>> >> add_library(my_lib1, STATIC, src_files ...)
>> >> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS
>> >> ...)
>> >> add_library(my_lib2, STATIC, src_files ...)
>> >> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS
>> >> ...)
>> >>
>> >> does cmake sensitive to the order of these instruction ?
>> >>
>> >> thank you very much
>> >>
>> >> Eric
>> >>
>> >>
>> >
>>
>>
>
>
> ___
> 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


[CMake] Following dependencies through generated header file

2010-10-01 Thread Óscar Fuentes
A file `foo.cpp' has this:

#include "bar.inc"

`bar.inc' is a generated file, and is marked as such. It is generated
processing a file `zoo.cpp' with an utility executed through a custom
command.

It would be very convenient to inspect the header files referenced from
`zoo.cpp' and associate them with `bar.inc', so when some of those
header files are touched `bar.inc' (and hence `foo.cpp') is
automatically re-built.

Is this possible?

___
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] Following dependencies through generated header file

2010-10-01 Thread Michael Hertling
On 10/01/2010 10:56 PM, Óscar Fuentes wrote:
> A file `foo.cpp' has this:
> 
> #include "bar.inc"
> 
> `bar.inc' is a generated file, and is marked as such. It is generated
> processing a file `zoo.cpp' with an utility executed through a custom
> command.
> 
> It would be very convenient to inspect the header files referenced from
> `zoo.cpp' and associate them with `bar.inc', so when some of those
> header files are touched `bar.inc' (and hence `foo.cpp') is
> automatically re-built.
> 
> Is this possible?

Yes, with a bit of trickiness:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(GENDEP CXX)
FILE(WRITE ${CMAKE_BINARY_DIR}/foo.cpp "#include \"bar.inc\"\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/zoo.cpp "#include \"zoo.h\"\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/zoo.h "#define ZOO_H\n")
ADD_LIBRARY(zoo SHARED zoo.cpp)
ADD_LIBRARY(foo SHARED foo.cpp bar.inc)
ADD_CUSTOM_COMMAND(OUTPUT bar.inc
COMMAND ${CMAKE_COMMAND} -E touch bar.inc DEPENDS zoo.cpp zoo)

So, zoo.cpp includes zoo.h, the helper target zoo is compiled from
zoo.cpp, and the custom command which generates bar.inc depends on
zoo.cpp as desired, but on the zoo target, too - that's the crucial
moment: If zoo.h is touched, zoo is rebuilt, but the custom command
runs also since one of its dependencies is a library and newer than
its output. AFAIK, files intended to be subject of CMake's built-in
dependency checking must be mentioned in a target's sources, hence
the necessity of the auxiliary zoo target to trigger the generation
of bar.inc if one of zoo.cpp's included headers change.

'hope that helps.

Regards,

Michael
___
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] target property FOLDER

2010-10-01 Thread James Bigler
I really like the new FOLDER property for targets.

I'm wondering if it could be extended to allow me to set this for a whole
directory.  Something like:

set_property(DIRECTORY PROPERTY FOLDER "Utilities/3rdParty")
add_executable(a ...)
add_library(b ...)
add_subdirectory(dir) # dir also get's this property

This would make it pretty speedy to add this feature without having to add
the set_property to each target, and it would be easier to maintain.  Any
new projects would get the property as well.

James
___
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] target property FOLDER

2010-10-01 Thread James Bigler
On Fri, Oct 1, 2010 at 4:16 PM, James Bigler  wrote:

> I really like the new FOLDER property for targets.
>
> I'm wondering if it could be extended to allow me to set this for a whole
> directory.  Something like:
>
> set_property(DIRECTORY PROPERTY FOLDER "Utilities/3rdParty")
> add_executable(a ...)
> add_library(b ...)
> add_subdirectory(dir) # dir also get's this property
>
> This would make it pretty speedy to add this feature without having to add
> the set_property to each target, and it would be easier to maintain.  Any
> new projects would get the property as well.
>
> James
>

I'm looking at the CL that added it:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e6ac0aacf6c3ce17141870e252fda77d994782d3

diff --git a/Source/cmGlobalVisualStudio7Generator.cxx
b/Source/cmGlobalVisualStudio7Generator.cxx


index 9631e9a..f455810 100644 (file)
--- a/Source/cmGlobalVisualStudio7Generator.cxx
+++ b/Source/cmGlobalVisualStudio7Generator.cxx
@@ -300,6 +300,48 @@ void
cmGlobalVisualStudio7Generator::WriteTargetsToSolution(
 cmLocalGenerator::START_OUTPUT);
 this->WriteProject(fout, vcprojName, dir.c_str(),
*target);
+
+// Create "solution folder" information from FOLDER target property
+//
+if (this->UseFolderProperty())
+  {
+  const char *targetFolder = target->GetProperty("FOLDER");
+  if (targetFolder)
+{

It seems like some extra code could be added to also check the directory
properties if the target properties doesn't exit.  Is this hard to do?
Should I attempt it and submit a patch?

James
___
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] visual studio 2010 warning message

2010-10-01 Thread J Decker
with cmake version 2.8.2.20100929-ge15e0
bad warning?

warning: The variable, 'CMAKE_C_STANDARD_LIBRARIES', given on the
command line, was not used within the build.



On a simple project with a single library,
-
cmake_minimum_required(VERSION 2.8 )
project( test1 )
add_library( test SHARED test.c )
-
and a blank test.c file for grins...


cmake -G "Visual Studio 10" .. --trace >err 2>&1

gives the warning twice.  This is a exerpt of the log around said
warning... probably doesn't help

e:/tools/unix/cmake/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake(28):
 IF(DEFINED CMAKE_${lang}_VERBOSE_FLAG )
e:/tools/unix/cmake/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake(31):
 TRY_COMPILE(CMAKE_DETERMINE_${lang}_ABI_COMPILED ${CMAKE_BINARY_DIR}
${src} CMAKE_FLAGS ${CMAKE_FLAGS} -DCMAKE_${lang}_STANDARD_LIBRARIES=
--no-warn-unused-cli OUTPUT_VARIABLE OUTPUT COPY_FILE ${BIN} )
warning: The variable, 'CMAKE_C_STANDARD_LIBRARIES', given on the
command line, was not used within the build.
e:/tools/unix/cmake/share/cmake-2.8/Modules/CMakeDetermineCompilerABI.cmake(44):
 IF(CMAKE_DETERMINE_${lang}_ABI_COMPILED )
___
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] Error finding boost libraries

2010-10-01 Thread David Aldrich
Hi

The following command is not working for me:

find_package( Boost 1.40.0 COMPONENTS python REQUIRED )

I get error:

CMake Error at CMakeLists.txt:36 (find_package):
  Could not find module FindBoostLibs.cmake or a configuration file for
  package BoostLibs.

I am running CMake 2.8.2, which contains 'FindBoost.cmake' (NOT 
FindBoostLibs.cmake).

Is this a known problem?

Best regards
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] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread fatman

> Date: Wed, 29 Sep 2010 03:14:57 +0200
> From: Michael Hertling 
> Subject: Re: [CMake] How to set compiler flags?
> To: cmake@cmake.org
> Message-ID: <4ca29311.1050...@online.de>
> Content-Type: text/plain; charset=ISO-8859-1
> 
> > [...] So I now use add_definitions instead:
> > 
> > add_definitions( "-Wall -m64 -O3" )
> > 
> > Is there a better way of doing this?
> 
> Don't do this at all, and adhere to the flags.
> 

Interesting - I've been doing this:

if(CMAKE_BUILD_TYPE EQUAL Debug)
   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
-std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
-Wmain -Wextra)
else(CMAKE_BUILD_TYPE EQUAL Debug)
   set(CMAKE_CXX_FLAGS -s etc)
endif(CMAKE_BUILD_TYPE EQUAL Debug)

because it never occurred to me to do it another way.

Is this wrong too?

Regards,
Adam J Richardson
___
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 set compiler flags?

2010-10-01 Thread Michael Wild

On 1. Oct, 2010, at 10:50 , fat...@crackmonkey.us wrote:

> 
>> Date: Wed, 29 Sep 2010 03:14:57 +0200
>> From: Michael Hertling 
>> Subject: Re: [CMake] How to set compiler flags?
>> To: cmake@cmake.org
>> Message-ID: <4ca29311.1050...@online.de>
>> Content-Type: text/plain; charset=ISO-8859-1
>> 
>>> [...] So I now use add_definitions instead:
>>> 
>>> add_definitions( "-Wall -m64 -O3" )
>>> 
>>> Is there a better way of doing this?
>> 
>> Don't do this at all, and adhere to the flags.
>> 
> 
> Interesting - I've been doing this:
> 
> if(CMAKE_BUILD_TYPE EQUAL Debug)
>   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> -Wmain -Wextra)
> else(CMAKE_BUILD_TYPE EQUAL Debug)
>   set(CMAKE_CXX_FLAGS -s etc)
> endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> because it never occurred to me to do it another way.
> 
> Is this wrong too?
> 
> Regards,
> Adam J Richardson

The problem with this is that the cache makes the promise to the user that he 
can change the flags and you break it.

Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken



PGP.sig
Description: This is a digitally signed message part
___
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 set compiler flags?

2010-10-01 Thread fatman

On Fri, 1 Oct 2010 11:05:34 +0200
Michael Wild  wrote:
> > 
> > if(CMAKE_BUILD_TYPE EQUAL Debug)
> >   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> > -Wmain -Wextra)
> > else(CMAKE_BUILD_TYPE EQUAL Debug)
> >   set(CMAKE_CXX_FLAGS -s etc)
> > endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> The problem with this is that the cache makes the promise to the user
> that he can change the flags and you break it.

Sorry, I didn't understand that. I'm new to CMake. I'll go read up on
the cache now.

If I'm the only user, is this a problem?

Regards,
Adam J Richardson
___
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] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread David Aldrich
Hi

> if(CMAKE_BUILD_TYPE EQUAL Debug)
>set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> -Wmain -Wextra)
> else(CMAKE_BUILD_TYPE EQUAL Debug)
>set(CMAKE_CXX_FLAGS -s etc)
> endif(CMAKE_BUILD_TYPE EQUAL Debug)

As a total non-expert I don't see how this will work because if build type is 
"Debug" then CMake will use CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS.

Am I right?

Best regards 

David 

> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
> fat...@crackmonkey.us
> Sent: 01 October 2010 09:50
> To: cmake@cmake.org
> Subject: Re: [CMake] CMake Digest, Vol 77, Issue 104
> 
> 
> > Date: Wed, 29 Sep 2010 03:14:57 +0200
> > From: Michael Hertling 
> > Subject: Re: [CMake] How to set compiler flags?
> > To: cmake@cmake.org
> > Message-ID: <4ca29311.1050...@online.de>
> > Content-Type: text/plain; charset=ISO-8859-1
> >
> > > [...] So I now use add_definitions instead:
> > >
> > > add_definitions( "-Wall -m64 -O3" )
> > >
> > > Is there a better way of doing this?
> >
> > Don't do this at all, and adhere to the flags.
> >
> 
> Interesting - I've been doing this:
> 
> if(CMAKE_BUILD_TYPE EQUAL Debug)
>set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> -Wmain -Wextra)
> else(CMAKE_BUILD_TYPE EQUAL Debug)
>set(CMAKE_CXX_FLAGS -s etc)
> endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> because it never occurred to me to do it another way.
> 
> Is this wrong too?
> 
> Regards,
> Adam J Richardson
> ___
> 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
> 
> 
>  Click
> https://www.mailcontrol.com/sr/m3Ke1Zwh72LTndxI!oX7Umg7i2cqMKDpatpcVrYsfjchek
> 5ARGEPIsf3rgJ09!IBCXmG77JHsOszZ1ZqAaZkbg==  to report this email as spam.
___
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 set compiler flags?

2010-10-01 Thread Michael Wild

On 1. Oct, 2010, at 11:17 , fat...@crackmonkey.us wrote:

> 
> On Fri, 1 Oct 2010 11:05:34 +0200
> Michael Wild  wrote:
>>> 
>>> if(CMAKE_BUILD_TYPE EQUAL Debug)
>>>  set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
>>> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
>>> -Wmain -Wextra)
>>> else(CMAKE_BUILD_TYPE EQUAL Debug)
>>>  set(CMAKE_CXX_FLAGS -s etc)
>>> endif(CMAKE_BUILD_TYPE EQUAL Debug)
>> 
>> The problem with this is that the cache makes the promise to the user
>> that he can change the flags and you break it.
> 
> Sorry, I didn't understand that. I'm new to CMake. I'll go read up on
> the cache now.
> 
> If I'm the only user, is this a problem?
> 
> Regards,
> Adam J Richardson


If you're ever going to be the only user, then probably no.

The cache is where CMake stores its persistent data and where the user makes 
changes to the settings (e.g. installation prefix, location of a certain 
library, include directory for a certain library, location of an executable, 
compilation flags, build type etc.). It is located in the CMakeCache.txt file.

Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken



PGP.sig
Description: This is a digitally signed message part
___
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] CMake/Buildbot xplat upload?

2010-10-01 Thread fatman

Hi list,

I Googled for this but didn't find anything.

CMake is integrating well with Buildbot to make a sort of poor-man's
build farm. The one thing I can't seem to work out is a crossplatform
way to upload CPack-built packages (Windows and Linux) to a web server
(Ubuntu). The target web server supports SSH, SCP, DAV and possibly NFS.
Any ideas? Or should I be asking Buildbot's mailing list?

Thanks all,
Adam J Richardson
___
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] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread fatman

On Fri, 1 Oct 2010 10:23:30 +0100
David Aldrich  wrote:

> > if(CMAKE_BUILD_TYPE EQUAL Debug)
> >set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> > -Wmain -Wextra)
> > else(CMAKE_BUILD_TYPE EQUAL Debug)
> >set(CMAKE_CXX_FLAGS -s etc)
> > endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> As a total non-expert I don't see how this will work because if build
> type is "Debug" then CMake will use CMAKE_CXX_FLAGS_DEBUG not
> CMAKE_CXX_FLAGS.
> 
> Am I right?

Could be. I too am a non-expert. CMake doesn't seem to output the
command lines it executes, or if it does then Buildbot ignores it. This
is the view from Buildbot's IO log:

cd cmake && make all && cd ..
 in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200
secs)
 watching logfiles {}
 argv: cd cmake && make all && cd ..
 environment:

 closing stdin
 using PTY: False
[  2%] Building CXX object
SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o
Linking CXX shared library ../../bin/libSmallTestLib-d.so
[  2%] Built target SmallTestLib
[  5%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/TrayIcon.cc.o
[  8%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Transformer.cc.o

[ 47%] Building CXX object
Reu2/CMakeFiles/Reu2.dir/src/CommonFunctions.cc.o
[ 50%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Buffer.cc.o
Linking CXX static library ../../bin/libReu2-d.a
[ 50%] Built target Reu2
[ 52%] Building CXX object
Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-TrayIcon.cc.o
[ 55%] Building CXX object
Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Transformer.cc.o

[ 94%] Building CXX object
Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Database.cc.o
[ 97%] Building CXX object
Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Converter.cc.o
[100%] Building CXX object
Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Buffer.cc.o
Linking CXX executable ../../bin/Test-Reu2
[100%] Built target Test-Reu2
program finished with exit code 0
elapsedTime=15.055892

Can I make CMake more verbose? The IO log above contains the command
line executed by Buildbot ("cd cmake && make all && cd ..").
___
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] Error finding boost libraries

2010-10-01 Thread fatman

> From: David Aldrich 
> Subject:
> To: "cmake@cmake.org" 
>
> The following command is not working for me:
> 
> find_package( Boost 1.40.0 COMPONENTS python REQUIRED )
> 
> I get error:
> 
> CMake Error at CMakeLists.txt:36 (find_package):
>   Could not find module FindBoostLibs.cmake or a configuration file
> for package BoostLibs.
> 
> I am running CMake 2.8.2, which contains 'FindBoost.cmake' (NOT
> FindBoostLibs.cmake).
> 
> Is this a known problem?

I notice you specify Boost.Python.

This is possibly a non-sequitur, but I've had problems with Boost.Python
in the past, in particular when I tried to compose a pkg-config file
(.pc) for it. The rest of Boost works just fine with pkg-config, as it
turns out. It's just Boost.Python I had to give up on.

IMO, the Boost.Python binary is inherently warped.
___
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] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread David Aldrich
You can run cmake and then:

make VERBOSE=1

to see the flags.

Best regards 

David 


> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
> fat...@crackmonkey.us
> Sent: 01 October 2010 10:48
> To: David Aldrich
> Cc: cmake@cmake.org
> Subject: [CMake] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]
> 
> 
> On Fri, 1 Oct 2010 10:23:30 +0100
> David Aldrich  wrote:
> 
> > > if(CMAKE_BUILD_TYPE EQUAL Debug)
> > >set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
> > > -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
> > > -Wmain -Wextra)
> > > else(CMAKE_BUILD_TYPE EQUAL Debug)
> > >set(CMAKE_CXX_FLAGS -s etc)
> > > endif(CMAKE_BUILD_TYPE EQUAL Debug)
> >
> > As a total non-expert I don't see how this will work because if build
> > type is "Debug" then CMake will use CMAKE_CXX_FLAGS_DEBUG not
> > CMAKE_CXX_FLAGS.
> >
> > Am I right?
> 
> Could be. I too am a non-expert. CMake doesn't seem to output the
> command lines it executes, or if it does then Buildbot ignores it. This
> is the view from Buildbot's IO log:
> 
> cd cmake && make all && cd ..
>  in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200
> secs)
>  watching logfiles {}
>  argv: cd cmake && make all && cd ..
>  environment:
> 
>  closing stdin
>  using PTY: False
> [  2%] Building CXX object
> SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o
> Linking CXX shared library ../../bin/libSmallTestLib-d.so
> [  2%] Built target SmallTestLib
> [  5%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/TrayIcon.cc.o
> [  8%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Transformer.cc.o
> 
> [ 47%] Building CXX object
> Reu2/CMakeFiles/Reu2.dir/src/CommonFunctions.cc.o
> [ 50%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/Buffer.cc.o
> Linking CXX static library ../../bin/libReu2-d.a
> [ 50%] Built target Reu2
> [ 52%] Building CXX object
> Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-TrayIcon.cc.o
> [ 55%] Building CXX object
> Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Transformer.cc.o
> 
> [ 94%] Building CXX object
> Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Database.cc.o
> [ 97%] Building CXX object
> Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Converter.cc.o
> [100%] Building CXX object
> Test-Reu2/CMakeFiles/Test-Reu2.dir/src/Test-Buffer.cc.o
> Linking CXX executable ../../bin/Test-Reu2
> [100%] Built target Test-Reu2
> program finished with exit code 0
> elapsedTime=15.055892
> 
> Can I make CMake more verbose? The IO log above contains the command
> line executed by Buildbot ("cd cmake && make all && cd ..").
> ___
> 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
> 
> 
>  Click
> https://www.mailcontrol.com/sr/KnN8vD3kmCjTndxI!oX7UhTphzU8DZg3pxxqfRn99ayTQI
> SvUXhIjiTv2BReO0f0CXmG77JHsOtRu1zEhLyH4w==  to report this email as spam.
___
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] Error finding boost libraries

2010-10-01 Thread David Aldrich
Hi

Actually, I made an error in my CMakeLists.txt file. It's fixed now. 

Sorry for raising this.

Best regards 

David 


> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
> fat...@crackmonkey.us
> Sent: 01 October 2010 10:55
> To: David Aldrich
> Cc: cmake@cmake.org
> Subject: [CMake] Error finding boost libraries
> 
> 
> > From: David Aldrich 
> > Subject:
> > To: "cmake@cmake.org" 
> >
> > The following command is not working for me:
> >
> > find_package( Boost 1.40.0 COMPONENTS python REQUIRED )
> >
> > I get error:
> >
> > CMake Error at CMakeLists.txt:36 (find_package):
> >   Could not find module FindBoostLibs.cmake or a configuration file
> > for package BoostLibs.
> >
> > I am running CMake 2.8.2, which contains 'FindBoost.cmake' (NOT
> > FindBoostLibs.cmake).
> >
> > Is this a known problem?
> 
> I notice you specify Boost.Python.
> 
> This is possibly a non-sequitur, but I've had problems with Boost.Python
> in the past, in particular when I tried to compose a pkg-config file
> (.pc) for it. The rest of Boost works just fine with pkg-config, as it
> turns out. It's just Boost.Python I had to give up on.
> 
> IMO, the Boost.Python binary is inherently warped.
> ___
> 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
> 
> 
>  Click
> https://www.mailcontrol.com/sr/gftAzfyUCWnTndxI!oX7Uqfv98hA5qioTS!VTX3ywk3TVd
> KH!wCDQLmj5KHvHT3ECXmG77JHsOtRu1zEhLyH4w==  to report this email as spam.
___
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] CMAKE_CXX_FLAGS [was: Re: CMake Digest, Vol 77, Issue 104]

2010-10-01 Thread fatman

>> Could be. I too am a non-expert. CMake doesn't seem to output the
>> command lines it executes, or if it does then Buildbot ignores it. This
>> is the view from Buildbot's IO log:
>> 

>> 
>> Can I make CMake more verbose? The IO log above contains the command
>> line executed by Buildbot ("cd cmake && make all && cd ..").
>
>You can run cmake and then:
>
>make VERBOSE=1
>
>to see the flags.

Thanks! I'll insert that into the builder configuration, sighup the
buildmaster and force a build. Then we'll smell what CMake is cookin'.
___
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] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman

>>I'll insert that into the builder configuration,
>> sighup the buildmaster and force a build.

Or at least I will when the server lets me in. It's started doing this
odd thing every day where it works until I try and SSH into it, then it
goes offline for an hour and when it comes back I can SSH into it fine.

Something else to fix. I hate computers.
___
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] CMake, precompiled headers, Apple, gcc and Qt

2010-10-01 Thread Dieter Oberkofler
Hi!

I'm (once again) struggling with the creation of precompiled headers in
conjunction with gcc and Qt on the Apple platform.

When creating my precompiled header I use a code section based on
"PCHSupport_26.cmake" to extract the compile flags as follows:
--
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(_args ${CMAKE_CXX_FLAGS} ${${_flags_var_name}})
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
FOREACH(_item ${DIRINC})
LIST(APPEND _args "-I${_item}")
ENDFOREACH(_item)
GET_DIRECTORY_PROPERTY(_defines_global COMPILE_DEFINITIONS)
LIST(APPEND defines ${_defines_global})
STRING(TOUPPER "COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}"
_defines_for_build_name)
GET_DIRECTORY_PROPERTY(defines_build ${_defines_for_build_name})
LIST(APPEND _defines ${_defines_build})
FOREACH(_item ${_defines})
LIST(APPEND _args "-D${_item}")
ENDFOREACH(_item ${_defines})
LIST(APPEND _args -c ${CMAKE_CURRENT_SOURCE_DIR}/${PRECOMPILED_HEADER} -o
${_gch_filename})
SEPARATE_ARGUMENTS(_args)
--

Unfortunately the above compiler flags miss two important parameter that
CMake  does generate when using the build-in compiler rules:
"-DQT_DEBUG"
and when compiling with the generated precompiled header, I get errors as
follows:
file.h: not used because `QT_DEBUG' is defined.

I would need your help with the following:

1) Is the above way to retrieve the compiler flags correct ?
2) Is there a better, easier, simpler way to do this ?
3) Why does -DQT_DEBUG not show up in COMPILE_DEFINITIONS or
COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}

Thank you for your help in advance.
D


___
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] CMake, precompiled headers, Apple, gcc and Qt

2010-10-01 Thread Dieter Oberkofler
Hi!

I'm (once again) struggling with the creation of precompiled headers in
conjunction with gcc and Qt on the Apple platform.

When creating my precompiled header I use a code section based on
"PCHSupport_26.cmake" to extract the compile flags as follows:
--
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(_args ${CMAKE_CXX_FLAGS} ${${_flags_var_name}})
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) FOREACH(_item ${DIRINC})
LIST(APPEND _args "-I${_item}")
ENDFOREACH(_item)
GET_DIRECTORY_PROPERTY(_defines_global COMPILE_DEFINITIONS) LIST(APPEND
defines ${_defines_global}) STRING(TOUPPER
"COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}" _defines_for_build_name)
GET_DIRECTORY_PROPERTY(defines_build ${_defines_for_build_name}) LIST(APPEND
_defines ${_defines_build}) FOREACH(_item ${_defines})
LIST(APPEND _args "-D${_item}")
ENDFOREACH(_item ${_defines})
LIST(APPEND _args -c ${CMAKE_CURRENT_SOURCE_DIR}/${PRECOMPILED_HEADER} -o
${_gch_filename})
SEPARATE_ARGUMENTS(_args)
--

Unfortunately the above compiler flags miss two important parameter that
CMake  does generate when using the build-in compiler rules:
"-DQT_DEBUG"
and when compiling with the generated precompiled header, I get errors as
follows:
file.h: not used because `QT_DEBUG' is defined.

I would need your help with the following:

1) Is the above way to retrieve the compiler flags correct ?
2) Is there a better, easier, simpler way to do this ?
3) Why does -DQT_DEBUG not show up in COMPILE_DEFINITIONS or
COMPILE_DEFINITIONS_${CMAKE_BUILD_TYPE}

Thank you for your help in advance.
D


___
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] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman

It let me in more quickly than usual today. Let's look at the IO log.

cd cmake && make VERBOSE=1 all && cd ..
 in dir /home/arichardson/buildbot/Reu2/bin/vostro/build (timeout 1200
secs)
 watching logfiles {}
 argv: cd cmake && make VERBOSE=1 all && cd ..

[  2%] Building CXX object
SmallTestLib/CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o
cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/SmallTestLib &&
/usr/lib/ccache/c++   -DSmallTestLib_EXPORTS -s -g -fPIC   -o
CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o -c
/home/arichardson/buildbot/Reu2/bin/vostro/build/SmallTestLib/src/SmallTestLib.cc
Linking CXX shared library ../../bin/libSmallTestLib-d.so
cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/SmallTestLib &&
/usr/bin/cmake -E cmake_link_script CMakeFiles/SmallTestLib.dir/link.txt
--verbose=1
/usr/lib/ccache/c++  -fPIC -s -g  -shared
-Wl,-soname,libSmallTestLib-d.so -o ../../bin/libSmallTestLib-d.so
CMakeFiles/SmallTestLib.dir/src/SmallTestLib.cc.o

[  5%] Building CXX object Reu2/CMakeFiles/Reu2.dir/src/TrayIcon.cc.o
cd /home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/Reu2 &&
/usr/lib/ccache/c++-s -I/usr/include/libxml2 -I/usr/include/libxml2
-I/usr/include -I/usr/include -g   -o
CMakeFiles/Reu2.dir/src/TrayIcon.cc.o -c
/home/arichardson/buildbot/Reu2/bin/vostro/build/Reu2/src/TrayIcon.cc
/usr/bin/cmake -E cmake_progress_report
/home/arichardson/buildbot/Reu2/bin/vostro/build/cmake/CMakeFiles 2

elapsedTime=8.055578

I think I'll leave VERBOSE on, I like detailed logfiles.

Looks like you're right. This is my debug build, and I don't see any of
my flags in there (--pedantic, --std=c++0x, --gdwarf-2, etc).

I'll alter my CMakeLists.txt and see if your suggested edits make a
difference.
___
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 set compiler flags?

2010-10-01 Thread Michael Wild

On 1. Oct, 2010, at 11:23 , David Aldrich wrote:

> Hi
> 
>> if(CMAKE_BUILD_TYPE EQUAL Debug)
>>   set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
>> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
>> -Wmain -Wextra)
>> else(CMAKE_BUILD_TYPE EQUAL Debug)
>>   set(CMAKE_CXX_FLAGS -s etc)
>> endif(CMAKE_BUILD_TYPE EQUAL Debug)
> 
> As a total non-expert I don't see how this will work because if build type is 
> "Debug" then CMake will use CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS.
> 
> Am I right?
> 
> Best regards 
> 
> David 

Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are 
appended to it.

Michael

PGP.sig
Description: This is a digitally signed message part
___
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 set compiler flags?

2010-10-01 Thread David Aldrich
Hi Michael

> Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are
> appended to it.

This is where I groan a little. I haven't read that in the online documentation.

Best regards 

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] How to set compiler flags?

2010-10-01 Thread Michael Wild

On 1. Oct, 2010, at 12:45 , David Aldrich wrote:

> Hi Michael
> 
>> Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are
>> appended to it.
> 
> This is where I groan a little. I haven't read that in the online 
> documentation.
> 
> Best regards 
> 
> David


Couldn't find it in the docs either (just had a superficial look), but in the 
CMakeCache.txt it says cleary:

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

...


Michael

--
There is always a well-known solution to every human problem -- neat, 
plausible, and wrong.
H. L. Mencken



PGP.sig
Description: This is a digitally signed message part
___
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 set compiler flags?

2010-10-01 Thread David Aldrich
Well I can't argue with that, but I must admit that I have not read 
CMakeCache.txt ;-)

David 


> -Original Message-
> From: Michael Wild [mailto:them...@gmail.com]
> Sent: 01 October 2010 11:53
> To: David Aldrich
> Cc: fat...@crackmonkey.us; cmake@cmake.org
> Subject: Re: [CMake] How to set compiler flags?
> 
> 
> On 1. Oct, 2010, at 12:45 , David Aldrich wrote:
> 
> > Hi Michael
> >
> >> Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific
> >> values are appended to it.
> >
> > This is where I groan a little. I haven't read that in the online
> documentation.
> >
> > Best regards
> >
> > David
> 
> 
> Couldn't find it in the docs either (just had a superficial look), but in the
> CMakeCache.txt it says cleary:
> 
> //Flags used by the compiler during all build types.
> CMAKE_CXX_FLAGS:STRING=
> 
> //Flags used by the compiler during debug builds.
> CMAKE_CXX_FLAGS_DEBUG:STRING=-g
> 
> ...
> 
> 
> Michael
> 
> --
> There is always a well-known solution to every human problem -- neat,
> plausible, and wrong.
> H. L. Mencken

___
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] CMake Digest, Vol 77, Issue 104

2010-10-01 Thread Ryan Pavlik
On Fri, Oct 1, 2010 at 4:23 AM, David Aldrich  wrote:
> Hi
>
>> if(CMAKE_BUILD_TYPE EQUAL Debug)
>>    set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
>> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
>> -Wmain -Wextra)
>> else(CMAKE_BUILD_TYPE EQUAL Debug)
>>    set(CMAKE_CXX_FLAGS -s etc)
>> endif(CMAKE_BUILD_TYPE EQUAL Debug)
>
> As a total non-expert I don't see how this will work because if build type is 
> "Debug" then CMake will use CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS.
>
> Am I right?
>
> Best regards
>
> David
>



I believe it would use both, however, if you are checking
CMAKE_BUILD_TYPE, then your build system will not work as expected on
multi-configuration generators like Visual Studio and XCode.  Setting
CMAKE_CXX_FLAGS_DEBUG is the way to go.

Ryan




>> -Original Message-
>> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf Of
>> fat...@crackmonkey.us
>> Sent: 01 October 2010 09:50
>> To: cmake@cmake.org
>> Subject: Re: [CMake] CMake Digest, Vol 77, Issue 104
>>
>>
>> > Date: Wed, 29 Sep 2010 03:14:57 +0200
>> > From: Michael Hertling 
>> > Subject: Re: [CMake] How to set compiler flags?
>> > To: cmake@cmake.org
>> > Message-ID: <4ca29311.1050...@online.de>
>> > Content-Type: text/plain; charset=ISO-8859-1
>> >
>> > > [...] So I now use add_definitions instead:
>> > >
>> > > add_definitions( "-Wall -m64 -O3" )
>> > >
>> > > Is there a better way of doing this?
>> >
>> > Don't do this at all, and adhere to the flags.
>> >
>>
>> Interesting - I've been doing this:
>>
>> if(CMAKE_BUILD_TYPE EQUAL Debug)
>>    set(CMAKE_CXX_FLAGS -Wno-long-long -Wno-comment -Wwrite-strings
>> -std=c++0x -pedantic-errors -pedantic -Wall -W -g -gdwarf-2 -Weffc++
>> -Wmain -Wextra)
>> else(CMAKE_BUILD_TYPE EQUAL Debug)
>>    set(CMAKE_CXX_FLAGS -s etc)
>> endif(CMAKE_BUILD_TYPE EQUAL Debug)
>>
>> because it never occurred to me to do it another way.
>>
>> Is this wrong too?
>>
>> Regards,
>> Adam J Richardson
-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
___
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] Stopping the VS build when configure fails

2010-10-01 Thread John Drescher
On Fri, Oct 1, 2010 at 2:21 AM, Rolf Eike Beer  wrote:
> Am Friday 01 October 2010 schrieb John Drescher:
>> On Thu, Sep 30, 2010 at 7:47 PM, James Bigler  wrote:
>> > On Thu, Sep 30, 2010 at 5:42 PM, James Bigler 
> wrote:
>> >> I'm currently using VS 2008 64 bit with CMake 2.6.3.
>> >
>> > This also happens with 2.8.3 RC1.
>>
>> That is good. I would be worried if it did not. The error means a file
>> (traversal.c) is missing in your source or at least not in the folder
>> that CMake is expecting.
>
> As you can see from James' log CMake did in fact _not_ stop the build but
> continued building even if there was an error in generating. And: yes, I have
> seen MSVC builds e.g. running through "INSTALL" even if one of the projects
> before failed to build.
>
Sorry. You are correct. I have never seen this. However I believe the
op is doing a build directly from cmake which I never do.

John
___
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] CMAKE_CXX_FLAGS

2010-10-01 Thread fatman

>> As a total non-expert I don't see how this will work because
>> if build type is "Debug" then CMake will use
>> CMAKE_CXX_FLAGS_DEBUG not CMAKE_CXX_FLAGS.
>
>I believe it would use both, however, if you are checking
>CMAKE_BUILD_TYPE, then your build system will not work as expected on
>multi-configuration generators like Visual Studio and XCode.  Setting
>CMAKE_CXX_FLAGS_DEBUG is the way to go.

Are you referring to the project file generator? I'm not actually using
one of those. I prefer to set up my project files manually (only takes a
few minutes per project in Code::Blocks).

I'm trying to make my build environments as homogenous as possible, so
I've gone with a crossplatform IDE. (I'm also trying to move from
Darcs to Fossil for version control, because although Darcs is generally
great I'm sick of a) the GHC dependency on Linux and b) its awful
fumbling of SSH on Windows.)
___
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] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini

Hello everybody,

I would like to build two libraries that contain the same files but with 
a slightly different set of compilation flags
from one library to another. This within the same makefile. I was 
thinking about an approach such as:


add_library(my_lib1, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS ...)
add_library(my_lib2, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS ...)

does cmake sensitive to the order of these instruction ?

thank you very much

Eric


--
Eric Pellegrini
Calcul Scientifique
Insitut Laue-Langevin
Grenoble, France

___
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] Disabling -fPIC

2010-10-01 Thread Marek Szuba
Hello,

Recently I have converted a Linux project I work on from hand-crafted make
files to CMake. Everything up to and including installation works fine,
however the resulting binaries cannot be run due to the system on which this
software runs disallowing text relocations. Having compared how the compiler
is is invoked by both CMake-generated and hand-crafted make files, I believe
this is caused by the former using -fPIC, which while generally a good idea
does not do here because the project depends on a number of binary-only
libraries compiled (according to eu-findtexrel) without this flag.
Therefore, how can I convince CMake not to use this flag?

Cheers,
-- 
MS
___
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] Separate CXXFLAGS and LDFLAGS

2010-10-01 Thread Marek Szuba
Hello,

How can one define C++ compiler flags which are used ONLY at compile time?
Traditional LDFLAGS appear to clearly map to CMAKE_xxx_LINKER_FLAGS, however
CMAKE_CXX_FLAGS work differently from what I would like - they are passed to
both the compiler and the linker.

Cheers,
-- 
MS
___
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] Build several libraries with different compilation flags

2010-10-01 Thread Ryan Pavlik

 Look at the target properties instead of the source file properties.

Ryan

On 10/01/2010 08:27 AM, pellegrini wrote:

Hello everybody,

I would like to build two libraries that contain the same files but 
with a slightly different set of compilation flags
from one library to another. This within the same makefile. I was 
thinking about an approach such as:


add_library(my_lib1, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)

add_library(my_lib2, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)


does cmake sensitive to the order of these instruction ?

thank you very much

Eric




--
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

Member, ACM and ACM SIGCHI
Member, ASME

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


Re: [CMake] Disabling -fPIC

2010-10-01 Thread Rolf Eike Beer
Am Friday 01 October 2010 schrieb Marek Szuba:
> Hello,
> 
> Recently I have converted a Linux project I work on from hand-crafted make
> files to CMake. Everything up to and including installation works fine,
> however the resulting binaries cannot be run due to the system on which
> this software runs disallowing text relocations. Having compared how the
> compiler is is invoked by both CMake-generated and hand-crafted make
> files, I believe this is caused by the former using -fPIC, which while
> generally a good idea does not do here because the project depends on a
> number of binary-only libraries compiled (according to eu-findtexrel)
> without this flag. Therefore, how can I convince CMake not to use this
> flag?

http://www.cmake.org/pipermail/cmake/2010-September/039871.html (Only two days 
old...)

Eike


signature.asc
Description: This is a digitally signed message part.
___
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] Separate CXXFLAGS and LDFLAGS

2010-10-01 Thread Michael Hertling
On 10/01/2010 03:55 PM, Marek Szuba wrote:
> Hello,
> 
> How can one define C++ compiler flags which are used ONLY at compile time?
> Traditional LDFLAGS appear to clearly map to CMAKE_xxx_LINKER_FLAGS, however
> CMAKE_CXX_FLAGS work differently from what I would like - they are passed to
> both the compiler and the linker.

...and that's possibly necessary:



Regards,

Michael
___
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] Use Boost wave as Preprocessor.

2010-10-01 Thread Surya Kiran Gullapalli
Hello all,
I'm trying to use Boost.Wave as C++ preprocessor. How can i tell CMake to
use Boost.Wave as preprocessor instead of standard preprocessor which comes
with C++ compiler ?
I'm targeting VS 2008 and GCC.  There are variables in CMake to specify
compiler but none, as I could see, to specify a custom preprocessor.

Thanks in advance,
Surya
___
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] Build several libraries with different compilation flags

2010-10-01 Thread pellegrini

Hi Ryan,

Yes, that might be the solution if I wanted to change the compiler flags 
for the whole library but in my case, that is not on the whole
library that I want to apply a new set of compiler flags but only on a 
small number of files.


Ryan Pavlik a écrit :

 Look at the target properties instead of the source file properties.

Ryan

On 10/01/2010 08:27 AM, pellegrini wrote:

Hello everybody,

I would like to build two libraries that contain the same files but 
with a slightly different set of compilation flags
from one library to another. This within the same makefile. I was 
thinking about an approach such as:


add_library(my_lib1, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)

add_library(my_lib2, STATIC, src_files ...)
set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
...)


does cmake sensitive to the order of these instruction ?

thank you very much

Eric







--
Eric Pellegrini
Calcul Scientifique
Insitut Laue-Langevin
Grenoble, France

___
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] Removing overkill linking

2010-10-01 Thread Paul McEnery
Hi.

I'm a cmake newbie, and have only been exposed to cmake in the form of
maintaining a Debian package. I'm working on packaging galinette
(http://galinette.sourceforge.net). I noticed that cmake appears to be
linking against libraries which are not actually required. Here is a
snippet of the dpkg-buildpackage output:

=
dpkg-shlibdeps: warning: symbol ftdi_usb_get_strings used by
debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
libraries.
dpkg-shlibdeps: warning: symbol ftdi_get_error_string used by
debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
libraries.
dpkg-shlibdeps: warning: symbol ftdi_init used by
debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
libraries.
dpkg-shlibdeps: warning: symbol ftdi_write_data used by
debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
libraries.
dpkg-shlibdeps: warning: symbol ftdi_set_line_property used by
debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
libraries.
dpkg-shlibdeps: warning: 4 other similar warnings have been skipped
(use -v to see them all).
dpkg-shlibdeps: warning: dependency on libftdi.so.1 could be avoided
if "debian/galinette-nox/usr/bin/galinette-flash" were not uselessly
linked a
gainst it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libfontconfig.so.1 could be
avoided if "debian/galinette/usr/bin/galinette" were not uselessly
linked again
st it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if
"debian/galinette/usr/bin/galinette" were not uselessly linked against
it (th
ey use none of its symbols).
dpkg-shlibdeps: warning: dependency on libatk-1.0.so.0 could be
avoided if "debian/galinette/usr/bin/galinette" were not uselessly
linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libxml2.so.2 could be avoided
if "debian/galinette/usr/bin/galinette" were not uselessly linked
against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libftdi.so.1 could be avoided
if "debian/galinette/usr/bin/galinette" were not uselessly linked
against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if
"debian/galinette/usr/bin/galinette" were not uselessly linked against
it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be
avoided if "debian/galinette/usr/bin/galinette" were not uselessly
linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgio-2.0.so.0 could be
avoided if "debian/galinette/usr/bin/galinette" were not uselessly
linked against it (they use none of its symbols).
dpkg-shlibdeps: warning: dependency on libgdk_pixbuf-2.0.so.0 could be
avoided if "debian/galinette/usr/bin/galinette" were not uselessly
linked against it (they use none of its symbols).
=

The easiest way to browse the source for both the Debian package, and
galinette is via my github repository:

http://github.com/pmcenery/galinette-debian


I've searched the web, and looked at the cmake documentation, but I
cant see how library linking can be more strictly controlled. If
someone could point me in the right direction, or offer some advice -
it would be much appreciated.

Kind regards,
Paul.
___
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] Build several libraries with different compilation flags

2010-10-01 Thread Marcel Loose
Hi Eric,

I'm not sure your solution is going to work. Once your file1, file2, ...
are compiled for building my_lib1, there's reason for CMake to compile
them again for my_lib2, because the object files are already up-to-date.
I guess you'll have a better chance using target_properties, as Ryan
suggested.

HTH,
Marcel Loose.

On Fri, 2010-10-01 at 17:10 +0200, pellegrini wrote:
> Hi Ryan,
> 
> Yes, that might be the solution if I wanted to change the compiler flags 
> for the whole library but in my case, that is not on the whole
> library that I want to apply a new set of compiler flags but only on a 
> small number of files.
> 
> Ryan Pavlik a écrit :
> >  Look at the target properties instead of the source file properties.
> >
> > Ryan
> >
> > On 10/01/2010 08:27 AM, pellegrini wrote:
> >> Hello everybody,
> >>
> >> I would like to build two libraries that contain the same files but 
> >> with a slightly different set of compilation flags
> >> from one library to another. This within the same makefile. I was 
> >> thinking about an approach such as:
> >>
> >> add_library(my_lib1, STATIC, src_files ...)
> >> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
> >> ...)
> >> add_library(my_lib2, STATIC, src_files ...)
> >> set_source_files_properties(file1, file2 ... PROPERTIES COMPILE_FLAGS 
> >> ...)
> >>
> >> does cmake sensitive to the order of these instruction ?
> >>
> >> thank you very much
> >>
> >> Eric
> >>
> >>
> >
> 
> 


___
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] Removing overkill linking

2010-10-01 Thread Marcel Loose
Hi Paul,

Probably one of the packages that you "pull in" -- dbus, dbug-glib,
libftdi, libglade, gtk+2, hal -- is introducing this dependency. Check
the different *_LIBRARIES variables and you'll probably find the fly in
your ointment.

You may definitely want to look into the LINK_INTERFACE_LIBRARIES option
of target_link_libraries to avoid over-linking.

HTH,
Marcel Loose.



On Fri, 2010-10-01 at 16:12 +0100, Paul McEnery wrote:
> Hi.
> 
> I'm a cmake newbie, and have only been exposed to cmake in the form of
> maintaining a Debian package. I'm working on packaging galinette
> (http://galinette.sourceforge.net). I noticed that cmake appears to be
> linking against libraries which are not actually required. Here is a
> snippet of the dpkg-buildpackage output:
> 
> =
> dpkg-shlibdeps: warning: symbol ftdi_usb_get_strings used by
> debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
> libraries.
> dpkg-shlibdeps: warning: symbol ftdi_get_error_string used by
> debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
> libraries.
> dpkg-shlibdeps: warning: symbol ftdi_init used by
> debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
> libraries.
> dpkg-shlibdeps: warning: symbol ftdi_write_data used by
> debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
> libraries.
> dpkg-shlibdeps: warning: symbol ftdi_set_line_property used by
> debian/libgalinette0/usr/lib/libgalinette.so.0 found in none of the
> libraries.
> dpkg-shlibdeps: warning: 4 other similar warnings have been skipped
> (use -v to see them all).
> dpkg-shlibdeps: warning: dependency on libftdi.so.1 could be avoided
> if "debian/galinette-nox/usr/bin/galinette-flash" were not uselessly
> linked a
> gainst it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libfontconfig.so.1 could be
> avoided if "debian/galinette/usr/bin/galinette" were not uselessly
> linked again
> st it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libm.so.6 could be avoided if
> "debian/galinette/usr/bin/galinette" were not uselessly linked against
> it (th
> ey use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libatk-1.0.so.0 could be
> avoided if "debian/galinette/usr/bin/galinette" were not uselessly
> linked against it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libxml2.so.2 could be avoided
> if "debian/galinette/usr/bin/galinette" were not uselessly linked
> against it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libftdi.so.1 could be avoided
> if "debian/galinette/usr/bin/galinette" were not uselessly linked
> against it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on librt.so.1 could be avoided if
> "debian/galinette/usr/bin/galinette" were not uselessly linked against
> it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libpthread.so.0 could be
> avoided if "debian/galinette/usr/bin/galinette" were not uselessly
> linked against it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libgio-2.0.so.0 could be
> avoided if "debian/galinette/usr/bin/galinette" were not uselessly
> linked against it (they use none of its symbols).
> dpkg-shlibdeps: warning: dependency on libgdk_pixbuf-2.0.so.0 could be
> avoided if "debian/galinette/usr/bin/galinette" were not uselessly
> linked against it (they use none of its symbols).
> =
> 
> The easiest way to browse the source for both the Debian package, and
> galinette is via my github repository:
> 
> http://github.com/pmcenery/galinette-debian
> 
> 
> I've searched the web, and looked at the cmake documentation, but I
> cant see how library linking can be more strictly controlled. If
> someone could point me in the right direction, or offer some advice -
> it would be much appreciated.
> 
> Kind regards,
> Paul.
> ___
> 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