Re: [CMake] Different configurations with Visual Studio

2010-07-06 Thread Tyler Roscoe
On Mon, Jul 05, 2010 at 10:47:32AM -0400, John Drescher wrote:
> What is wrong with different build folders for each compiler / ide?

I'm interested in an answer to this question as well.

For me, the biggest thing is that it's what VS developers are accustomed
to. I've been educating it out of them, but if both win32 and win64
configurations could be made available through a robust configure-time
process, that might be better.

Thanks,
tyler
___
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] Different configurations with Visual Studio

2010-07-06 Thread Tyler Roscoe
On Mon, Jul 05, 2010 at 01:31:41PM +0200, Mark Van Peteghem wrote:
> I see, thanks. I intend to write a Python script that adds the extra
> platform solution, because we really need that. Visual Studio and
> Code::Blocks project files are XML files, so it shouldn't be too hard.

If possible, I would be interested in seeing/using this script.

Thanksm,
tyler
___
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] find_path() and directories

2010-07-06 Thread Clinton Stimpson
Can find_path() be used to find a directory containing a directory or 
directories?

For example:
find_path(MY_DIR NAMES subdir)

It seems to work on Linux, but the docs say it is for finding directories 
containing "files."

Thanks,
Clint
___
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] contribution: FindMySQL.cmake

2010-07-06 Thread Michael Wild

On 6. Jul, 2010, at 21:01 , Arnaud GELAS wrote:

> Hi guys,
> 
> We have been for our own projects the following file to find mysql packages, 
> and I would like to contribute it to the community.
> 
> Note: it works fine for MySQL 5.1 on Windows (tested on XP and 7), Mac 
> (tested on 10.5 and 10.6) and Linux.
> I guess it could be improved for other version of MySQL (older one, or beta 
> ones), I would be happy to help in the improvement of this file.
> 
> Thanks,
> Best Regards,
> 
> Arnaud
> 


Hi

A few things that could be improved:

- Use the formatting conventions for the header-comment (e.g. start brief 
description with "# - ")
- Use standard variable names:
  * Use MYSQL_INCLUDE_DIR for the find_path call
  * Use MYSQL_LIBRARY for the find_library call
  * List all required include directories in MYSQL_INCLUDE_DIRS, do not cache 
the variable
  * List all required libraries in MYSQL_LIBRARIES, do not cache
  * The MYSQL_EXTRA_LIBRARIES variable is ugly, try to get rid of it by really 
detecting what the dependencies are
- Use FindZLIB to find the zlib library
- Use the FindPackageHandleStandardArgs module to simplify your module
- /usr and /usr/local are used by default as search prefixes
- Also on Windows "C:\Program Files" and "C:\Program Files (x86)" are used as 
search prefixes
- Use PATH_SUFFIXES to simplify the find_xxx calls

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] contribution: FindMySQL.cmake

2010-07-06 Thread Arnaud GELAS

Hi guys,

We have been for our own projects the following file to find mysql 
packages, and I would like to contribute it to the community.


Note: it works fine for MySQL 5.1 on Windows (tested on XP and 7), Mac 
(tested on 10.5 and 10.6) and Linux.
I guess it could be improved for other version of MySQL (older one, or 
beta ones), I would be happy to help in the improvement of this file.


Thanks,
Best Regards,

Arnaud
#
# Find the MySQL client includes and library
# 

# This module defines
# MYSQL_INCLUDE_DIRECTORIES, where to find mysql.h
# MYSQL_LIBRARIES, the libraries to link against to connect to MySQL
# MYSQL_FOUND, If false, you cannot build anything that requires MySQL.

# also defined, but not for general use are
# MYSQL_LIBRARY, where to find the MySQL library.

# 
# XXX NOTE: This is not yet for general use.  I'm pretty sure there
# are other libraries I have to link against at the same time.
#

SET( MYSQL_FOUND 0 )

FIND_PATH(MYSQL_INCLUDE_DIRECTORIES mysql.h
  /usr/include
  /usr/include/mysql
  /usr/local/include
  /usr/local/include/mysql
  /usr/local/mysql/include
  /usr/local/mysql/include/mysql
  "C:/Program Files/MySQL/include"
  "C:/Program Files/MySQL/MySQL Server 5.1/include"
  "C:/Program Files (x86)/MySQL/MySQL Server 5.1/include"
  "C:/MySQL/include"
  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/include"
  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 
5.1;Location]/include"
  DOC "Specify the directory containing mysql.h."
)

FIND_LIBRARY( MYSQL_LIBRARY 
  NAMES mysql libmysql mysqlclient
  PATHS
  /usr/lib
  /usr/lib64
  /usr/lib/mysql
  /usr/lib64/mysql
  /usr/local/lib
  /usr/local/lib/mysql
  /usr/local/mysql/lib
  /usr/local/mysql/lib/mysql
  "C:/Program Files/MySQL/lib"
  "C:/Program Files/MySQL/MySQL Server 5.1/lib/opt"
  "C:/MySQL/lib/opt"
  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\MySQL AB\\MySQL Server 5.1;Location]/lib/opt"
  "[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\MySQL AB\\MySQL Server 
5.1;Location]/lib/opt"
  DOC "Specify the mysql library here."
)

# On Windows you typically don't need to include any extra libraries
# to build MYSQL stuff.

IF (NOT WIN32)
  FIND_LIBRARY( MYSQL_EXTRA_LIBRARIES
NAMES z zlib
PATHS /usr/lib /usr/lib64 /usr/local/lib 
DOC "If more libraries are necessary to link in a MySQL client 
(typically zlib), specify them here.")
ELSE (NOT WIN32)
  SET( MYSQL_EXTRA_LIBRARIES "" )
ENDIF (NOT WIN32)


IF (MYSQL_LIBRARY)
  IF (MYSQL_INCLUDE_DIRECTORIES)
SET( MYSQL_FOUND 1 )
  ENDIF (MYSQL_INCLUDE_DIRECTORIES)
ENDIF (MYSQL_LIBRARY)

MARK_AS_ADVANCED( MYSQL_FOUND MYSQL_LIBRARY MYSQL_EXTRA_LIBRARIES 
MYSQL_INCLUDE_DIRECTORIES )
___
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] problems with creating static library on aix

2010-07-06 Thread Verweij, Arjen
Hi,

We're experiencing two problems with creating static libraries through cmake on 
our AIX system.

The first one is that a cmake based build environment will come up with 64-bit 
XCOFF, but ar and friends won't play ball unless you add -X64. I suppose this 
issue has just been overlooked and is in fact minor.

The other problem is that even though I have added the below workaround 
referenced in a thread from July '08, "ar cr" will choke on the amount or 
objects I'm feeding it. I'm sure this is a problem with the ar itself and not 
cmake, but I would be interested to learn of a possible workaround. It works 
fine for smaller archives.

Thanks,
Arjen

SET(CMAKE_C_ARCHIVE_CREATE " -X64 cr   ")
SET(CMAKE_C_ARCHIVE_APPEND " -X64 r")
SET(CMAKE_C_ARCHIVE_FINISH " -X64 ")
SET(CMAKE_CXX_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE})
SET(CMAKE_CXX_ARCHIVE_APPEND ${CMAKE_C_ARCHIVE_APPEND})
SET(CMAKE_CXX_ARCHIVE_FINISH ${CMAKE_C_ARCHIVE_FINISH})
SET(CMAKE_Fortran_ARCHIVE_CREATE ${CMAKE_C_ARCHIVE_CREATE})
SET(CMAKE_Fortran_ARCHIVE_APPEND ${CMAKE_C_ARCHIVE_APPEND})
SET(CMAKE_Fortran_ARCHIVE_FINISH ${CMAKE_C_ARCHIVE_FINISH})
___
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] Upgraded to cmake-2.8.2 on windows7 and now it will not work

2010-07-06 Thread John Drescher
On Tue, Jul 6, 2010 at 12:50 PM, John Drescher  wrote:
> I was using 2.8.1 and previous cmake versions for a long time without
> any problems. Also 2.8.2 works for the same project on 64 bin xp.
>
> CMake Error: CMake was unable to find a build program corresponding to
> "Visual Studio 8 2005".  CMAKE_MAKE_PROGRAM is not set.  You probably
> need to select a different build tool.
> CMake Error: Could not find cmake module file://Radimgws68/c$/Program
> Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake
> CMake Error: Could not find cmake module
> file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCCompiler.cmake
> CMake Error: Could not find cmake module file://Radimgws68/c$/Program
> Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake
> CMake Error: Could not find cmake module
> file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCXXCompiler.cmake
> CMake Error: Could not find cmake module file://Radimgws68/c$/Program
> Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake
> CMake Error: Could not process cmake module
> file://Radimgws68/c$/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake
> CMake Error: Could not process cmake module
> file://Radimgws68/c$/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake
> Configuring incomplete, errors occurred!
>
> --

Okay, this is weird. If I execute cmake-gui from C:\Program Files
(x86)\CMake 2.8\bin it seems to work but the link on my desktop fails.
I will look into this.

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


[CMake] Upgraded to cmake-2.8.2 on windows7 and now it will not work

2010-07-06 Thread John Drescher
I was using 2.8.1 and previous cmake versions for a long time without
any problems. Also 2.8.2 works for the same project on 64 bin xp.

CMake Error: CMake was unable to find a build program corresponding to
"Visual Studio 8 2005".  CMAKE_MAKE_PROGRAM is not set.  You probably
need to select a different build tool.
CMake Error: Could not find cmake module file://Radimgws68/c$/Program
Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake
CMake Error: Could not find cmake module
file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Could not find cmake module file://Radimgws68/c$/Program
Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake
CMake Error: Could not find cmake module
file:X:/32Bit/VC.80/Qt/LungAnalysis/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: Could not find cmake module file://Radimgws68/c$/Program
Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeSystemSpecificInformation.cmake
CMake Error: Could not process cmake module
file://Radimgws68/c$/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake
CMake Error: Could not process cmake module
file://Radimgws68/c$/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/CMakeCXXInformation.cmake
Configuring incomplete, errors occurred!

-- 
John M. Drescher
___
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] [PATCH] bootstrap: Detect known C/C++ compiler toolchains

2010-07-06 Thread Brad King
On 07/03/2010 12:18 AM, Todd Gamblin wrote:
> This patch works on dawndev (BG/P FEN) at LLNL.

Great, thanks for testing.  I've published it to 'next':

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

-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] Is this page outdated? http://www.cmake.org/Wiki/BuildingWinDLL

2010-07-06 Thread David Cole
If you want the constructor exported, you should export the class (which
exports all of its public API), not a single function within the class.
Also, if you export a class, all of its parent classes should also be
exported.



On Tue, Jul 6, 2010 at 7:56 AM, Fred Fred  wrote:

>  Because I tried it but it did not work:
>   - the first error is due to this line:   static MYLIB_EXPORT
> vtkFiniteDifference *New();
> that is I followed the advice at the end of the cmake page:
> If you have some static functions then you will need something like the
> following:
>
> class MyStaticFunctionClass
> {
>   public:
> static MYLIB_EXPORT void MyExportedFunction(int i);
> };
>
> but it seems that it does not work with constructors since contructors do
> not have any return type.
>
> My CMakeFiles.txt looks like this:
>
> FIND_PACKAGE(ParaView REQUIRED)
> INCLUDE(${PARAVIEW_USE_FILE})
>
> ADD_LIBRARY(vtkFiniteDifference SHARED vtkFiniteDifference.cxx)
>
> # Add the new plugin in the MOSART submenu
> ADD_PARAVIEW_PLUGIN(FiniteDifference "1.0"
> SERVER_MANAGER_XML FiniteDifference.xml
> SERVER_MANAGER_SOURCES vtkFiniteDifference.cxx
> GUI_RESOURCE_FILES ../MOSART_GUI.xml)
>
> INCLUDE_DIRECTORIES(/Developpement/ParaView-3.8.0/VTK)
>
> Is there any redondancy between the ADD_LIBRARY and the ADD_PARAVIEW_PLUGIN
> lines?
>
> Any help?
>
>
> -- Build started: Project: FiniteDifference, Configuration: Release
> Win32 --
> Compiling...
> vtkFiniteDifferenceClientServer.cxx
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34)
> : error C2487: 'New' : member of dll interface class may not be declared
> with dll interface
> vtkFiniteDifference.cxx
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34)
> : error C2487: 'New' : member of dll interface class may not be declared
> with dll interface
> ..\vtkFiniteDifference.cxx(24) : warning C4273:
> 'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(29)
> : see previous definition of 'CollectRevisions'
> ..\vtkFiniteDifference.cxx(25) : warning C4273: 'vtkFiniteDifference::New'
> : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34)
> : see previous definition of 'New'
> ..\vtkFiniteDifference.cxx(28) : warning C4273:
> 'vtkFiniteDifference::vtkFiniteDifference' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(58)
> : see previous definition of '{ctor}'
> ..\vtkFiniteDifference.cxx(33) : warning C4273:
> 'vtkFiniteDifference::~vtkFiniteDifference' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(59)
> : see previous definition of '{dtor}'
> ..\vtkFiniteDifference.cxx(41) : warning C4273:
> 'vtkFiniteDifference::RequestData' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(61)
> : see previous definition of 'RequestData'
> ..\vtkFiniteDifference.cxx(124) : warning C4273:
> 'vtkFiniteDifference::SetAxis' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(51)
> : see previous definition of 'SetAxis'
> ..\vtkFiniteDifference.cxx(132) : warning C4273:
> 'vtkFiniteDifference::PrintSelf' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(30)
> : see previous definition of 'PrintSelf'
> Generating Code...
> Build log was saved at
> "file://c:\Developpement\ParaView_Plugins\FiniteDifference\PV\FiniteDifference.dir\Release\BuildLog.htm"
> FiniteDifference - 2 error(s), 7 warning(s)
> -- Build started: Project: vtkFiniteDifference, Configuration: Release
> Win32 --
> Compiling...
> vtkFiniteDifference.cxx
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34)
> : error C2487: 'New' : member of dll interface class may not be declared
> with dll interface
> ..\vtkFiniteDifference.cxx(24) : warning C4273:
> 'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(29)
> : see previous definition of 'CollectRevisions'
> ..\vtkFiniteDifference.cxx(25) : warning C4273: 'vtkFiniteDifference::New'
> : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34)
> : see previous definition of 'New'
> ..\vtkFiniteDifference.cxx(28) : warning C4273:
> 'vtkFiniteDifference::vtkFiniteDifference' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(58)
> : see previous definition of '{ctor}'
> ..\vtkFiniteDifference.cxx(33) : warning C4273:
> 'vtkFiniteDifference::~vtkFiniteDifference' : inconsistent dll linkage
>
> C:\Developpement\ParaView_Plugins\FiniteDifferen

Re: [CMake] Is this page outdated? http://www.cmake.org/Wiki/BuildingWinDLL

2010-07-06 Thread Michael Jackson
The wiki page you cite is still relevant for cmake/visual studio with  
shared libraries. You do NOT need this line in your CMakeLists.txt file:



ADD_LIBRARY(vtkFiniteDifference SHARED vtkFiniteDifference.cxx)


The ADD_PARAVIEW_PLUGIN should do that for you.

class MyStaticFunctionClass
{
public:
static VTK_EXPORT void MyExportedFunction(int i);
};
___
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio

Disclaimer: I originally wrote the wiki entry. If there _are_ problems  
with it then please let me know and I will fix the entry.


On Jul 6, 2010, at 7:56 AM, Fred Fred wrote:


Because I tried it but it did not work:
  - the first error is due to this line:   static MYLIB_EXPORT  
vtkFiniteDifference *New();

that is I followed the advice at the end of the cmake page:
If you have some static functions then you will need something like  
the following:


class MyStaticFunctionClass
{
  public:
static MYLIB_EXPORT void MyExportedFunction(int i);
};
but it seems that it does not work with constructors since  
contructors do not have any return type.


My CMakeFiles.txt looks like this:

FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

ADD_LIBRARY(vtkFiniteDifference SHARED vtkFiniteDifference.cxx)

# Add the new plugin in the MOSART submenu
ADD_PARAVIEW_PLUGIN(FiniteDifference "1.0"
SERVER_MANAGER_XML FiniteDifference.xml
SERVER_MANAGER_SOURCES vtkFiniteDifference.cxx
GUI_RESOURCE_FILES ../MOSART_GUI.xml)

INCLUDE_DIRECTORIES(/Developpement/ParaView-3.8.0/VTK)

Is there any redondancy between the ADD_LIBRARY and the  
ADD_PARAVIEW_PLUGIN lines?


Any help?


-- Build started: Project: FiniteDifference, Configuration:  
Release Win32 --

Compiling...
vtkFiniteDifferenceClientServer.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(34) : error C2487: 'New' : member of dll  
interface class may not be declared with dll interface

vtkFiniteDifference.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(34) : error C2487: 'New' : member of dll  
interface class may not be declared with dll interface
..\vtkFiniteDifference.cxx(24) : warning C4273:  
'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(29) : see previous definition of  
'CollectRevisions'
..\vtkFiniteDifference.cxx(25) : warning C4273:  
'vtkFiniteDifference::New' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(34) : see previous definition of 'New'
..\vtkFiniteDifference.cxx(28) : warning C4273:  
'vtkFiniteDifference::vtkFiniteDifference' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(58) : see previous definition of '{ctor}'
..\vtkFiniteDifference.cxx(33) : warning C4273:  
'vtkFiniteDifference::~vtkFiniteDifference' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(59) : see previous definition of '{dtor}'
..\vtkFiniteDifference.cxx(41) : warning C4273:  
'vtkFiniteDifference::RequestData' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(61) : see previous definition of 'RequestData'
..\vtkFiniteDifference.cxx(124) : warning C4273:  
'vtkFiniteDifference::SetAxis' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(51) : see previous definition of 'SetAxis'
..\vtkFiniteDifference.cxx(132) : warning C4273:  
'vtkFiniteDifference::PrintSelf' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(30) : see previous definition of 'PrintSelf'

Generating Code...
Build log was saved at "file://c:\Developpement\ParaView_Plugins 
\FiniteDifference\PV\FiniteDifference.dir\Release\BuildLog.htm"

FiniteDifference - 2 error(s), 7 warning(s)
-- Build started: Project: vtkFiniteDifference, Configuration:  
Release Win32 --

Compiling...
vtkFiniteDifference.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(34) : error C2487: 'New' : member of dll  
interface class may not be declared with dll interface
..\vtkFiniteDifference.cxx(24) : warning C4273:  
'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(29) : see previous definition of  
'CollectRevisions'
..\vtkFiniteDifference.cxx(25) : warning C4273:  
'vtkFiniteDifference::New' : inconsistent dll linkage
C:\Developpement\ParaView_Plugins\FiniteDifference 
\vtkFiniteDifference.h(34) : see previous definition o

[CMake] Is this page outdated? http://www.cmake.org/Wiki/BuildingWinDLL

2010-07-06 Thread Fred Fred

Because I tried it but it did not work:
  - the first error is due to this line:   static MYLIB_EXPORT 
vtkFiniteDifference *New();
that is I followed the advice at the end of the cmake page:
If you have some static functions then you will need something like 
the following: 



class MyStaticFunctionClass
{
  public:
static MYLIB_EXPORT void MyExportedFunction(int i);
};
but it seems that it does not work with constructors since contructors do not 
have any return type.

My CMakeFiles.txt looks like this:

FIND_PACKAGE(ParaView REQUIRED)
INCLUDE(${PARAVIEW_USE_FILE})

ADD_LIBRARY(vtkFiniteDifference SHARED vtkFiniteDifference.cxx)

# Add the new plugin in the MOSART submenu
ADD_PARAVIEW_PLUGIN(FiniteDifference "1.0"
SERVER_MANAGER_XML FiniteDifference.xml 
SERVER_MANAGER_SOURCES vtkFiniteDifference.cxx
GUI_RESOURCE_FILES ../MOSART_GUI.xml)

INCLUDE_DIRECTORIES(/Developpement/ParaView-3.8.0/VTK)

Is there any redondancy between the ADD_LIBRARY and the ADD_PARAVIEW_PLUGIN 
lines?

Any help?


-- Build started: Project: FiniteDifference, Configuration: Release Win32 
--
Compiling...
vtkFiniteDifferenceClientServer.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34) : 
error C2487: 'New' : member of dll interface class may not be declared with dll 
interface
vtkFiniteDifference.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34) : 
error C2487: 'New' : member of dll interface class may not be declared with dll 
interface
..\vtkFiniteDifference.cxx(24) : warning C4273: 
'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(29) : 
see previous definition of 'CollectRevisions'
..\vtkFiniteDifference.cxx(25) : warning C4273: 'vtkFiniteDifference::New' : 
inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34) : 
see previous definition of 'New'
..\vtkFiniteDifference.cxx(28) : warning C4273: 
'vtkFiniteDifference::vtkFiniteDifference' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(58) : 
see previous definition of '{ctor}'
..\vtkFiniteDifference.cxx(33) : warning C4273: 
'vtkFiniteDifference::~vtkFiniteDifference' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(59) : 
see previous definition of '{dtor}'
..\vtkFiniteDifference.cxx(41) : warning C4273: 
'vtkFiniteDifference::RequestData' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(61) : 
see previous definition of 'RequestData'
..\vtkFiniteDifference.cxx(124) : warning C4273: 'vtkFiniteDifference::SetAxis' 
: inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(51) : 
see previous definition of 'SetAxis'
..\vtkFiniteDifference.cxx(132) : warning C4273: 
'vtkFiniteDifference::PrintSelf' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(30) : 
see previous definition of 'PrintSelf'
Generating Code...
Build log was saved at 
"file://c:\Developpement\ParaView_Plugins\FiniteDifference\PV\FiniteDifference.dir\Release\BuildLog.htm"
FiniteDifference - 2 error(s), 7 warning(s)
-- Build started: Project: vtkFiniteDifference, Configuration: Release 
Win32 --
Compiling...
vtkFiniteDifference.cxx
C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34) : 
error C2487: 'New' : member of dll interface class may not be declared with dll 
interface
..\vtkFiniteDifference.cxx(24) : warning C4273: 
'vtkFiniteDifference::CollectRevisions' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(29) : 
see previous definition of 'CollectRevisions'
..\vtkFiniteDifference.cxx(25) : warning C4273: 'vtkFiniteDifference::New' : 
inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(34) : 
see previous definition of 'New'
..\vtkFiniteDifference.cxx(28) : warning C4273: 
'vtkFiniteDifference::vtkFiniteDifference' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(58) : 
see previous definition of '{ctor}'
..\vtkFiniteDifference.cxx(33) : warning C4273: 
'vtkFiniteDifference::~vtkFiniteDifference' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(59) : 
see previous definition of '{dtor}'
..\vtkFiniteDifference.cxx(41) : warning C4273: 
'vtkFiniteDifference::RequestData' : inconsistent dll linkage

C:\Developpement\ParaView_Plugins\FiniteDifference\vtkFiniteDifference.h(61) : 
see previous definition of 'RequestData'
..\vtkFiniteDifference.cxx(124) : warning C4273: 

Re: [CMake] Bug fix requests for the *next* release of CMake...

2010-07-06 Thread Aeschbacher, Fabrice
Hi,

I think the PROJECT_GROUP patch could be really nice for many of us:

http://public.kitware.com/Bug/view.php?id=3796

Best regards,
Fabrice Aeschbacher


Von: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] Im Auftrag von 
David Cole
Gesendet: Montag, 5. Juli 2010 20:31
An: cmake; cmake-develop...@cmake.org
Betreff: [CMake] Bug fix requests for the *next* release of CMake...

Hi all,

Now that we have released CMake 2.8.2 last Monday, and we have switched to this 
new workflow using branches in the git repository, *now* would be a great time 
to prioritize bug fixes for the next release of CMake.

We are leaning towards quarterly releases from now on, scheduling them every 3 
months. That would make the next release of CMake version 2.8.3 and scheduled 
to have an "rc1" release candidate in approximately mid-September, 2010.

If you have a particular issue that you think should be fixed for inclusion in 
2.8.3, please bring it up now. Ideally, each issue will be discussed as needed 
on the mailing list to come to any consensus about what should be done to fix 
it, and then an entry in the bug tracker may be used to keep it on the radar 
screen, and to track activity related to it.

Patches are always welcome. Patches that include testing of any new features, 
or tests that prove a bug is really fixed on the dashboards, basically any 
patch with testing is preferred over a patch with no testing. Also, if you are 
*adding* code, then you also probably need to add *tests* of that code, so that 
the coverage percentage stays as is or rises.

Please discuss issues here as needed, and add notes to existing issues in the 
bug tracker that you are interested in seeing fixed for 2.8.3 -- we will be 
looking at the mailing list and activity in the bug tracker to help prioritize 
the bug fixes that will occur in the next several weeks.


Thanks,
David Cole
Kitware, Inc.

___
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] Recursive list append

2010-07-06 Thread Diablo 666

> CMakeLists.txt:
> ###
> set(some_list val1 val2 val3)
> add_subdirectory(subdir)
> message(STATUS "some_list = ${some_list}")
> 
> subdir/CMakeLists.txt:
> ##
> # append in local scope
> list(APPEND some_list val4 val5 val6)
> # set in parent scope
> set(some_list "${some_list}" PARENT_SCOPE)


this is ugly. Really ugly. I like it :-D

Thanks a lot!
  
_
http://redirect.gimas.net/?n=M1007xHMTL4
Künftig E-Mails über Hotmail ohne Werbung versenden!___
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] cpack -C

2010-07-06 Thread Bo Thorsen

Den 01-07-2010 15:39, Bo Thorsen skrev:

When I give an argument to -C, can this be used in the INSTALL commands?


Not possible :( I have added a feature request here:

http://public.kitware.com/Bug/view.php?id=10940

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


Re: [CMake] Bug fix requests for the *next* release of CMake...

2010-07-06 Thread Bo Thorsen

Den 05-07-2010 20:31, David Cole skrev:

If you have a particular issue that you think should be fixed for
inclusion in 2.8.3, please bring it up now. Ideally, each issue will be
discussed as needed on the mailing list to come to any consensus about
what should be done to fix it, and then an entry in the bug tracker may
be used to keep it on the radar screen, and to track activity related to it.

Patches are always welcome. Patches that include testing of any new
features, or tests that prove a bug is really fixed on the dashboards,
basically any patch with testing is preferred over a patch with no
testing. Also, if you are *adding* code, then you also probably need to
add *tests* of that code, so that the coverage percentage stays as is or
rises.


I have added a feature request to have the WiX CPack generator patch 
included. It's here:


http://public.kitware.com/Bug/view.php?id=10939

I didn't write the bug, but I am considering a switch from NSIS to WiX 
for more power in the installer.



Please discuss issues here as needed, and add notes to existing issues
in the bug tracker that you are interested in seeing fixed for 2.8.3 --
we will be looking at the mailing list and activity in the bug tracker
to help prioritize the bug fixes that will occur in the next several weeks.


I have added a note for 2.8.3.

Cheers,

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


Re: [CMake] Recursive list append

2010-07-06 Thread Michael Wild

On 6. Jul, 2010, at 10:41 , Diablo 666 wrote:

> 
> If I use SET with PARENT_SCOPE, wouldn't this delete old entries? Say I have 
> more than one subdirectory. Can I append entries from both subdirectories 
> this way?


CMakeLists.txt:
###
set(some_list val1 val2 val3)
add_subdirectory(subdir)
message(STATUS "some_list = ${some_list}")

subdir/CMakeLists.txt:
##
# append in local scope
list(APPEND some_list val4 val5 val6)
# set in parent scope
set(some_list "${some_list}" PARENT_SCOPE)


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] Recursive list append

2010-07-06 Thread Diablo 666

If I use SET with PARENT_SCOPE, wouldn't this delete old entries? Say I have 
more than one subdirectory. Can I append entries from both subdirectories this 
way?
  
_
http://redirect.gimas.net/?n=M1007xHMTL4
Künftig E-Mails über Hotmail ohne Werbung versenden!___
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] Recursive list append

2010-07-06 Thread Michael Wild

On 6. Jul, 2010, at 10:06 , Diablo 666 wrote:

> 
> Hi,
> 
> say I create a list in the top level CMakeLists.txt and call a subdirectory. 
> The subdirectory should add some entries to the list, then the top level 
> should use the full list. How can I accomplish this?
> 
> Best regards,
> Andreas

Either use the PARENT_SCOPE option of the SET() command or, IMHO preferably, 
use a global property like this:

CMakeLists.txt:
###
set_property(GLOBAL PROPERTY some_super_property val1 val2 val3)
add_subdirectory(subdir)
get_property(some_super_list GLOBAL PROPERTY some_super_property)
message(STATUS "some_super_list = ${some_super_list}")

subdir/CMakeLists.txt:
##
set_property(GLOBAL APPEND PROPERTY some_super_property val4 val5 val6)


HTH

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] Recursive list append

2010-07-06 Thread Marcel Loose
Hi Andreas,

Use 'set(  PARENT_SCOPE])'. This will set the variable
in the scope directly above the current scope. Remember that each
add_subdirectory() will create a new scope.

HTH,
Marcel Loose.

On Tue, 2010-07-06 at 10:06 +0200, Diablo 666 wrote:
> Hi,
> 
> say I create a list in the top level CMakeLists.txt and call a
> subdirectory. The subdirectory should add some entries to the list,
> then the top level should use the full list. How can I accomplish
> this?
> 
> Best regards,
> Andreas
> 
> 
> __
> Räumen Sie Ihr Postfach auf - ganz einfach mit Hotmail!
> ___
> 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] Bug fix requests for the *next* release of CMake...

2010-07-06 Thread Marcel Loose
Here's my list of issues that I would like to see fixed.

0010771 FindMPI does not set all required compile flags - Modules -
2010-05-28 03:50 
0010335 FIND_XXX problem with symlinks when using ENV - CMake -
2010-02-26 08:42 
0010202 CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE weird behaviour -
CMake - 2010-01-29 05:55 
0010201 FindSubversion: new Subversion_WC_UPDATE macro - Modules -
2010-01-29 05:25 
0010200 FindSubversion: Subversion_WC_INFO macro should not do
SEND_ERROR - Modules - 2010-01-29 03:51 
0010199 FindSubversion: mismatch between code and documentation -
Modules - 2010-01-29 03:45 
0010198 FindSubversion does not always handle REQUIRED option correctly
- Modules - 2010-01-29 03:40 
0008466 Provide finer control than pass/fail for a test program - CTest
- 2009-09-15 03:57 

Best regards,
Marcel Loose.

On Mon, 2010-07-05 at 14:31 -0400, David Cole wrote:
> Hi all,
> 
> 
> Now that we have released CMake 2.8.2 last Monday, and we have
> switched to this new workflow using branches in the git repository,
> *now* would be a great time to prioritize bug fixes for the next
> release of CMake.
> 
> 
> We are leaning towards quarterly releases from now on, scheduling them
> every 3 months. That would make the next release of CMake version
> 2.8.3 and scheduled to have an "rc1" release candidate in
> approximately mid-September, 2010.
> 
> 
> If you have a particular issue that you think should be fixed for
> inclusion in 2.8.3, please bring it up now. Ideally, each issue will
> be discussed as needed on the mailing list to come to any consensus
> about what should be done to fix it, and then an entry in the bug
> tracker may be used to keep it on the radar screen, and to track
> activity related to it.
> 
> 
> Patches are always welcome. Patches that include testing of any new
> features, or tests that prove a bug is really fixed on the dashboards,
> basically any patch with testing is preferred over a patch with no
> testing. Also, if you are *adding* code, then you also probably need
> to add *tests* of that code, so that the coverage percentage stays as
> is or rises.
> 
> 
> Please discuss issues here as needed, and add notes to existing issues
> in the bug tracker that you are interested in seeing fixed for 2.8.3
> -- we will be looking at the mailing list and activity in the bug
> tracker to help prioritize the bug fixes that will occur in the next
> several weeks.
> 
> 
> 
> 
> Thanks,
> David Cole
> Kitware, Inc.
> 
> 
> ___
> 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