Re: [CMake] Example using ExternalProject for configure+make and/or Win32?

2010-08-19 Thread Clifford Yapp
On Thu, Aug 19, 2010 at 11:14 PM, Brian Davis  wrote:

> there is :
>
>>    [CONFIGURE_COMMAND cmd...]  # Build tree configuration command
>
> so may be this works.  I have not used it so I can not speak to it.
> problem will be if on Windows systems is finding an autotools that would
> work such as cygwin or msys.

I'm experimenting with that option now - autotools requires other
steps to be run before producing a configure file, but it looks like
the traditional way of stringing the commands together with && is
working, as long as the OS in question lets me get away with it.

I expected to have to do an IF(WIN32) ELSE conditionalization of the
ExternalProject - after all, common build system logic between $WORLD
and Windows is the primary reason I'm trying out CMake.  The goal is
to not require cygwin or msys - we can build BRL-CAD currently on
Windows without them, but have to maintain an entire separate msvc
build system to do so.  I might be prepared (if it becomes do-or-die
for a true cross platform build) to write CMake files for Tcl and Tk,
but past experiences make me doubtful that they would interest the
Tcl/Tk community.

Cheers,
CY
___
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] Example using ExternalProject for configure+make and/or Win32?

2010-08-19 Thread Brian Davis
I am posting this back to cmake so others can follow along.  I too use gmail
and often forget the reply all.

On Thu, Aug 19, 2010 at 9:11 PM, Clifford Yapp  wrote:

> Um... if you mean "CMakeified" in the sense of them having CMake files
> for building, no... my understanding was that you don't really need
> ExternalProject logic if the source in question has a CMakeLists.txt
> file? - at least, I haven't needed it in those cases.  zlib and libpng
> I can both build and use to build other code in the same project with
> ADD_SUBDIRECTORY and some variable setting (a very cool feature!)
>
>
some do some do not has been my experience.  Some have forced me to use
add_subdirectory (boost) and others work best with ExternalProject_ADD (vtk
vtkedge itk).   Yes if source in question has CMakelist.txt then it is in my
terms "CMakeified".  I have used externalproject_add and add_subdirectory,
but my mileage has varied based on how it was written.  In my opinion
add_subdirectory and externalproject_add are effectively broken due



> I may be thinking about this wrong, but here's the specific situation
> which prompted the question:
>
> I have in my source tree local checkouts of tcl and tk:
>
> src/other/tcl
> src/other/tk
>
> These trees use autotools to build - they have no knowledge of CMake.
>


What I had hoped to do was use ExternalProject to trigger the
> ./configure process as part of the CMake configure and the make
> processes as a product of the CMake generated make files, or on WIN32
> incorporate the Microsoft Visual Studio project files into its own
> project output - have I mis-understood it's purpose?
>
>  from :

http://public.kitware.com/pipermail/cmake/2010-January/034908.html

specifically

-snip-
> as:
>
>
C:\projects\NIH2009\source\branches\trunk\platform\tools\cmake-2.8.0-win32-x86\bin>cmake
> --help-module ExternalProject
>
> cmake version 2.8.0
>   ExternalProject
>Create custom targets to build projects in external trees
>
>The 'ExternalProject_Add' function creates a custom target to drive
>download, update/patch, configure, build, install and test steps of
> an
>external project:
>
>  ExternalProject_Add(# Name for custom target
>[DEPENDS projects...]   # Targets on which the project
> depends
>[PREFIX dir]# Root dir for entire project
>[LIST_SEPARATOR sep]# Sep to be replaced by ; in cmd
> lines
>[TMP_DIR dir]   # Directory to store temporary
files
>[STAMP_DIR dir] # Directory to store step
timestamps
>   #--Download step--
>[DOWNLOAD_DIR dir]  # Directory to store downloaded
> files
>[DOWNLOAD_COMMAND cmd...]   # Command to download source tree
>[CVS_REPOSITORY cvsroot]# CVSROOT of CVS repository
>[CVS_MODULE mod]# Module to checkout from CVS repo
>[CVS_TAG tag]   # Tag to checkout from CVS repo
>[SVN_REPOSITORY url]# URL of Subversion repo
>[SVN_REVISION rev]  # Revision to checkout from
> Subversion repo
>[URL /.../src.tgz]  # Full path or URL of source
>   #--Update/Patch step--
>[UPDATE_COMMAND cmd...] # Source work-tree update command
>[PATCH_COMMAND cmd...]  # Command to patch downloaded
source
>   #--Configure step-
>[SOURCE_DIR dir]# Source dir to be used for build
>[CONFIGURE_COMMAND cmd...]  # Build tree configuration command
>[CMAKE_COMMAND /.../cmake]  # Specify alternative cmake
> executable
>[CMAKE_GENERATOR gen]   # Specify generator for native
build
>[CMAKE_ARGS args...]# Arguments to CMake command line
>   #--Build step-
>[BINARY_DIR dir]# Specify build dir location
>[BUILD_COMMAND cmd...]  # Command to drive the native build
>[BUILD_IN_SOURCE 1] # Use source dir for build dir
>   #--Install step---
>[INSTALL_DIR dir]   # Installation prefix
>[INSTALL_COMMAND cmd...]# Command to drive install after
> build
>   #--Test step---
>[TEST_BEFORE_INSTALL 1] # Add test step executed before
> install step
>[TEST_AFTER_INSTALL 1]  # Add test step executed after
> install step
>[TEST_COMMAND cmd...]   # Command to drive test
>)
>
>The *_DIR options specify directories for the project, with default
>directories computed as follows.  If the PREFIX option is given to
>ExternalProject_Add() or the EP_PREFIX directory property is set,
> then
>an external project is built and installed under the specified
> prefix:
>
>   TMP_DIR  = /tmp
>   STA

[CMake] Re: OS X and CPack not bundling the support libraries?

2010-08-19 Thread Michael Jackson
And just to follow up with my own answer I have a file that gets "configured" 
during CMake time with the following code in it:

include(BundleUtilities)
fixup_bundle("@CMAKE_INSTALL_PREFIX@/@tar...@.app" "@COMPLETE_PLUGIN_LIST@" 
"@PLUGIN_SEARCH_DIRS@")

Which hard codes the complete installation path. What I did not realize was 
that CPack is actually setting the CMAKE_INSTALL_PREFIX and then running the 
installation cmake code. So replacing the above with:

include(BundleUtilities)
fixup_bundle("${CMAKE_INSTALL_PREFIX}/@tar...@.app" "@COMPLETE_PLUGIN_LIST@" 
"@PLUGIN_SEARCH_DIRS@")

Allows the CPack code to run properly and give me a properly generated OS X App 
bundle.

 Sorry for the noise.
___
Mike Jackson  www.bluequartz.net


On Aug 19, 2010, at 7:51 PM, Michael Jackson wrote:

> I have a CMake based project that produces an OS X App bundle with libraries, 
> Frameworks, and plugins. If I do a "make install" then the app bundle is 
> created just fine. But if I do "make package" then I get the "shell" of the 
> app bundle but none of the required libraries are include. Kinda like "make 
> install" should be run first before "make package". 
>  I know I am missing something simple with this but I am just not seeing it. 
> Any help would be appreciated.
> 
> Thanks
> ___
> Mike Jackson  www.bluequartz.net
> Principal Software Engineer   mike.jack...@bluequartz.net 
> BlueQuartz Software   Dayton, Ohio   
> 
> 
> 

___
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] OS X and CPack not bundling the support libraries?

2010-08-19 Thread Michael Jackson
I have a CMake based project that produces an OS X App bundle with libraries, 
Frameworks, and plugins. If I do a "make install" then the app bundle is 
created just fine. But if I do "make package" then I get the "shell" of the app 
bundle but none of the required libraries are include. Kinda like "make 
install" should be run first before "make package". 
  I know I am missing something simple with this but I am just not seeing it. 
Any help would be appreciated.

Thanks
___
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net 
BlueQuartz Software   Dayton, Ohio   



___
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] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Hertling
On 08/19/2010 09:42 PM, Michael Wild wrote:
> 
> In that case I recommend creating a CMake script (e.g. 
> create_application_version.cmake) which creates the ApplicationVersion.xml 
> file. It queries the current revision (have a look at FindSVN.cmake on how to 
> do this), determines the date and time (this is a problem, refer to this 
> thread for more info: 
> http://www.mail-archive.com/cmake@cmake.org/msg30662.html) and then either 
> does a configure_file() or a file(WRITE) to create ApplicationVersion.xml. 
> Ideally the create_application_version.cmake is also a configured file (with 
> the path to the build and source tree and the path to the svn executable 
> etc.).
> 
> This script is then invoked by a custom command:
> 
> # dummy_file is never created...
> add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
> ${CMAKE_BINARY_DIR}/dummy_file
>   COMMAND ${CMAKE_EXECUTABLE} -P 
> ${CMAKE_BINARY_DIR}/create_application_version.cmake
>   COMMENT "Creating ApplicationVersion.xml"
>   VERBATIM
>   )
> 
> # this intentionally depends on dummy_file, which is never created
> add_custom_target(create_appplication_version ALL
>   DEPENDS ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
> ${CMAKE_BINARY_DIR}/dummy_file)
> 
> add_executable(super_duper main.cpp 
> ${CMAKE_BINARY_DIR}/ApplicationVersion.xml)
> add_dependencies(super_duper create_appplication_version)
> 
> 
> The trick I'm trying to pull off, is that super_duper depends on 
> create_appplication_version, which is always out of date and depends on the 
> non-existing file dummy_file, thus always updating ApplicationVersion.xml. 
> Not that I haven't tested this.

Possibly, this may be simplified: The COMMAND can be transferred from
the custom command to the custom target, so the former goes away and
one doesn't need a dummy file for triggering. Furthermore, the custom
target doesn't need to be declared ALL, and the ApplicationVersion.xml
doesn't need to appear in ADD_EXECUTABLE(), but as it's no header and,
thus, not subject to CMake's dependency scanning, one has to imply an
explicit dependency through the OBJECT_DEPENDS source file property on
main.cpp to ensure the executable's rebuild when ApplicationVersion.xml
changes.

The create_application_version.cmake should use CONFIGURE_FILE() to
generate the ApplicationVersion.xml since this function doesn't write
a new output file if it wouldn't differ from the previous one, so the
ApplicationVersion.xml doesn't trigger rebuilds if it doesn't actually
change. At 
and , you'll
find a similar discussion.

Regards,

Michael

> On 19. Aug, 2010, at 18:54 , Roman Wüger @mac.com wrote:
> 
>> The file should be updated every time a build is started.
>>
>> Best Regards
>> NoRulez
>> 
>> Am 19. Aug 2010 um 16:48 schrieb Michael Wild :
>>
>>>
>>> On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote:
>>>
 Hello,

 i need to create a file called "ApplicationVersion.xml" before the main 
 source file (main.cpp) would be compiled.
 The file should contain some application details and the current Date/Time 
 and SVN Revision.

 How can I create such file before the source file are compiled?
 How can I get the current Date/Time and the SVN Revision?

 Thanks in advance

 Best Regards
 NoRulez
>>>
>>>
>>> When should the file be updated? At configure time or every time a build is 
>>> started?
>>>
>>> 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

___
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 out of source build writes build files at source dirs?

2010-08-19 Thread Claus Klein

Ok, done

http://cmake.org/Bug/view.php?id=11153

//regards
Claus

On 16.08.2010, at 09:28, Bo Thorsen wrote:


Hi Claus,

If you didn't already, please post this to http://cmake.org/Bug  
instead. The CMake people usually don't take bug reports from this  
list.


Bo.

Den 28-07-2010 20:34, Claus Klein skrev:

Today, I discovered than in the special case of a substituted
PROJECT_SOURCE_DIR,
all build files for subdir packages are created in PROJECT_SOURCE_DIR
and not at the PROJECT_BINARY_DIR.

I use windows cmd shell
subst w: z:/some/deep/path/to/source/dir

Than I create a new build dir:

cd /d w:/
mkdir build
cd build
cmake ..


after that, all subdirs of the source dir are created as
w:/build
w:/build
...
filled with the cmake build files.

I tested cmake 2.8.0, 2.8.1 and 2.8.2 version. all have the same  
behaviour!

The created project builds fine too.

It seems that the PROJECT_BINARY_DIR and the subdir paths are
concatenated without a path separator.

Claus


___
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




Bo Thorsen.
Monty Program AB.

--

MariaDB: MySQL replacement
Community developed. Feature enhanced. Backward compatible.
___
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] cmake out of source build writes build files at source dirs?

2010-08-19 Thread Claus Klein

Hi Alex,

No, I dit not write a bug report yet.

The 10994 seems an other problem, I have the CMakeLists.txt at the  
root dir, together with my build subdir.
So my binary build tree is located at inside the source tree at  
project root.

And this is the root of the substituded drive.

Claus

On 17.08.2010, at 22:42, Alexander Neundorf wrote:


On Monday 16 August 2010, Bo Thorsen wrote:

Hi Claus,

If you didn't already, please post this to http://cmake.org/Bug  
instead.

The CMake people usually don't take bug reports from this list.


Is this related to this one ?
http://public.kitware.com/Bug/view.php?id=10994

Alex
___
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] How to add CORBA idl files to Visual Studio source group

2010-08-19 Thread Claus Klein

Hi,

I have a project with CORBA idl files, which will be compiled with a  
tao idl compiler to source and header files via a:


add_custom_command(OUTPUT output1 [output2 ...] ...)

I defined a source group with:

source_group(idlfiles REGULAR_EXPRESSION *.idl)

The generated source are added  with ohter source to build libs  and  
executables for different subsystems:


 add_library(interfacelib1 interface1.idl interface1C.cpp   ).

I add the idl files too. The idlfiles group was filled with my idl  
files. OK, that was my intention.

That works with header files, but not with idl files:

When I compile the project, there are build error because the VS2005  
does not know who to compile the .idl files?


All works fine without the idl file in the source list of the libs.  
But can't see the idl file in the VS project.


Is there an other way to get the idl files to a source group under  
there library projects?



//regards
Claus
___
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] Creating custom file before building/compiling with cmake

2010-08-19 Thread norulez
OK, thank you very much, I will try it

Best Regards
NoRulez

Am 19.08.2010 um 21:42 schrieb Michael Wild :

> 
> In that case I recommend creating a CMake script (e.g. 
> create_application_version.cmake) which creates the ApplicationVersion.xml 
> file. It queries the current revision (have a look at FindSVN.cmake on how to 
> do this), determines the date and time (this is a problem, refer to this 
> thread for more info: 
> http://www.mail-archive.com/cmake@cmake.org/msg30662.html) and then either 
> does a configure_file() or a file(WRITE) to create ApplicationVersion.xml. 
> Ideally the create_application_version.cmake is also a configured file (with 
> the path to the build and source tree and the path to the svn executable 
> etc.).
> 
> This script is then invoked by a custom command:
> 
> # dummy_file is never created...
> add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
> ${CMAKE_BINARY_DIR}/dummy_file
>  COMMAND ${CMAKE_EXECUTABLE} -P 
> ${CMAKE_BINARY_DIR}/create_application_version.cmake
>  COMMENT "Creating ApplicationVersion.xml"
>  VERBATIM
>  )
> 
> # this intentionally depends on dummy_file, which is never created
> add_custom_target(create_appplication_version ALL
>  DEPENDS ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
> ${CMAKE_BINARY_DIR}/dummy_file)
> 
> add_executable(super_duper main.cpp 
> ${CMAKE_BINARY_DIR}/ApplicationVersion.xml)
> add_dependencies(super_duper create_appplication_version)
> 
> 
> The trick I'm trying to pull off, is that super_duper depends on 
> create_appplication_version, which is always out of date and depends on the 
> non-existing file dummy_file, thus always updating ApplicationVersion.xml. 
> Not that I haven't tested this.
> 
> Michael
> 
> On 19. Aug, 2010, at 18:54 , Roman Wüger @mac.com wrote:
> 
>> The file should be updated every time a build is started.
>> 
>> Best Regards
>> NoRulez
>> 
>> Am 19. Aug 2010 um 16:48 schrieb Michael Wild :
>> 
>>> 
>>> On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote:
>>> 
 Hello,
 
 i need to create a file called "ApplicationVersion.xml" before the main 
 source file (main.cpp) would be compiled.
 The file should contain some application details and the current Date/Time 
 and SVN Revision.
 
 How can I create such file before the source file are compiled?
 How can I get the current Date/Time and the SVN Revision?
 
 Thanks in advance
 
 Best Regards
 NoRulez
>>> 
>>> 
>>> When should the file be updated? At configure time or every time a build is 
>>> started?
>>> 
>>> 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

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Wild

In that case I recommend creating a CMake script (e.g. 
create_application_version.cmake) which creates the ApplicationVersion.xml 
file. It queries the current revision (have a look at FindSVN.cmake on how to 
do this), determines the date and time (this is a problem, refer to this thread 
for more info: http://www.mail-archive.com/cmake@cmake.org/msg30662.html) and 
then either does a configure_file() or a file(WRITE) to create 
ApplicationVersion.xml. Ideally the create_application_version.cmake is also a 
configured file (with the path to the build and source tree and the path to the 
svn executable etc.).

This script is then invoked by a custom command:

# dummy_file is never created...
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
${CMAKE_BINARY_DIR}/dummy_file
  COMMAND ${CMAKE_EXECUTABLE} -P 
${CMAKE_BINARY_DIR}/create_application_version.cmake
  COMMENT "Creating ApplicationVersion.xml"
  VERBATIM
  )

# this intentionally depends on dummy_file, which is never created
add_custom_target(create_appplication_version ALL
  DEPENDS ${CMAKE_BINARY_DIR}/ApplicationVersion.xml 
${CMAKE_BINARY_DIR}/dummy_file)

add_executable(super_duper main.cpp ${CMAKE_BINARY_DIR}/ApplicationVersion.xml)
add_dependencies(super_duper create_appplication_version)


The trick I'm trying to pull off, is that super_duper depends on 
create_appplication_version, which is always out of date and depends on the 
non-existing file dummy_file, thus always updating ApplicationVersion.xml. Not 
that I haven't tested this.

Michael

On 19. Aug, 2010, at 18:54 , Roman Wüger @mac.com wrote:

> The file should be updated every time a build is started.
> 
> Best Regards
> NoRulez
> 
> Am 19. Aug 2010 um 16:48 schrieb Michael Wild :
> 
>> 
>> On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote:
>> 
>> > Hello,
>> >
>> > i need to create a file called "ApplicationVersion.xml" before the main 
>> > source file (main.cpp) would be compiled.
>> > The file should contain some application details and the current Date/Time 
>> > and SVN Revision.
>> >
>> > How can I create such file before the source file are compiled?
>> > How can I get the current Date/Time and the SVN Revision?
>> >
>> > Thanks in advance
>> >
>> > Best Regards
>> > NoRulez
>> 
>> 
>> When should the file be updated? At configure time or every time a build is 
>> started?
>> 
>> 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

Re: [CMake] Warnings and error

2010-08-19 Thread Alexander Neundorf
On Thursday 19 August 2010, Johny wrote:
> Hey,
>
> Is there any way to increase the number of warnings and errors displayed
> on CDash ? Also can we somehow suppress certain warnings and errors ?

Yes, you have to create a CTestCustom.cmake:
http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest

Alex
___
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] Anjuta

2010-08-19 Thread Alexander Neundorf
On Thursday 19 August 2010, Micha Renner wrote:
> Does CMake support Anjuta?

There is currently no special support for Anjuta.
Depending on how the project files of Anjuta look like (assuming it has its 
own project files), writing either a full project generator for Anjuta or a 
makefile-based one might not be too hard.

Alex
___
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread Roman Wüger
CMake is a Makefile-Generator an nothing elseWhy would you write the Makefiles by yourself?Best RegardsNoRulezAm 19. Aug 2010 um 16:12 schrieb Eric Noulard :2010/8/19 Mr Shore :
> Basically, cmake parsor can understand makefile, that's why it can generate
> makefile from CMakeLists.txt,

As far as I know CMake does NOT understand Makefile it does **generates**
makefiles which is totally different story.

Again AFAIK CMake is never **reading** a Makefile.

I invite you to verify my feeling from the CMake source code.

> Just the other way around,why can't it 100% convert a makefile to
> CMakeLists.txt?

Just as with foreign language, because of the semantic.

Usually I am able to say what I want in english without trouble.
But give me some litterature in english to translate back to my
native language and I'll get stuck after 2 pages or 2 lines depending
on the author.


-- 
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] Creating custom file before building/compiling with cmake

2010-08-19 Thread Roman Wüger
The file should be updated every time a build is started.Best RegardsNoRulezAm 19. Aug 2010 um 16:48 schrieb Michael Wild :
On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote:

> Hello,
> 
> i need to create a file called "ApplicationVersion.xml" before the main source file (main.cpp) would be compiled.
> The file should contain some application details and the current Date/Time and SVN Revision
> 
> How can I create such file before the source file are compiled?
> How can I get the current Date/Time and the SVN Revision?
> 
> Thanks in advance
> 
> Best Regards
> NoRulez


When should the file be updated? At configure time or every time a build is started?

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] Warnings and error

2010-08-19 Thread Johny

Hey,

Is there any way to increase the number of warnings and errors displayed 
on CDash ? Also can we somehow suppress certain warnings and errors ?


Cheers,
Johny
___
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] Setting CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and friends on a per target basis

2010-08-19 Thread Brian Davis
>
>
> We override the standard CMAKE__FLAGS (C CXX Fortran) and use it as a
> baseline. Then, for individual source files it is possible to override them
> in a separate file using:
>
>
Yes this is seemingly common practice in CMake land.  The problem with this
approach is when using add_subdirectory on third party source these package
developers also set these (often with CACHE STRING "" FORCE - the reason why
I had to patch boost-cmake-1.41_0 and dcmtk, I use ExternalProject_ADD for
vtk, and vtk-edge, but this certainly the best solution) which can cause all
kinds of greif when these are included in an uber project.  My approach is
to have a set of macros/functions which work as Boost.Build (bjam) projects
which can inherit properties from other parent projects.  Which actually
makes the project( ) syntax somewhat useful.  I currently have this working
(though not complete) with the last CMake strong hold being the use of these
variables.  If I can overcome this I intend to submit these to Mantis bug
tracker as a feature request.  This also allows the developer to reach
anywhere in any subproject and in any third party developer package and
change the build settings without having to patch (provided TPS developers
would use the convention).

I would like to do this without having to patch CMake and simply provide a
set of macro functions which could be included in future releases.


>
>
> set_source_files_properties(${CMAKE_BINARY_DIR}/path/to/file.f PROPERTIES
> GENERATED TRUE COMPILE_FLAGS "${FFLAG_OPT}")
>
>
>

COMPILE flags only appends to thoes already set CMAKE_... vars.  I need a
way to override all the other vars on a per target basis.
___
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] Dependency bug in cmake with a custom-command

2010-08-19 Thread Andreas Pakulat
On 19.08.10 09:26:26, Brad King wrote:
> On 08/18/2010 01:01 AM, Andreas Pakulat wrote:
> > On 17.08.10 14:53:02, Brad King wrote:
> >> The source file is being compiled in a target that does not
> >> wait for the header to be generated before compiling.  We can
> >> add a dependency on the target the does provide the header.
> > 
> > Instead I've added the kde4_add_ui_files to the test-target too, so it
> > doesn't need a dependency onto the plugin target (somehow I don't like
> > that, can't explain rationally why though).
> 
> This may cause the ui files to be generated twice, possibly conflicting
> if the rules happen to run in parallel.  If they have different output
> directories then that is okay.  If they are going to the same place it
> will be a problem.

They have different output directories. In the case of the same output dirs
that will definetly produce problems (though not for 'everybody' as it
seems), we had that with another kdevelop plugin which runs a
parser-generator and there where two targets (one custom-target one normal)
that both depended onto the generated files. This produced build-erros when
running make -j, but not for everybody and not reliably...

Andreas

-- 
You will have a long and boring life.
___
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] PDBs patch for VS2010 generator

2010-08-19 Thread Brad King
On 08/18/2010 02:59 PM, Robert Goulet wrote:
> I would like to submit the following changes to the cmake repository
> until someone finds a better solution.

Looks good.  I've put it in 'next':

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

Thanks,
-Brad
___
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] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Wild

On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote:

> Hello,
> 
> i need to create a file called "ApplicationVersion.xml" before the main 
> source file (main.cpp) would be compiled.
> The file should contain some application details and the current Date/Time 
> and SVN Revision.
> 
> How can I create such file before the source file are compiled?
> How can I get the current Date/Time and the SVN Revision?
> 
> Thanks in advance
> 
> Best Regards
> NoRulez


When should the file be updated? At configure time or every time a build is 
started?

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] Creating custom file before building/compiling with cmake

2010-08-19 Thread Roman Wüger
Hello,i need to create a file called "ApplicationVersion.xml" before the main source file (main.cpp) would be compiled.The file should contain some application details and the current Date/Time and SVN Revision.How can I create such file before the source file are compiled?How can I get the current Date/Time and the SVN Revision?Thanks in advanceBest RegardsNoRulez
___
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread Eric Noulard
2010/8/19 Mr Shore :
> Basically, cmake parsor can understand makefile, that's why it can generate
> makefile from CMakeLists.txt,

As far as I know CMake does NOT understand Makefile it does **generates**
makefiles which is totally different story.

Again AFAIK CMake is never **reading** a Makefile.

I invite you to verify my feeling from the CMake source code.

> Just the other way around,why can't it 100% convert a makefile to
> CMakeLists.txt?

Just as with foreign language, because of the semantic.

Usually I am able to say what I want in english without trouble.
But give me some litterature in english to translate back to my
native language and I'll get stuck after 2 pages or 2 lines depending
on the author.


-- 
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread David Cole
MySQL already builds with CMake, currently.

For example, search for cmake on this page:
http://dev.mysql.com/doc/refman/5.1/en/connector-c-building.html


On Thu, Aug 19, 2010 at 9:39 AM, Eric Noulard wrote:

> 2010/8/19 Mr Shore :
> > Actually it's not my projects, but the well known projects like MySQL,
> > Firefox and so on..
>
> CMakeifying this kind of project may not be an easy task, moreover my own
> opinion is that you shoudl ensure that the project stakeholder may be
> interested in
> this effort.
>
> In fact if they are not interested you may be wasting your time
> following the evolution
> of the officially supported build system.
>
> I do not think you'll find a useful converter tool for this kind of
> project and even if
> some tool may do say 80% of the work you'll end up diving in the
> current build system
> in order to manually do the remaining 20%.
>
> Why would you want to CMakeify Firefox or MySQL?
>
> --
> 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

[CMake] Anjuta

2010-08-19 Thread Micha Renner
Does CMake support Anjuta?

Greetings
Micha


___
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread Eric Noulard
2010/8/19 Mr Shore :
> Actually it's not my projects, but the well known projects like MySQL,
> Firefox and so on..

CMakeifying this kind of project may not be an easy task, moreover my own
opinion is that you shoudl ensure that the project stakeholder may be
interested in
this effort.

In fact if they are not interested you may be wasting your time
following the evolution
of the officially supported build system.

I do not think you'll find a useful converter tool for this kind of
project and even if
some tool may do say 80% of the work you'll end up diving in the
current build system
in order to manually do the remaining 20%.

Why would you want to CMakeify Firefox or MySQL?

-- 
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] Dependency bug in cmake with a custom-command

2010-08-19 Thread Brad King
On 08/18/2010 01:01 AM, Andreas Pakulat wrote:
> On 17.08.10 14:53:02, Brad King wrote:
>> The source file is being compiled in a target that does not
>> wait for the header to be generated before compiling.  We can
>> add a dependency on the target the does provide the header.
> 
> Instead I've added the kde4_add_ui_files to the test-target too, so it
> doesn't need a dependency onto the plugin target (somehow I don't like
> that, can't explain rationally why though).

This may cause the ui files to be generated twice, possibly conflicting
if the rules happen to run in parallel.  If they have different output
directories then that is okay.  If they are going to the same place it
will be a problem.

-Brad
___
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread Eric Noulard
2010/8/19 Mr Shore :
> As we know most (old) open source projects are using makefile,
>
> is there a tool to convert makefile to CMakeLists.txt ?

None  I am aware of.

Some converters are listed on the Wiki:
http://www.cmake.org/Wiki/CMake#Converters_from_other_buildsystems_to_CMake

I have some very basic CMakeLists.txt from scratch generator written in python
but I should be near to useless for "real" project.

Is you target project "pure" makefile based or does it use autotools?

-- 
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] makefile to CMakeLists.txt, possible?

2010-08-19 Thread Mr Shore
As we know most (old) open source projects are using makefile,

is there a tool to convert makefile to CMakeLists.txt ?
___
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 with CTest, cannot submit results to CDash

2010-08-19 Thread David Cole
What version of cmake are you using?

Where is CTestConfig.cmake relative to your top level CMakeLists.txt file?
(They should be in the same directory.)

Is your source tree available for us to try to reproduce the problem?


On Thu, Aug 19, 2010 at 5:14 AM, hgc-01...@hkedcity.net wong <
emeple...@gmail.com> wrote:

> Hi,
>
> I am using CMake with CTest and CDash on a project.
>
> This is the CTestConfig.cmake located under the source directory:
> 
> set(CTEST_PROJECT_NAME "CDE")
> set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
>
> set(CTEST_DROP_METHOD "http")
> set(CTEST_DROP_SITE "cde.abc.com")
> set(CTEST_DROP_LOCATION "/cdash/submit.php?project=CDE")
> set(CTEST_DROP_SITE_CDASH TRUE)
> 
>
> However, the generated DartConfiguration.tcl is something like below,
> the DropSite and DropLocation are incorrect.
> Thank you very much
>
> =
>  This file is configured by CMake automatically as DartConfiguration.tcl
> # If you choose not to use CMake, this file may be hand configured, by
> # filling in the required variables.
>
>
> # Configuration directories and files
> SourceDirectory: /home/cywong/cpe3/svnlocal/trunk/test
> BuildDirectory: /home/cywong/cpe3/build/test
>
> # Site is something like machine.domain, i.e. pragmatic.crd
> Site: cdevm2centos55x86
>
> # Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++
> BuildName: Linux-c++
>
> # Submission information
> IsCDash:
> DropSite: public.kitware.com
> DropLocation: /cgi-bin/HTTPUploadDartFile.cgi
> DropSiteUser:
> DropSitePassword:
> DropSiteMode:
> DropMethod: http
> TriggerSite:
> http://public.kitware.com/cgi-bin/Submit-Random-TestingResults.cgi
> ScpCommand: /usr/bin/scp
> 
> ___
> 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] CMake with CTest, cannot submit results to CDash

2010-08-19 Thread hgc-01...@hkedcity.net wong
Hi,

I am using CMake with CTest and CDash on a project.

This is the CTestConfig.cmake located under the source directory:

set(CTEST_PROJECT_NAME "CDE")
set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")

set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cde.abc.com")
set(CTEST_DROP_LOCATION "/cdash/submit.php?project=CDE")
set(CTEST_DROP_SITE_CDASH TRUE)


However, the generated DartConfiguration.tcl is something like below,
the DropSite and DropLocation are incorrect.
Thank you very much

=
 This file is configured by CMake automatically as DartConfiguration.tcl
# If you choose not to use CMake, this file may be hand configured, by
# filling in the required variables.


# Configuration directories and files
SourceDirectory: /home/cywong/cpe3/svnlocal/trunk/test
BuildDirectory: /home/cywong/cpe3/build/test

# Site is something like machine.domain, i.e. pragmatic.crd
Site: cdevm2centos55x86

# Build name is osname-revision-compiler, i.e. Linux-2.4.2-2smp-c++
BuildName: Linux-c++

# Submission information
IsCDash:
DropSite: public.kitware.com
DropLocation: /cgi-bin/HTTPUploadDartFile.cgi
DropSiteUser:
DropSitePassword:
DropSiteMode:
DropMethod: http
TriggerSite: http://public.kitware.com/cgi-bin/Submit-Random-TestingResults.cgi
ScpCommand: /usr/bin/scp

___
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] Setting CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and friends on a per target basis

2010-08-19 Thread J Decker
Two properties
  DEFINE_SYMBOL - defines a one-shot define that get's -D appropriately
  COMIPLE_FLAGS - add whatever other flags you want - use quotes
around the value




SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES

  DEFINE_SYMBOL # optional
- useful for like ${PROJECT_NAME}_SOURCE to indicate this is built as
part of the library

  COMPILE_FLAGS  "-DTARGET_LABEL=${PROJECT_NAME}
${ExtraFlags} 
-DTARGETNAME=\"\\\"${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}\\\"\"
${ExtraRenderFlags}"
)


On Wed, Aug 18, 2010 at 1:47 PM, Brian Davis  wrote:
> CMAKE_CXX_FLAGS..., CMAKE_C_FLAGS... and CMAKE_C_STANDARD_LIBRARIES_INIT and
> friends are seemingly global variables.  Is there a way to override (all of)
> these on a per target basis?  A method which is not tied to the directory
> (properties). One that does not simply append such as COMPILE_FLAGS, but
> blasts away and makes it what I specify? Basically all the goop in
> Windows-icl.cmake, Windows-cl.cmake, etc.  Possibly involving
> set_target_properties?
>
> ___
> 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