Re: [CMake] Fortran issue

2011-05-19 Thread Michael Hertling
On 05/19/2011 08:14 AM, AMARNATH, Balachandar wrote:
> Hi,
> 
> I am trying to build MPF package in windows using intel compilers and i end 
> up with the following error.
> 
> 
> ***Check for working Fortran compiler using: 
> Visual Studio 10
> Check for working C compiler using: Visual Studio 10
> Check for working C compiler using: Visual Studio 10 -- works
> Detecting C compiler ABI info
> Detecting C compiler ABI info - done
> Check for working Fortran compiler using: Visual Studio 10
> Check for working Fortran compiler using: Visual Studio 10 -- broken
> CMake Error at C:/Users/BAAMARNA5617/Programs/CMake 
> 2.8/share/cmake-2.8/Modules/CMakeTestFortranCompiler.cmake:40 (MESSAGE):
> The Fortran compiler "C:/Program
> Files/Intel/ComposerXE-2011/bin/ia32/ifort.exe" is not able to compile a
> simple test program.
> It fails with the following output:
> Change Dir: C:/Users/BAAMARNA5617/Projects/CMAKE/mpf_build/CMakeFiles/CMakeTmp
> Run Build Command:C:\WINNT\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
> cmTryCompileExec.vcxproj /p:Configuration=Debug
> Microsoft (R) Build Engine Version 4.0.30319.1
> [Microsoft .NET Framework, Version 4.0.30319.1]
> Copyright (C) Microsoft Corporation 2007. All rights reserved.
> Build started 19/05/2011 11:42:19.
> Project
> "C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
>  on node 1 (default targets).
> InitializeBuildStatus:
> Creating "cmTryCompileExec.dir\Debug\cmTryCompileExec.unsuccessfulbuild" 
> because "AlwaysCreate" was specified.
> ManifestResourceCompile:
> C:\Program Files\Microsoft SDKs\Windows\v7.0A\bin\rc.exe /nologo 
> /fo"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res" 
> cmTryCompileExec.dir\Debug\cmTryCompileExec_manifest.rc
> Link:
> C:\Program Files\Microsoft Visual Studio 10.0\VC\bin\link.exe 
> /ERRORREPORT:QUEUE 
> /OUT:"C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe"
>  /VERSION:"0.0" /INCREMENTAL /NOLOGO user32.lib /MANIFEST 
> /ManifestFile:"cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.intermediate.manifest"
>  /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEBUG 
> /PDB:"C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.pdb"
>  /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT 
> /IMPLIB:"C:/Users/BAAMARNA5617/Projects/CMAKE/mpf_build/CMakeFiles/CMakeTmp/Debug/cmTryCompileExec.lib"
>  /MACHINE:X86 
> cmTryCompileExec.dir\Debug\cmTryCompileExec.exe.embed.manifest.res /debug
> LINK : error LNK2001: unresolved external symbol _mainCRTStartup
> [C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe
> : fatal error LNK1120: 1 unresolved externals
> [C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> Done Building Project
> "C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default targets) -- FAILED.
> Build FAILED.
> "C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj"
> (default target) (1) ->
> (Link target) ->
> LINK : error LNK2001: unresolved external symbol _mainCRTStartup 
> [C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\Debug\cmTryCompileExec.exe
>  : fatal error LNK1120: 1 unresolved externals 
> [C:\Users\BAAMARNA5617\Projects\CMAKE\mpf_build\CMakeFiles\CMakeTmp\cmTryCompileExec.vcxproj]
> 0 Warning(s)
> 2 Error(s)
> Time Elapsed 00:00:00.35
> CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
> CMakeLists.txt:22 (project)
> Configuring incomplete, errors occurred!
> ***
> 
> Any hint in this error would be gr8 help. :)
> 
> 
> With thanks and regards
> Bala

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

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


Re: [CMake] Excluding definitions for source files

2011-05-19 Thread Andrea Galeazzi
No, you can only add the compile definitions to the other files. You 
should split all files into two lists and set the compile definition for 
unicode to just one.

Andrea
Il 19/05/2011 7.57, Robert Bielik ha scritto:

Robert Bielik skrev 2011-05-19 07:55:

Hi,

CMake 2.8.4 , MSVC generators:

I have a problem where I need to be able to select Unicode build or 
not, but at the same time 3 files of my project MUST NOT have
Unicode enabled. Is there a way to remove compile definitions for 
certain source files ?


Oh, and I cannot extract those 3 files into a separate static library 
as my project _is_ a static library that should have no extra

dependencies as viewed from including apps.

/Rob
___
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

__ Informazioni da ESET NOD32 Antivirus, versione del database 
delle firme digitali 6127 (20110516) __


Il messaggio è stato controllato da ESET NOD32 Antivirus.

www.nod32.it






___
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] BundleUtilities with MinGW under Windows

2011-05-19 Thread NoRulez
Sorry for the missing information.
I use CMake 2.8.4 and have also Visual Studio 2008 installed.

Best Regards

Am 19.05.2011 um 05:52 schrieb "Clinton Stimpson" :

> 
> What version of cmake?  I don't think that QtTest example worked until CMake 
> 2.8.3.
> 
> And you have dumpbin available on Windows from a Visual Studio installation?
> It might be nice to add support for mingw's objdump tool to find dependent 
> dlls.
> 
> Clint
> 
> On May 14, 2011, at 7:48 AM, NoRulez wrote:
> 
>> Hi @all,
>>  
>> does anyone get BundleUtilities working on Windows and could give me help?
>> I tried BundleUtilities under Windows, but the Qt dll’s (such as QtGui4.dll, 
>> …) and the MinGW dll’s (mingwm10.dll and libgcc_s_dw2-1.dll) are not 
>> packaged.
>>  
>> I also tried the following, but same problem here: 
>> http://www.vtk.org/Wiki/images/2/25/QtTest-Package-Example.zip
>>  
>> The following example does also not work on linux
>>  
>> Much thanks in advance
>>  
>> Best Regards
>> NoRulez
>>  
>> ___
>> 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
___
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] Excluding definitions for source files

2011-05-19 Thread Michael Hertling
On 05/19/2011 08:18 AM, Robert Bielik wrote:
> Robert Bielik skrev 2011-05-19 07:57:
>>> I have a problem where I need to be able to select Unicode build or not, 
>>> but at the same time 3 files of my project MUST NOT have
>>> Unicode enabled. Is there a way to remove compile definitions for certain 
>>> source files ?
>>
>> Oh, and I cannot extract those 3 files into a separate static library as my 
>> project _is_ a static library that should have no extra
>> dependencies as viewed from including apps.
> 
> Ok, I did it by set_source_files_properties (compile_definitions) on all 
> source files BUT the 3 I wanted in non-unicode always. Works fine,
> but it would be great with a remove_compile_definitions for 
> set_source_files_properties ? :)
> 
> Regards,
> /Rob

You might add "-UUNICODE" or the like to the affected files'
COMPILE_FLAGS source property; look at this CMakeLists.txt:

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(UNDEF C)
SET(CMAKE_VERBOSE_MAKEFILE ON)
FILE(WRITE ${CMAKE_BINARY_DIR}/f.c
"#ifdef UNICODE
#error \"No UNICODE, please!\"
#endif
void f(void){}
")
SET(UNICODE "UNICODE" CACHE STRING "")
SET_SOURCE_FILES_PROPERTIES(${CMAKE_BINARY_DIR}/f.c
PROPERTIES COMPILE_FLAGS -U${UNICODE})
ADD_DEFINITIONS(-DUNICODE)
ADD_LIBRARY(f STATIC f.c)
SET_TARGET_PROPERTIES(f PROPERTIES COMPILE_DEFINITIONS UNICODE)

The source file is compiled with two -DUNICODE definitions - due to
ADD_DEFINITIONS() and the COMPILE_DEFINITIONS target property - but
its compilation succeeds in spite of that because of the -UUNICODE
undefinition brought in by the file's COMPILE_FLAGS source property.
When reconfiguring with -DUNICODE=XYZ, e.g., you will probably see
the compilation fail.

However, this approach relies on:

1. The source file properties are placed at last on the command line.
   AFAIK, that's not explicitly assured, but reasonable since the
   source file properties are usually the most specific ones.
2. The last -D/-U switch for a preprocessor definition on the
   compiler's command line is the one being in effect. At least,
   GCC assures this: "-D and -U options are processed in the order
   they are given on the command line." and "-U name<\n> Cancel any
   previous definition of name,...".

'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] Incorrect extra MinGW link flags

2011-05-19 Thread Stiaan Gerber
Dear list

On Windows, MinGW (gcc 4.5.2), CMake 2.8.4.

I have a project building two executables. The first one builds correctly. On 
the second one it appears to me as though CMake adds flags to link to the 
standard MinGW libraries (mingw32, moldname, mingwex, ...) with an incorrect 
.lib suffix.  (See the output below) As far as I can tell this is totally 
unnecessary since these flags are automatically added by the gfortran compiler. 
So in the end I have -lmingw32.lib (presumably added by CMake, which fails) and 
-lmingw32 (automatically added by gfortran, which correctly links libmingw32.a)

My CMakelists file for the target CE_SEMFEM is
---
cmake_minimum_required (VERSION 2.8.4)
project (CE_SEMFEM Fortran)

set (CE_SRCS
src/CE_SEMFEM.f95
src/CE_config_module.f95
)

add_executable (CE_SEMFEM ${CE_SRCS})
target_link_libraries (CE_SEMFEM SEMFEM CE_FEMxml xmlparse)
---

The libraries SEMFEM, CE_FEMxml and xmlparse are built elsewhere in the project.

Ideas how I can fix this? Any help is much appreciated.

Stiaan

---
Linking Fortran executable CE_SEMFEM.exe
Driving: C:\MinGW\bin\gfortran.exe -v 
CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj 
CMakeFiles/CE_SEMFEM.dir/src/CE_con
fig_module.f95.obj -o CE_SEMFEM.exe 
-LC:\Loher_Berechner_repo\build\Utilities\xml_parser 
-LC:\Loher_Berechner_repo\build
\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW\lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc 
-Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib -L\M
inGW\lib ..\..\core\SEMFEM.lib 
..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a 
..\..\..\..\..\Utilities\xml_parser\li
bxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib -lmoldname.lib 
-lmingwex.lib -lmsvcrt.lib -luser32.lib -lkernel32.l
ib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib -lmingwex.lib 
-lmsvcrt.lib -lgfortran -shared-libgcc
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\gfortran.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure 
--enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --wi
th-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry 
--enable-libstdcxx-debug --enable-version-specific-r
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC)
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.
5.2/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.2/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../..
/../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../;/mingw/lib/
COLLECT_GCC_OPTIONS='-v' '-o' 'CE_SEMFEM.exe' 
'-LC:\Loher_Berechner_repo\build\Utilities\xml_parser' '-LC:\Loher_Berechn
er_repo\build\SEMFEM\trunk\SEMFEM\core' '-Lc:\MinGW\lib\gcc\mingw32\4.5.2' 
'-Lc:\MinGW\lib\gcc' '-Lc:\MinGW\mingw32\lib'
 '-Lc:\MinGW\lib' '-L\MinGW\lib' '-shared-libgcc' '-mtune=i386' '-march=i386'
 c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/collect2.exe -Bdynamic -u 
___register_frame_info -u ___deregister_frame_info
-o CE_SEMFEM.exe c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../crt2.o 
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o
-LC:\Loher_Berechner_repo\build\Utilities\xml_parser 
-LC:\Loher_Berechner_repo\build\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW
\lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib 
-L\MinGW\lib -Lc:/mingw/bin/../lib/gcc/m
ingw32/4.5.2 -Lc:/mingw/bin/../lib/gcc 
-Lc:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib 
-Lc:/mingw/bin/..
/lib/gcc/mingw32/4.5.2/../../.. -L/mingw/lib 
CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj CMakeFiles/CE_SEMFEM.dir/src
/CE_config_module.f95.obj ..\..\core\SEMFEM.lib 
..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a ..\..\..\..\..\Utilit
ies\xml_parser\libxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib 
-lmoldname.lib -lmingwex.lib -lmsvcrt.lib -luser32
.lib -lkernel32.lib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib 
-lmingwex.lib -lmsvcrt.lib -lgfortran -lmi
ngw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 
-ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmol
dname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtend.o
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot 
find -lmingw32.lib
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot 
find -lmoldname.lib
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot 
find -lmingwex.lib
c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe: cannot 
find -lmsvcrt.lib
c:/mingw/bin/../lib/gcc/mingw

[CMake] --start-group, --end-group

2011-05-19 Thread Anton Sibilev
Hello!
I'm wondering how I can use "--start-group archives --end-group"
linker flags with "Unix Makefiles".
May be somebody know the right way?
___
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] Which variable stores all (sub) directories added sofar?

2011-05-19 Thread J.S. van Bethlehem

Hello,

Given that CMake errs when you try to some sub-directory twice using 
add_subdirectory() I presume there is some variable that stores a list 
of the directories that were added to the build sofar. But I can't find 
the name of the variable. Does it exists (well... better would be: is it 
visible to users) and if so, what is it called?


Yours sinceryl,
Jakob

___
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] Which variable stores all (sub) directories added sofar?

2011-05-19 Thread Rolf Eike Beer
Am Donnerstag, 19. Mai 2011, 12:22:32 schrieb J.S. van Bethlehem:
> Hello,
> 
> Given that CMake errs when you try to some sub-directory twice using
> add_subdirectory() I presume there is some variable that stores a list
> of the directories that were added to the build sofar. But I can't find
> the name of the variable. Does it exists (well... better would be: is it
> visible to users) and if so, what is it called?

I don't know the answer to your question, but:

I use a global property to store the absolute path of all subdirectories added 
by a macro. If this macro encounters that the requested subdirectory is 
already in the list it simply does nothing.

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] Which variable stores all (sub) directories added sofar?

2011-05-19 Thread J.S. van Bethlehem

On 05/19/2011 12:47 PM, Rolf Eike Beer wrote:

Am Donnerstag, 19. Mai 2011, 12:22:32 schrieb J.S. van Bethlehem:

Hello,

Given that CMake errs when you try to some sub-directory twice using
add_subdirectory() I presume there is some variable that stores a list
of the directories that were added to the build sofar. But I can't find
the name of the variable. Does it exists (well... better would be: is it
visible to users) and if so, what is it called?

I don't know the answer to your question, but:

I use a global property to store the absolute path of all subdirectories added
by a macro. If this macro encounters that the requested subdirectory is
already in the list it simply does nothing.

Eike

Hello Eike,

Thanks a lot for your reply. I have actually been thinking in the same 
direction. I have one problem though: how can you make a truly global 
variable in CMake? Whenever you do something to a variable in a 
directory that is added using add_subdirectory(), those changes don't 
propagate to the current directory
(well, one could use the PARENT_SCOPE option to set() in the 
sub-directory, but then I won't be able to test that sub-directory 
seperately because then CMake will err that there is no such scope)


How do you deal with this?

Greetsz, Jakob

___
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] --start-group, --end-group

2011-05-19 Thread Michael Hertling
On 05/19/2011 11:11 AM, Anton Sibilev wrote:
> Hello!
> I'm wondering how I can use "--start-group archives --end-group"
> linker flags with "Unix Makefiles".
> May be somebody know the right way?

You might specify these flags immediately in TARGET_LINK_LIBRARIES():

CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
PROJECT(LINKERGROUPS C)
SET(CMAKE_VERBOSE_MAKEFILE ON)
FILE(WRITE ${CMAKE_BINARY_DIR}/f.c "void f(void){}\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/g1.c "void g1(void){}\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/g2.c "void g2(void){}\n")
FILE(WRITE ${CMAKE_BINARY_DIR}/h.c "void h(void){}\n")
ADD_LIBRARY(f STATIC f.c)
ADD_LIBRARY(g1 STATIC g1.c)
ADD_LIBRARY(g2 STATIC g2.c)
ADD_LIBRARY(h STATIC h.c)
FILE(WRITE ${CMAKE_BINARY_DIR}/main.c "int main(void){return 0;}\n")
ADD_EXECUTABLE(main main.c)
TARGET_LINK_LIBRARIES(main f -Wl,--start-group g1 g2 -Wl,--end-group h)

However, do you really need these flags? Refer to the target properties
[IMPORTED_]LINK_INTERFACE_MULTIPLICITY[_] and the documentation
of TARGET_LINK_LIBRARIES().

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


Re: [CMake] Forcing CMake to never search install path

2011-05-19 Thread Michael Hertling
On 05/16/2011 10:08 PM, Clifford Yapp wrote:
> On Mon, May 16, 2011 at 4:00 PM, Alexander Neundorf
>  wrote:
> 
>> So you basically want an opposite to HINTS and PATHS, like e.g. EXCLUDE ?
>> Doesn't sound too bad.
> 
> Yes, that would work - ideally though I'd like to EXCLUDE the path
> from ALL finds by defining it once in the CMakeLists.txt file, instead
> of per-find-command.
> 
>> If you know where your stuff will be, you could also use NO_DEFAULT_PATH and
>> the add all the valid options for your case yourself.
> 
> Unfortunately, it's not that restricted.  I do need to search
> "normally", but I need to do so WITHOUT returning the stale results in
> an old install directory.
> 
> Cheers,
> CY

Have you already tried the CMAKE_[SYSTEM_]IGNORE_PATH variables? At
the first glance, they provide exactly the functionality you need.

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


Re: [CMake] Fortran issue

2011-05-19 Thread Bill Hoffman

On 5/19/2011 3:05 AM, Michael Hertling wrote:


Any hint in this error would be gr8 help. :)


With thanks and regards
Bala


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


Should be fixed:

http://www.cmake.org/pipermail/cmake/2011-May/044408.html

If you grab the nightly build it should work now.

http://www.cmake.org/files/dev/

-Bill
___
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] many false positives in ctest error/warning reporting

2011-05-19 Thread Matthias Kretz
Hi,

On Tuesday 10 May 2011 21:47:41 Alexander Neundorf wrote:
> Are you using cmake >= 2.8 ?
> If so, there the switch CTEST_USE_LAUNCHERS. If this is set in your ctest-
> script, the output parsing works better.

After I set CTEST_USE_LAUNCHERS (I didn't change anything else at the same 
time), all warnings and errors are suppressed. I.e. the dashboard sees 0 
warnings and 0 errors on every build now. Which is clearly wrong.

Can you give me a hint how to debug this? You can find the ctest debug output 
of a run with lots of warnings and errors at http://compeng.uni-
frankfurt.de/~kretz/ctest-debug.log

Cheers,
Matthias

-- 

Matthias Kretz (Germany)<><
http://kretzfamily.de/
___
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] --start-group, --end-group

2011-05-19 Thread gekso
Thanks, Michael. TARGET_LINK_LIBRARIES and link flags work fine!

2011/5/19 Michael Hertling :
> On 05/19/2011 11:11 AM, Anton Sibilev wrote:
>> Hello!
>> I'm wondering how I can use "--start-group archives --end-group"
>> linker flags with "Unix Makefiles".
>> May be somebody know the right way?
>
> You might specify these flags immediately in TARGET_LINK_LIBRARIES():
>
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR)
> PROJECT(LINKERGROUPS C)
> SET(CMAKE_VERBOSE_MAKEFILE ON)
> FILE(WRITE ${CMAKE_BINARY_DIR}/f.c "void f(void){}\n")
> FILE(WRITE ${CMAKE_BINARY_DIR}/g1.c "void g1(void){}\n")
> FILE(WRITE ${CMAKE_BINARY_DIR}/g2.c "void g2(void){}\n")
> FILE(WRITE ${CMAKE_BINARY_DIR}/h.c "void h(void){}\n")
> ADD_LIBRARY(f STATIC f.c)
> ADD_LIBRARY(g1 STATIC g1.c)
> ADD_LIBRARY(g2 STATIC g2.c)
> ADD_LIBRARY(h STATIC h.c)
> FILE(WRITE ${CMAKE_BINARY_DIR}/main.c "int main(void){return 0;}\n")
> ADD_EXECUTABLE(main main.c)
> TARGET_LINK_LIBRARIES(main f -Wl,--start-group g1 g2 -Wl,--end-group h)
>
> However, do you really need these flags? Refer to the target properties
> [IMPORTED_]LINK_INTERFACE_MULTIPLICITY[_] and the documentation
> of TARGET_LINK_LIBRARIES().
>
> 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
>
___
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] Which variable stores all (sub) directories added sofar?

2011-05-19 Thread Eric Noulard
2011/5/19 J.S. van Bethlehem :
>
> Hello Eike,
>
> Thanks a lot for your reply. I have actually been thinking in the same
> direction. I have one problem though: how can you make a truly global
> variable in CMake? Whenever you do something to a variable in a directory
> that is added using add_subdirectory(), those changes don't propagate to the
> current directory
> (well, one could use the PARENT_SCOPE option to set() in the sub-directory,
> but then I won't be able to test that sub-directory seperately because then
> CMake will err that there is no such scope)
>
> How do you deal with this?

I think, that's why Eike uses **property** and not variable.

Property may be at "GLOBAL" scope:

set_property(
  [APPEND]
  PROPERTY  [value1 [value2 ...]])

   Set one property on zero or more objects of a scope.  The first
   argument determines the scope in which the property is set.  It must
   be one of the following:

   GLOBAL scope is unique and does not accept a name.
...
-- 
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] Incorrect extra MinGW link flags

2011-05-19 Thread Yuri Timenkov
May be you should use Cygwin build of CMake?

On Thu, May 19, 2011 at 12:46 PM, Stiaan Gerber  wrote:

>  Dear list
>
> On Windows, MinGW (gcc 4.5.2), CMake 2.8.4.
>
> I have a project building two executables. The first one builds correctly.
> On the second one it appears to me as though CMake adds flags to link to the
> standard MinGW libraries (mingw32, moldname, mingwex, ...) with an incorrect
> .lib suffix.  (See the output below) As far as I can tell this is totally
> unnecessary since these flags are automatically added by the gfortran
> compiler. So in the end I have -lmingw32.lib (presumably added by CMake,
> which fails) and -lmingw32 (automatically added by gfortran, which correctly
> links libmingw32.a)
>
> My CMakelists file for the target CE_SEMFEM is
>
> ---
> cmake_minimum_required (VERSION 2.8.4)
> project (CE_SEMFEM Fortran)
>
> set (CE_SRCS
> src/CE_SEMFEM.f95
> src/CE_config_module.f95
> )
>
> add_executable (CE_SEMFEM ${CE_SRCS})
> target_link_libraries (CE_SEMFEM SEMFEM CE_FEMxml xmlparse)
>
> ---
>
> The libraries SEMFEM, CE_FEMxml and xmlparse are built elsewhere in the
> project.
>
> Ideas how I can fix this? Any help is much appreciated.
>
> Stiaan
>
>
> ---
> Linking Fortran executable CE_SEMFEM.exe
> Driving: C:\MinGW\bin\gfortran.exe -v
> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
> CMakeFiles/CE_SEMFEM.dir/src/CE_con
> fig_module.f95.obj -o CE_SEMFEM.exe
> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
> -LC:\Loher_Berechner_repo\build
> \SEMFEM\trunk\SEMFEM\core -Lc:\MinGW\lib\gcc\mingw32\4.5.2
> -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib -L\M
> inGW\lib ..\..\core\SEMFEM.lib
> ..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a
> ..\..\..\..\..\Utilities\xml_parser\li
> bxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib -lmoldname.lib
> -lmingwex.lib -lmsvcrt.lib -luser32.lib -lkernel32.l
> ib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib -lmingwex.lib
> -lmsvcrt.lib -lgfortran -shared-libgcc
> Using built-in specs.
> COLLECT_GCC=C:\MinGW\bin\gfortran.exe
>
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
> Target: mingw32
> Configured with: ../gcc-4.5.2/configure
> --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
> --wi
> th-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
> --enable-libstdcxx-debug --enable-version-specific-r
> untime-libs --disable-werror --build=mingw32 --prefix=/mingw
> Thread model: win32
> gcc version 4.5.2 (GCC)
>
> COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.
> 5.2/../../../../mingw32/bin/
>
> LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.2/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../..
>
> /../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../;/mingw/lib/
> COLLECT_GCC_OPTIONS='-v' '-o' 'CE_SEMFEM.exe'
> '-LC:\Loher_Berechner_repo\build\Utilities\xml_parser' '-LC:\Loher_Berechn
> er_repo\build\SEMFEM\trunk\SEMFEM\core' '-Lc:\MinGW\lib\gcc\mingw32\4.5.2'
> '-Lc:\MinGW\lib\gcc' '-Lc:\MinGW\mingw32\lib'
>  '-Lc:\MinGW\lib' '-L\MinGW\lib' '-shared-libgcc' '-mtune=i386'
> '-march=i386'
>  c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/collect2.exe -Bdynamic -u
> ___register_frame_info -u ___deregister_frame_info
> -o CE_SEMFEM.exe c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../crt2.o
> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o
> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
> -LC:\Loher_Berechner_repo\build\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW
> \lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib
> -Lc:\MinGW\lib -L\MinGW\lib -Lc:/mingw/bin/../lib/gcc/m
> ingw32/4.5.2 -Lc:/mingw/bin/../lib/gcc
> -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib
> -Lc:/mingw/bin/..
> /lib/gcc/mingw32/4.5.2/../../.. -L/mingw/lib
> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj CMakeFiles/CE_SEMFEM.dir/src
> /CE_config_module.f95.obj ..\..\core\SEMFEM.lib
> ..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a ..\..\..\..\..\Utilit
> ies\xml_parser\libxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib
> -lmoldname.lib -lmingwex.lib -lmsvcrt.lib -luser32
> .lib -lkernel32.lib -ladvapi32.lib -lshell32.lib -lmingw32.lib
> -lmoldname.lib -lmingwex.lib -lmsvcrt.lib -lgfortran -lmi
> ngw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32
> -ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmol
> dname -lmingwex -lmsvcrt c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtend.o
> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/bin/ld.exe:
> cannot find -lmingw32.lib
> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../..

[CMake] CMake and VS2010

2011-05-19 Thread LaViolette, Alan
I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 

___
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 and VS2010

2011-05-19 Thread David Cole
Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.


On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan <
alaviole...@overwatch.textron.com> wrote:

> I am working on converting to Visual Studio 2010 and the solution file that
> CMake generates does not have any of the target marked for build.   I have
> to open up the “Configuration Manager” and select the build box for all my
> projects.
>
>
>
> When I save the modified solution back out I get additional
> “Debug|Win32.Build.0 = Debug|Win32” lines for all my projects.
>
>
>
>
>
> Is this a CMake/Visual Studio configuration error on my part or an issue
> with CMake solution generation?
>
>
>
> Thanks,
>
> Alan
>
>
>
>
>
> ___
> 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] Multiarch support

2011-05-19 Thread Andreas Heck

Thanks Daniel.

Patched version works for me.

Regards

Am 18.05.2011 23:28, schrieb Daniel Pfeifer:

Am Mittwoch, den 18.05.2011, 23:02 +0200 schrieb Andreas Heck:

Hey guys,

does anyone knows if there exists a patched version of 2.8.4 with
debians new multiarch support?
Ubuntu natty is the first system which uses this kind of structure.

Hi Andreas,

for ubuntu maverick and natty, a patched version of CMake 2.8.4 can be
installed from my PPA: https://launchpad.net/~purplekarrot/+archive/ppa

There is a lot of other stuff inside this PPA that you probably do not
want (eg a modularized build of the boost trunk). If there is enough
interest, I will create a PPA dedicated to CMake.

cheers, Daniel




___
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] BundleUtilities with MinGW under Windows

2011-05-19 Thread clinton

And what error messages are you getting?

Clint

- Original Message -
> Sorry for the missing information.
> I use CMake 2.8.4 and have also Visual Studio 2008 installed.
> 
> 
> Best Regards
> 
> Am 19.05.2011 um 05:52 schrieb "Clinton Stimpson" <
> clin...@elemtech.com >:
> 
> 
> 
> 
> 
> 
> 
> 
> What version of cmake?  I don't think that QtTest example worked until
> CMake 2.8.3.
> 
> 
> And you have dumpbin available on Windows from a Visual Studio
> installation?
> It might be nice to add support for mingw's objdump tool to find
> dependent dlls.
> 
> 
> Clint
> 
> 
> On May 14, 2011, at 7:48 AM, NoRulez wrote:
> 
> 
> 
> 
> 
> Hi @all,
>  
> does anyone get BundleUtilities working on Windows and could give me
> help?
> I tried BundleUtilities under Windows, but the Qt dll’s (such as
> QtGui4.dll, …) and the MinGW dll’s (mingwm10.dll and
> libgcc_s_dw2-1.dll) are not packaged.
>  
> I also tried the following, but same problem here:  
> http://www.vtk.org/Wiki/images/2/25/QtTest-Package-Example.zip
>  
> The following example does also not work on linux
>  
> Much thanks in advance
>  
> Best Regards
> NoRulez
>   ___
> 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
___
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] Updated: CMake 2.8.2-1

2011-05-19 Thread Bill Hoffman

CMake 2.8.4-1  is now available on Cygwin mirrors.


Here are the changes for CMake 2.8.4:


Alex Neundorf (1):
  Fix crash in GraphVizWriter when GRAPHVIZ_TARGET_IGNORE_REGEX is used

Andreas Schneider (1):
  FindPerlLibs: Add notice of copyright

Brad King (3):
  libarchive: Define major/minor/makedev only where needed (#11648)
  libarchive: Use OpenSSL only if CMAKE_USE_OPENSSL (#11815)
  Fix documentation of MSVC_VERSION (#11833)

David Cole (1):
  Silence the may be used uninitialized warnings: initialize stuff.

Eric NOULARD (2):
  CPack   Tests the different ways of packaging components
  Avoid foreach IN LISTS syntax which is not supported by CMake 2.6

Changes in CMake 2.8.4-rc2 (since 2.8.4-rc1)

Alex Neundorf (3):
  Make cmake build again with cmake < 2.6.3
  Strip trailing whitespace.
  Fix parsing of compiler name with a version number

Ben Boeckel (86):
  ... 86 commit messages summarized as:
  Fix ADD_TEST regression when WORKING_DIRECTORY not given
  Add new "strict-mode" CMake variable checking
  Activate / avoid using new command line arguments:
--warn-uninitialized
--warn-unused-vars
--no-warn-unused-cli
--check-system-vars

Bill Hoffman (3):
  For macros make sure the FilePath points to a valid pointer in 
the args.

  Add a warning when variables are used uninitialized.
  Make --strict-mode option, and integrate with cmake-gui

Brad King (34):
  bootstrap: Granular system library selection (#11431)
  bootstrap: Clarify --init flag documentation (#11431)
  bootstrap: --verbose implies verbose Makefiles (#11708)
  Combine duplicate COMPILE_DEFINITIONS disclaimer
  Document COMPILE_DEFINITIONS known limitations (#11660, #11712)
  Document try_compile behavior more clearly (#11688)
  Document Check(C|CXX)SourceCompiles behavior more clearly (#11688)
  Fix get_(cmake|test)_property documentation (#11703)
  Reference get_property() from old get_*_property() commands
  Replace misleading example in the if() documentation (#10773)
  Clarify auto-dereference cases in if() command (#11701)
  Document CheckFunctionExists more clearly (#10044)
  Document CheckSymbolExists more clearly (#11685)
  Update CheckSymbolExists copyright year
  Report directory with missing source file (#11677)
  Test that missing source mentions directory (#11677)
  Teach Simple_Mingw_Linux2Win test to use windres
  Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
  libarchive: Fix major() check for LSB 4.0 (#11648)
  Xcode: Make generation depend on all input directories
  Recognize SCO UnixWare C/C++ compilers (#11700)
  Factor SCO compiler info out of platform file (#11700)
  Honor CMAKE_TRY_COMPILE_CONFIGURATION in Makefile generators (#10809)
  Document CMAKE_TRY_COMPILE_CONFIGURATION variable
  Honor VS_SCC_* properties in Fortran targets (#10237)
  Normalize slashes in scanned #include lines (#10281)
  Improve try_compile and try_run error messages
  Use shortest extension to verify try_compile language (#11731)
  Modules: Include builtin FindPackageHandleStandardArgs directly
  Fix relative CMAKE_USER_MAKE_RULES_OVERRIDE (#11725)
  Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
  Always place try_compile executables predictably (#11724)
  try_compile: Allow only languages loaded in caller (#11469)
  Fix ArgumentExpansion test expected results

Clinton Stimpson (1):
  Replace exec_program with execute_process for qmake queries.

David Cole (16):
  Update script with new machine name
  VS10: Fix problems with InstallRequiredSystemLibraries.
  Add CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS variable
  Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
  Xcode: Disable implicit make rules in custom rules makefiles.
  Add freeglut as library name (#10031)
  Add new names for PNG and ZLIB libraries
  Avoid exceptions when ccmake terminal window is too small (#11668)
  VS10: Load projects with obj "source" files (#11147)
  VS10: Enable using devenv as CMAKE_MAKE_PROGRAM (#11459)
  Xcode: Fix crash: avoid strlen call on NULL char *
  CTestTest2: Avoid running purify unless requested
  VS10: Escape double quote chars in defines for rc files (#11695)
  Fix line too long KWStyle issue (#11695)
  Avoid space in rc /D values for VS6 and Cygwin (#11695)
  VSResource: Avoid windres /D with quoted spaces (#11695)

Marcus D. Hanwell (1):
  Bug #11715 - generate header in the build tree.

Nicolas Despres (1):
  bootstrap: Add --enable-ccache option (#11707)

Changes in CMake 2.8.4-rc1 (since 2.8.3)

Alex Neundorf (32):
  Add support for nasm assembler, patch b

[CMake] Updated: CMake 2.8.4-1

2011-05-19 Thread Bill Hoffman

CMake 2.8.4-1  is now available on Cygwin mirrors.


Here are the changes for CMake 2.8.4:


Alex Neundorf (1):
  Fix crash in GraphVizWriter when GRAPHVIZ_TARGET_IGNORE_REGEX is used

Andreas Schneider (1):
  FindPerlLibs: Add notice of copyright

Brad King (3):
  libarchive: Define major/minor/makedev only where needed (#11648)
  libarchive: Use OpenSSL only if CMAKE_USE_OPENSSL (#11815)
  Fix documentation of MSVC_VERSION (#11833)

David Cole (1):
  Silence the may be used uninitialized warnings: initialize stuff.

Eric NOULARD (2):
  CPack   Tests the different ways of packaging components
  Avoid foreach IN LISTS syntax which is not supported by CMake 2.6

Changes in CMake 2.8.4-rc2 (since 2.8.4-rc1)

Alex Neundorf (3):
  Make cmake build again with cmake < 2.6.3
  Strip trailing whitespace.
  Fix parsing of compiler name with a version number

Ben Boeckel (86):
  ... 86 commit messages summarized as:
  Fix ADD_TEST regression when WORKING_DIRECTORY not given
  Add new "strict-mode" CMake variable checking
  Activate / avoid using new command line arguments:
--warn-uninitialized
--warn-unused-vars
--no-warn-unused-cli
--check-system-vars

Bill Hoffman (3):
  For macros make sure the FilePath points to a valid pointer in 
the args.

  Add a warning when variables are used uninitialized.
  Make --strict-mode option, and integrate with cmake-gui

Brad King (34):
  bootstrap: Granular system library selection (#11431)
  bootstrap: Clarify --init flag documentation (#11431)
  bootstrap: --verbose implies verbose Makefiles (#11708)
  Combine duplicate COMPILE_DEFINITIONS disclaimer
  Document COMPILE_DEFINITIONS known limitations (#11660, #11712)
  Document try_compile behavior more clearly (#11688)
  Document Check(C|CXX)SourceCompiles behavior more clearly (#11688)
  Fix get_(cmake|test)_property documentation (#11703)
  Reference get_property() from old get_*_property() commands
  Replace misleading example in the if() documentation (#10773)
  Clarify auto-dereference cases in if() command (#11701)
  Document CheckFunctionExists more clearly (#10044)
  Document CheckSymbolExists more clearly (#11685)
  Update CheckSymbolExists copyright year
  Report directory with missing source file (#11677)
  Test that missing source mentions directory (#11677)
  Teach Simple_Mingw_Linux2Win test to use windres
  Disable SubDirSpaces parens with GNU Make 3.82 (#11654)
  libarchive: Fix major() check for LSB 4.0 (#11648)
  Xcode: Make generation depend on all input directories
  Recognize SCO UnixWare C/C++ compilers (#11700)
  Factor SCO compiler info out of platform file (#11700)
  Honor CMAKE_TRY_COMPILE_CONFIGURATION in Makefile generators (#10809)
  Document CMAKE_TRY_COMPILE_CONFIGURATION variable
  Honor VS_SCC_* properties in Fortran targets (#10237)
  Normalize slashes in scanned #include lines (#10281)
  Improve try_compile and try_run error messages
  Use shortest extension to verify try_compile language (#11731)
  Modules: Include builtin FindPackageHandleStandardArgs directly
  Fix relative CMAKE_USER_MAKE_RULES_OVERRIDE (#11725)
  Clarify CMAKE_USER_MAKE_RULES_OVERRIDE documentation (#11724)
  Always place try_compile executables predictably (#11724)
  try_compile: Allow only languages loaded in caller (#11469)
  Fix ArgumentExpansion test expected results

Clinton Stimpson (1):
  Replace exec_program with execute_process for qmake queries.

David Cole (16):
  Update script with new machine name
  VS10: Fix problems with InstallRequiredSystemLibraries.
  Add CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_NO_WARNINGS variable
  Add CPACK_NSIS_INSTALL_ROOT for CMake's own installer (#9148)
  Xcode: Disable implicit make rules in custom rules makefiles.
  Add freeglut as library name (#10031)
  Add new names for PNG and ZLIB libraries
  Avoid exceptions when ccmake terminal window is too small (#11668)
  VS10: Load projects with obj "source" files (#11147)
  VS10: Enable using devenv as CMAKE_MAKE_PROGRAM (#11459)
  Xcode: Fix crash: avoid strlen call on NULL char *
  CTestTest2: Avoid running purify unless requested
  VS10: Escape double quote chars in defines for rc files (#11695)
  Fix line too long KWStyle issue (#11695)
  Avoid space in rc /D values for VS6 and Cygwin (#11695)
  VSResource: Avoid windres /D with quoted spaces (#11695)

Marcus D. Hanwell (1):
  Bug #11715 - generate header in the build tree.

Nicolas Despres (1):
  bootstrap: Add --enable-ccache option (#11707)

Changes in CMake 2.8.4-rc1 (since 2.8.3)

Alex Neundorf (32):
  Add support for nasm assembler, patch b

Re: [CMake] Incorrect extra MinGW link flags

2011-05-19 Thread Stiaan Gerber
On 19/05/11 14:41, Yuri Timenkov wrote:
> May be you should use Cygwin build of CMake?
>
> On Thu, May 19, 2011 at 12:46 PM, Stiaan Gerber  > wrote:
>
> Dear list
>  
> On Windows, MinGW (gcc 4.5.2), CMake 2.8.4.
>  
> I have a project building two executables. The first one builds
> correctly. On the second one it appears to me as though CMake adds
> flags to link to the standard MinGW libraries (mingw32, moldname,
> mingwex, ...) with an incorrect .lib suffix.  (See the output
> below) As far as I can tell this is totally unnecessary since
> these flags are automatically added by the gfortran compiler. So
> in the end I have -lmingw32.lib (presumably added by CMake, which
> fails) and -lmingw32 (automatically added by gfortran, which
> correctly links libmingw32.a)
>  
> My CMakelists file for the target CE_SEMFEM is
> 
> ---
> cmake_minimum_required (VERSION 2.8.4)
> project (CE_SEMFEM Fortran)
>  
> set (CE_SRCS
> src/CE_SEMFEM.f95
> src/CE_config_module.f95
> )
>  
> add_executable (CE_SEMFEM ${CE_SRCS})
> target_link_libraries (CE_SEMFEM SEMFEM CE_FEMxml xmlparse)
> 
> ---
>  
> The libraries SEMFEM, CE_FEMxml and xmlparse are built elsewhere
> in the project.
>  
> Ideas how I can fix this? Any help is much appreciated.
>  
> Stiaan
>  
> 
> ---
> Linking Fortran executable CE_SEMFEM.exe
> Driving: C:\MinGW\bin\gfortran.exe -v
> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
> CMakeFiles/CE_SEMFEM.dir/src/CE_con
> fig_module.f95.obj -o CE_SEMFEM.exe
> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
> -LC:\Loher_Berechner_repo\build
> \SEMFEM\trunk\SEMFEM\core -Lc:\MinGW\lib\gcc\mingw32\4.5.2
> -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib -L\M
> inGW\lib ..\..\core\SEMFEM.lib
> ..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a
> ..\..\..\..\..\Utilities\xml_parser\li
> bxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib
> -lmoldname.lib -lmingwex.lib -lmsvcrt.lib -luser32.lib -lkernel32.l
> ib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib
> -lmingwex.lib -lmsvcrt.lib -lgfortran -shared-libgcc
> Using built-in specs.
> COLLECT_GCC=C:\MinGW\bin\gfortran.exe
> 
> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
> Target: mingw32
> Configured with: ../gcc-4.5.2/configure
> --enable-languages=c,c++,ada,fortran,objc,obj-c++
> --disable-sjlj-exceptions --wi
> th-dwarf2 --enable-shared --enable-libgomp
> --disable-win32-registry --enable-libstdcxx-debug
> --enable-version-specific-r
> untime-libs --disable-werror --build=mingw32 --prefix=/mingw
> Thread model: win32
> gcc version 4.5.2 (GCC)
> 
> COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.
> 5.2/../../../../mingw32/bin/
> 
> LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.2/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../..
> 
> /../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../;/mingw/lib/
> COLLECT_GCC_OPTIONS='-v' '-o' 'CE_SEMFEM.exe'
> '-LC:\Loher_Berechner_repo\build\Utilities\xml_parser'
> '-LC:\Loher_Berechn
> er_repo\build\SEMFEM\trunk\SEMFEM\core'
> '-Lc:\MinGW\lib\gcc\mingw32\4.5.2' '-Lc:\MinGW\lib\gcc'
> '-Lc:\MinGW\mingw32\lib'
>  '-Lc:\MinGW\lib' '-L\MinGW\lib' '-shared-libgcc' '-mtune=i386'
> '-march=i386'
>  c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/collect2.exe -Bdynamic
> -u ___register_frame_info -u ___deregister_frame_info
> -o CE_SEMFEM.exe
> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../crt2.o
> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o
> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
> -LC:\Loher_Berechner_repo\build\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW
> \lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib
> -Lc:\MinGW\lib -L\MinGW\lib -Lc:/mingw/bin/../lib/gcc/m
> ingw32/4.5.2 -Lc:/mingw/bin/../lib/gcc
> -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib
> -Lc:/mingw/bin/..
> /lib/gcc/mingw32/4.5.2/../../.. -L/mingw/lib
> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
> CMakeFiles/CE_SEMFEM.dir/src
> /CE_config_module.f95.obj ..\..\core\SEMFEM.lib
> ..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a
> ..\..\..\..\..\Utilit
> ies\xml_parser\libxmlparse.a C:\MPICH2\lib\fmpich2g.lib
> -lmingw32.lib -lmoldname.lib -lmingwe

Re: [CMake] Incorrect extra MinGW link flags

2011-05-19 Thread Yuri Timenkov
Sorry, usually there are errors when trying to generate project under
cygwin, but cmake uses backslashes.

Then I suggest looking at xmlparse and CE_FEMxml dependencies. Because
they're static libraries, CMake adds all their dependencies into link
command.
You can also check CMake's advanced variables and files in CMakeFiles. There
information about system is kept (along with linker and compiler's command
line templates).

On Thu, May 19, 2011 at 6:55 PM, Stiaan Gerber  wrote:

>  On 19/05/11 14:41, Yuri Timenkov wrote:
>
> May be you should use Cygwin build of CMake?
>
> On Thu, May 19, 2011 at 12:46 PM, Stiaan Gerber  wrote:
>
>>  Dear list
>>
>> On Windows, MinGW (gcc 4.5.2), CMake 2.8.4.
>>
>> I have a project building two executables. The first one builds correctly.
>> On the second one it appears to me as though CMake adds flags to link to the
>> standard MinGW libraries (mingw32, moldname, mingwex, ...) with an incorrect
>> .lib suffix.  (See the output below) As far as I can tell this is totally
>> unnecessary since these flags are automatically added by the gfortran
>> compiler. So in the end I have -lmingw32.lib (presumably added by CMake,
>> which fails) and -lmingw32 (automatically added by gfortran, which correctly
>> links libmingw32.a)
>>
>> My CMakelists file for the target CE_SEMFEM is
>>
>> ---
>> cmake_minimum_required (VERSION 2.8.4)
>> project (CE_SEMFEM Fortran)
>>
>> set (CE_SRCS
>> src/CE_SEMFEM.f95
>> src/CE_config_module.f95
>> )
>>
>> add_executable (CE_SEMFEM ${CE_SRCS})
>> target_link_libraries (CE_SEMFEM SEMFEM CE_FEMxml xmlparse)
>>
>> ---
>>
>> The libraries SEMFEM, CE_FEMxml and xmlparse are built elsewhere in the
>> project.
>>
>> Ideas how I can fix this? Any help is much appreciated.
>>
>> Stiaan
>>
>>
>> ---
>> Linking Fortran executable CE_SEMFEM.exe
>> Driving: C:\MinGW\bin\gfortran.exe -v
>> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj
>> CMakeFiles/CE_SEMFEM.dir/src/CE_con
>> fig_module.f95.obj -o CE_SEMFEM.exe
>> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
>> -LC:\Loher_Berechner_repo\build
>> \SEMFEM\trunk\SEMFEM\core -Lc:\MinGW\lib\gcc\mingw32\4.5.2
>> -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib -Lc:\MinGW\lib -L\M
>> inGW\lib ..\..\core\SEMFEM.lib
>> ..\..\..\..\..\Utilities\xml_parser\libCE_FEMxml.a
>> ..\..\..\..\..\Utilities\xml_parser\li
>> bxmlparse.a C:\MPICH2\lib\fmpich2g.lib -lmingw32.lib -lmoldname.lib
>> -lmingwex.lib -lmsvcrt.lib -luser32.lib -lkernel32.l
>> ib -ladvapi32.lib -lshell32.lib -lmingw32.lib -lmoldname.lib -lmingwex.lib
>> -lmsvcrt.lib -lgfortran -shared-libgcc
>> Using built-in specs.
>> COLLECT_GCC=C:\MinGW\bin\gfortran.exe
>>
>> COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
>> Target: mingw32
>> Configured with: ../gcc-4.5.2/configure
>> --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions
>> --wi
>> th-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry
>> --enable-libstdcxx-debug --enable-version-specific-r
>> untime-libs --disable-werror --build=mingw32 --prefix=/mingw
>> Thread model: win32
>> gcc version 4.5.2 (GCC)
>>
>> COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/;c:/mingw/bin/../libexec/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.
>> 5.2/../../../../mingw32/bin/
>>
>> LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.5.2/;c:/mingw/bin/../lib/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../..
>>
>> /../../mingw32/lib/;c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../;/mingw/lib/
>> COLLECT_GCC_OPTIONS='-v' '-o' 'CE_SEMFEM.exe'
>> '-LC:\Loher_Berechner_repo\build\Utilities\xml_parser' '-LC:\Loher_Berechn
>> er_repo\build\SEMFEM\trunk\SEMFEM\core' '-Lc:\MinGW\lib\gcc\mingw32\4.5.2'
>> '-Lc:\MinGW\lib\gcc' '-Lc:\MinGW\mingw32\lib'
>>  '-Lc:\MinGW\lib' '-L\MinGW\lib' '-shared-libgcc' '-mtune=i386'
>> '-march=i386'
>>  c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/collect2.exe -Bdynamic -u
>> ___register_frame_info -u ___deregister_frame_info
>> -o CE_SEMFEM.exe c:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../crt2.o
>> c:/mingw/bin/../lib/gcc/mingw32/4.5.2/crtbegin.o
>> -LC:\Loher_Berechner_repo\build\Utilities\xml_parser
>> -LC:\Loher_Berechner_repo\build\SEMFEM\trunk\SEMFEM\core -Lc:\MinGW
>> \lib\gcc\mingw32\4.5.2 -Lc:\MinGW\lib\gcc -Lc:\MinGW\mingw32\lib
>> -Lc:\MinGW\lib -L\MinGW\lib -Lc:/mingw/bin/../lib/gcc/m
>> ingw32/4.5.2 -Lc:/mingw/bin/../lib/gcc
>> -Lc:/mingw/bin/../lib/gcc/mingw32/4.5.2/../../../../mingw32/lib
>> -Lc:/mingw/bin/..
>> /lib/gcc/mingw32/4.5.2/../../.. -L/mingw/lib
>> CMakeFiles/CE_SEMFEM.dir/src/CE_SEMFEM.f95.obj CMakeFiles/CE_SEMFEM.dir/src
>> /CE_config_module.f95.obj ..\..\core\SEMFEM.lib
>> ..\..\..\..\..\Utilities\xml_parser\libCE

Re: [CMake] Which variable stores all (sub) directories added sofar?

2011-05-19 Thread Glenn Coombs
I think that you can use an environment variable rather than a normal
variable to bypass the normal scoping rules.  So:

set(ENV{foo} "bar")

will I think allow other CMakeFiles to read it using:

$ENV{foo}

regardless of the sub-directory level.  I haven't tried using this so it may
not work but I think it should do what you want.

--
Glenn


On 19 May 2011 13:05, Eric Noulard  wrote:

> 2011/5/19 J.S. van Bethlehem :
> >
> > Hello Eike,
> >
> > Thanks a lot for your reply. I have actually been thinking in the same
> > direction. I have one problem though: how can you make a truly global
> > variable in CMake? Whenever you do something to a variable in a directory
> > that is added using add_subdirectory(), those changes don't propagate to
> the
> > current directory
> > (well, one could use the PARENT_SCOPE option to set() in the
> sub-directory,
> > but then I won't be able to test that sub-directory seperately because
> then
> > CMake will err that there is no such scope)
> >
> > How do you deal with this?
>
> I think, that's why Eike uses **property** and not variable.
>
> Property may be at "GLOBAL" scope:
>
> set_property(   DIRECTORY [dir]   |
>   TARGET[target1 [target2 ...]] |
>   SOURCE[src1 [src2 ...]]   |
>   TEST  [test1 [test2 ...]] |
>   CACHE [entry1 [entry2 ...]]>
>  [APPEND]
>  PROPERTY  [value1 [value2 ...]])
>
>   Set one property on zero or more objects of a scope.  The first
>   argument determines the scope in which the property is set.  It must
>   be one of the following:
>
>   GLOBAL scope is unique and does not accept a name.
> ...
> --
> 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] Double redefinition of commands...

2011-05-19 Thread Theodore Papadopoulo
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,

I'm facing with the following problem, I'm using the _XXX trick to
access the previous version of a command. Unfortunately, this is not
quite what I need because of a double redefinition of the command.

Here is a small example of the problem I have:

PROJECT(Test)

FUNCTION(FIND_LIBRARY VAR)
MESSAGE("HERE 1")
_FIND_LIBRARY(${VAR} ${ARGN})
ENDFUNCTION()

FIND_LIBRARY(ZLIB z)

FUNCTION(FIND_LIBRARY VAR)
MESSAGE("HERE 2")
_FIND_LIBRARY(${VAR} ${ARGN})
ENDFUNCTION()

FIND_LIBRARY(GTKLIB gtk)

In the second call "FIND_LIBRARY(GTKLIB gtk)", _FIND_LIBRARY refers to
the first definition and the call to that function just loops forever.
Browsing cmake sources reveals that basically cmake just renames the old
function XXX into _XXX. If _XXX already exists, it is suppressed (if I
understood well).

What I would need is a reference to the original FIND_LIBRARY (the one
provided by cmake), but I see no way of doing it. Any idea.

Another, probably more powerful idea, would be to allow users to rename
functions as they wish. This is probably not too difficult as Cmake
already contains code to do that.

And finally, no I cannot suppress the two redefinitions as they are in
two different sub-projects that need to be built separately or together.

Any idea will be appreciated.

Thank's a lot.

Theo.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk3VQUkACgkQEr8WrU8nPV1vWQCgo9XBct99/nk0ppMIBaiCvX1F
V78AnAoCdaElXewc6drjrNWcgrAHpXDD
=PYnv
-END PGP SIGNATURE-
___
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] problem using a new toolchain

2011-05-19 Thread Daniel Franzini
hi

I'm trying to create a CMake build environment for a medium sized
application. The application is getting ported to several plataforms and I
would like to have just one build environment.

The host plataform is WinVista/Linux. The first target plataform I'm trying
to create a build for is PSP. PSP have a toolchain (PSPSDK) which is based
in GNU tools. I'm trying to write a new toolchain file for using the PSPSDK.

-PSPSDK-Toolchain.cmake-
# the name of the host operating system
SET(CMAKE_SYSTEM_NAME "Generic")

# here the target toolchain is located for cross compilation
SET( CMAKE_FIND_ROOT_PATH "C:\\pspsdk\\bin" )

# which compilers to use for C and C++
SET( CMAKE_C_COMPILER psp-gcc )
SET( CMAKE_CXX_COMPILER psp-g++ )
SET( CMAKE_MAKE_PROGRAM make )
SET( CMAKE_RC_COMPILER psp-ar )
-PSPSDK-Toolchain.cmake-

It seems that CMake can find the psp-gcc and psp-g++ but the configure
process fails because it cannot find some basic libraries needed.

The log of the configure process is:

--
The C compiler identification is GNU

The CXX compiler identification is GNU

Check for working C compiler: C:/pspsdk/bin/psp-gcc.exe

Check for working C compiler: C:/pspsdk/bin/psp-gcc.exe -- broken

CMake Error at C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):

The C compiler "C:/pspsdk/bin/psp-gcc.exe" is not able to compile a simple

test program.

 It fails with the following output:

 Change Dir:
C:/Users/danielt3/code/bennugd-monolithic-dev/build/CMakeFiles/CMakeTmp

  Run Build Command:C:/FPC/2.4.0/bin/i386-win32/make.exe

"cmTryCompileExec/fast"

 C:/FPC/2.4.0/bin/i386-win32/make.exe -f

CMakeFiles/cmTryCompileExec.dir/build.make

CMakeFiles/cmTryCompileExec.dir/build

 make.exe[1]: Entering directory

`C:/Users/danielt3/code/bennugd-monolithic-dev/build/CMakeFiles/CMakeTmp'

 "C:/Program Files/CMake 2.8/bin/cmake.exe" -E cmake_progress_report

C:/Users/danielt3/code/bennugd-monolithic-dev/build/CMakeFiles/CMakeTmp/CMakeFiles

1

 "Building C object CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj"

 C:/pspsdk/bin/psp-gcc.exe -o

CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj -c

C:/Users/danielt3/code/bennugd-monolithic-dev/build/CMakeFiles/CMakeTmp/testCCompiler.c

 "Linking C executable cmTryCompileExec"

 C:/pspsdk/bin/psp-gcc.exe

"CMakeFiles/cmTryCompileExec.dir/testCCompiler.c.obj" -o cmTryCompileExec

 c:/pspsdk/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib/crt0.o: In function

`_start':

 ../../../../pspsdk/src/startup/crt0.c:149: undefined reference to

`sceKernelCreateThread'

 ../../../../pspsdk/src/startup/crt0.c:150: undefined reference to

`sceKernelStartThread'

 c:/pspsdk/bin/../lib/gcc/psp/4.3.3/../../../../psp/lib/crt0.o: In function

`_main':

 ../../../../pspsdk/src/startup/crt0.c:68: undefined reference to `strlen'

 ../../../../pspsdk/src/startup/crt0.c:83: undefined reference to `atexit'

 ../../../../pspsdk/src/startup/crt0.c:89: undefined reference to `exit'

 collect2: ld returned 1 exit status

 make.exe[1]: *** [cmTryCompileExec] Error 1

 make.exe[1]: Leaving directory

`C:/Users/danielt3/code/bennugd-monolithic-dev/build/CMakeFiles/CMakeTmp'

 make.exe: *** [cmTryCompileExec/fast] Error 2

CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

CMakeLists.txt:9 (project)

 Configuring incomplete, errors occurred!
--

It is clear that it can find the compiler but cannot find the
libraries...some are common C functions (strlen, etc); other are PSP
specific (sceKernelCreateThread, etc). How can I ask CMake to link some
libraries to every executable which is using this particular toolchain? Will
I have to manually set in CMakeLists.txt


Also, it is using the wrong make.exe program (is there a variable where I
can force it to use a specific make)?


-- 
Daniel

"Let us change our traditional attitude to the construction of programs.
Instead of imagining that our main task is to instruct a computer what to
do, let us concentrate rather on explaining to human beings what we want a
computer to do." (Donald Knuth)

"Yes, technogeeks can be funny, even if only to each other." (
http://www.boogieonline.com/revolution/science/humor/)"

"Man is driven to create; I know I really love to create things. And while
I'm not good at painting, drawing, or music, I can write software."
(Yukihiro Matsumoto, a.k.a. ``Matz'')
___
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/unsu

Re: [CMake] Updated: CMake 2.8.4-1

2011-05-19 Thread Bill Hoffman

On 5/19/2011 2:11 PM, Alan W. Irwin wrote:

On 2011-05-19 10:55-0400 Bill Hoffman wrote:


CMake 2.8.4-1 is now available on Cygwin mirrors.


Hi Bill:

Could you give some background information about why you create a
binary version of cmake for Cygwin that is separated in time and
location from the usual binaries that come with any release of cmake?

Could any Cygwin user create that binary using an older Cygwin cmake
binary + source code? Or are additional Cygwin-only cmake source code
patches and/or special configuration required as well?

IOW, is there anything special going on here or is this just a routine
binary build of cmake for Cygwin users' convenience?

I am interested in the requested background information because I hope
to test builds of cmake, PLplot, and other software shortly under
wine/Cygwin. (Similar to my earlier build tests of cmake, etc. on a
wine/MinGW/MSYS platform.)



My bad, I will try to be better about it in the future.  I have no good 
excuse.  :)


-Bill
___
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] Updated: CMake 2.8.4-1

2011-05-19 Thread Alan W. Irwin

On 2011-05-19 10:55-0400 Bill Hoffman wrote:


CMake 2.8.4-1  is now available on Cygwin mirrors.


Hi Bill:

Could you give some background information about why you create a
binary version of cmake for Cygwin that is separated in time and
location from the usual binaries that come with any release of cmake?

Could any Cygwin user create that binary using an older Cygwin cmake
binary + source code?  Or are additional Cygwin-only cmake source code
patches and/or special configuration required as well?

IOW, is there anything special going on here or is this just a routine
binary build of cmake for Cygwin users' convenience?

I am interested in the requested background information because I hope
to test builds of cmake, PLplot, and other software shortly under
wine/Cygwin.  (Similar to my earlier build tests of cmake, etc. on a
wine/MinGW/MSYS platform.)

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
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] Updated: CMake 2.8.4-1

2011-05-19 Thread Alan W. Irwin

On 2011-05-19 14:19-0400 Bill Hoffman wrote:


On 5/19/2011 2:11 PM, Alan W. Irwin wrote:

On 2011-05-19 10:55-0400 Bill Hoffman wrote:


CMake 2.8.4-1 is now available on Cygwin mirrors.


Hi Bill:

Could you give some background information about why you create a
binary version of cmake for Cygwin that is separated in time and
location from the usual binaries that come with any release of cmake?

Could any Cygwin user create that binary using an older Cygwin cmake
binary + source code? Or are additional Cygwin-only cmake source code
patches and/or special configuration required as well?

IOW, is there anything special going on here or is this just a routine
binary build of cmake for Cygwin users' convenience?

I am interested in the requested background information because I hope
to test builds of cmake, PLplot, and other software shortly under
wine/Cygwin. (Similar to my earlier build tests of cmake, etc. on a
wine/MinGW/MSYS platform.)



My bad, I will try to be better about it in the future.  I have no good 
excuse.  :)


Actually, I didn't mean to question why this Cygwin release of cmake
was later than the normal release of cmake-2.8.4.  (These things
happen.) But the separate nature of all the Cygwin releases (not just
this one) got me curious about whether there are any special
circumstances for building cmake on Cygin compared to the other
platforms you cover in your normal release.  If there is nothing
special (i.e., bog-standard cmake on Cygwin with no special
configuration or patches), please let me know as well.

Alan
__
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__

Linux-powered Science
__
___
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 and VS2010

2011-05-19 Thread LaViolette, Alan
yes I have CMake 2.8.4

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 10:30 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.

 

On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan
 wrote:

I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 


___
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 and VS2010

2011-05-19 Thread David Cole
So, if you just open the solution and do a "Build Solution" doesn't it build
everything you'd expect?


On Thu, May 19, 2011 at 3:01 PM, LaViolette, Alan <
alaviole...@overwatch.textron.com> wrote:

> yes I have CMake 2.8.4
>
>
>
> *From:* David Cole [mailto:david.c...@kitware.com]
> *Sent:* Thursday, May 19, 2011 10:30 AM
> *To:* LaViolette, Alan
> *Cc:* cmake@cmake.org
> *Subject:* Re: [CMake] CMake and VS2010
>
>
>
> Are you using CMake 2.8.4? There were several VS 2010 related fixes that
> went into 2.8.4.
>
>
>
> On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan <
> alaviole...@overwatch.textron.com> wrote:
>
> I am working on converting to Visual Studio 2010 and the solution file that
> CMake generates does not have any of the target marked for build.   I have
> to open up the “Configuration Manager” and select the build box for all my
> projects.
>
>
>
> When I save the modified solution back out I get additional
> “Debug|Win32.Build.0 = Debug|Win32” lines for all my projects.
>
>
>
>
>
> Is this a CMake/Visual Studio configuration error on my part or an issue
> with CMake solution generation?
>
>
>
> Thanks,
>
> Alan
>
>
>
>
>
>
> ___
> 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] Double redefinition of commands...

2011-05-19 Thread Alexander Neundorf
On Thursday 19 May 2011, Theodore Papadopoulo wrote:
>   Hello,
> 
> I'm facing with the following problem, I'm using the _XXX trick to
> access the previous version of a command. Unfortunately, this is not
> quite what I need because of a double redefinition of the command.
> 
> Here is a small example of the problem I have:
> 
> PROJECT(Test)
> 
> FUNCTION(FIND_LIBRARY VAR)
> MESSAGE("HERE 1")
> _FIND_LIBRARY(${VAR} ${ARGN})
> ENDFUNCTION()
> 
> FIND_LIBRARY(ZLIB z)
> 
> FUNCTION(FIND_LIBRARY VAR)
> MESSAGE("HERE 2")
> _FIND_LIBRARY(${VAR} ${ARGN})
> ENDFUNCTION()
> 
> FIND_LIBRARY(GTKLIB gtk)
> 
> In the second call "FIND_LIBRARY(GTKLIB gtk)", _FIND_LIBRARY refers to
> the first definition and the call to that function just loops forever.
> Browsing cmake sources reveals that basically cmake just renames the old
> function XXX into _XXX. If _XXX already exists, it is suppressed (if I
> understood well).

This feature is not very, let's say polished, so yes, it is not perfect as it 
is.
Why do you want do do this ?
How about adding a "my_find_library()", so you don't have to rename it ?
In KDE4 we have KDE4_ADD_EXECUTABLE(), KDE4_ADD_LIBRARY() which add some 
features, and developers who want to make use of this have to use these 
functions.
It works well for us.

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] Forcing CMake to never search install path

2011-05-19 Thread Clifford Yapp
Michael,

At first glance those would be what I need (although it is not clear
if I need to specify bin/lib/include for  CMAKE_SYSTEM_IGNORE_PATH as
well as CMAKE_IGNORE_PATH.)  I have tested both out, and unfortunately
they do not seem to exclude the CMAKE_INSTALL_PREFIX path when I
supply it - I still get find results even after appending the install
path to  CMAKE_SYSTEM_IGNORE_PATH.  I also tried

get_filename_component(PATH_NORMALIZED ${CMAKE_INSTALL_PREFIX}/lib ABSOLUTE)

to make it easier for Find to ignore the path, but that didn't seem to
help.  I've tried forcing the results into the Cache as well.  Is
there something else I need to do?

Thanks,
CY

On Thu, May 19, 2011 at 7:47 AM, Michael Hertling  wrote:
>
> Have you already tried the CMAKE_[SYSTEM_]IGNORE_PATH variables? At
> the first glance, they provide exactly the functionality you need.
___
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] Handle lib64 library on Linux

2011-05-19 Thread Sara Rolfe

Hello,

I am attempting to modify my make file so the linker will check for / 
usr/lib64 instead of /usr/lib.  I found a patch for this problem here:


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=126c993d#patch1

However, I'm pretty new to cmake and it's not clear to me how to apply  
this.  Can someone explain, or point me to an example/documentation?


Thanks,
Sara 
___

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

2011-05-19 Thread LaViolette, Alan
ZERO_CHECK runs then all other report

 

"Project not selected to build for this solution configuration"

 

I think cmGlobalVisualStudio8Generator::WriteProjectConfigurations is
getting passed false for partOfDefaultBuild on all my projects.  What
controls this parameter.   I am going to start a build of CMake and see
what is going on.   

 

 

BTW. The Visual Studio 2005 build of the same cmake project works fine.

 

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 3:50 PM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

So, if you just open the solution and do a "Build Solution" doesn't it
build everything you'd expect?



On Thu, May 19, 2011 at 3:01 PM, LaViolette, Alan
 wrote:

yes I have CMake 2.8.4

 

From: David Cole [mailto:david.c...@kitware.com] 
Sent: Thursday, May 19, 2011 10:30 AM
To: LaViolette, Alan
Cc: cmake@cmake.org
Subject: Re: [CMake] CMake and VS2010

 

Are you using CMake 2.8.4? There were several VS 2010 related fixes that
went into 2.8.4.

 

On Thu, May 19, 2011 at 10:00 AM, LaViolette, Alan
 wrote:

I am working on converting to Visual Studio 2010 and the solution file
that CMake generates does not have any of the target marked for build.
I have to open up the "Configuration Manager" and select the build box
for all my projects.

 

When I save the modified solution back out I get additional
"Debug|Win32.Build.0 = Debug|Win32" lines for all my projects. 

 

 

Is this a CMake/Visual Studio configuration error on my part or an issue
with CMake solution generation?

 

Thanks,

Alan

 

 


___
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] Updated: CMake 2.8.4-1

2011-05-19 Thread Bill Hoffman

On 5/19/2011 2:58 PM, Alan W. Irwin wrote:



My bad, I will try to be better about it in the future. I have no good
excuse. :)


Actually, I didn't mean to question why this Cygwin release of cmake
was later than the normal release of cmake-2.8.4. (These things
happen.) But the separate nature of all the Cygwin releases (not just
this one) got me curious about whether there are any special
circumstances for building cmake on Cygin compared to the other
platforms you cover in your normal release. If there is nothing
special (i.e., bog-standard cmake on Cygwin with no special
configuration or patches), please let me know as well.



It is stock CMake.  It uses CPack to create the cygwin package stuff. I 
have to send a few emails to get it into the setup.exe thing.  But, if 
you just grabbed the source and did a build it would just work.  If you 
ran cpack after, you could even have the same file that I update to 
cygwin.  It is the few emails that slow me down, again not really a good 
excuse... :)  With the other cmake builds, we just push them to 
cmake.org and we are done...


-Bill


___
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