Re: [CMake] CMake 3.7.0-r2 Open Project sometimes picks wrong version of Visual Studio

2016-12-19 Thread John Drescher
On Tue, Nov 8, 2016 at 10:28 AM,  <clin...@elemtech.com> wrote:
>
>
> - On Nov 8, 2016, at 8:13 AM, Taylor Braun-Jones tay...@braun-jones.org 
> wrote:
>
>> On Fri, Nov 4, 2016 at 2:55 PM, Brad King <brad.k...@kitware.com> wrote:
>>>
>>> On 11/03/2016 06:04 PM, John Drescher wrote:
>>> > I opened a project in cmake-gui using the open project button from a
>>> > vc 2010 build of a project. The open project opened the project in
>>> > Visual Studio 2010. Later I opened the same project but a different
>>> > build tree for Visual Studio 2013 CMake-gui had all of the correct
>>> > information for the Visual Studio 2013 build but open project tried to
>>> > open the Visual Studio 2013 solution in Visual Studio 2010 instead of
>>> > the expected Visual Studio 2013.
>
> I'm unable to reproduce this problem.  I have multiple Visual Studio 
> installations of different versions.
> I'm not sure whether it could be specific to a project, or specific to 
> installations of visual studio.
>
>>
>> I'm guessing you established MSVS2010 as the default application for
>> opening .sln files the first time you used the open project button.
>> What happens if you double click on that MSVS2013 .sln file?

Sorry for the delay. I went on vacation a few days after emailing
about this issue then forgot to check back when I returned.. If I
click on a .sln it picks the wrong version of Visual Studio as well so
this is not a CMake issue.

Thanks,
John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


[CMake] CMake 3.7.0-r2 Open Project sometimes picks wrong version of Visual Studio

2016-11-03 Thread John Drescher
I opened a project in cmake-gui using the open project button from a
vc 2010 build of a project. The open project opened the project in
Visual Studio 2010. Later I opened the same project but a different
build tree for Visual Studio 2013 CMake-gui had all of the correct
information for the Visual Studio 2013 build but open project tried to
open the Visual Studio 2013 solution in Visual Studio 2010 instead of
the expected Visual Studio 2013. Is there a way to get/force this
feature to reliably use the correct ide?

Thanks,
John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CMake keeps on referencing an uninstalled Qt

2015-10-09 Thread John Drescher
On Fri, Oct 9, 2015 at 9:53 AM, Laura Médioni  wrote:
> Hi,
>
> I am facing a problem with CMake 3.4 under Windows.
> My CMake project is using Qt. Recently I uninstalled Qt and reinstalled it.
> Since then, the previous Qt install keeps on appearing in the
> CMakeCache.txt, leading to link edition errors.
>
>

You may want to look at the CMake Package Registry

https://cmake.org/Wiki/CMake/Tutorials/Package_Registry

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Multi-platform visual studio projects

2015-02-27 Thread John Drescher
 However,  once the solution is created, does the path of the shell matter 
 at all?

No.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Multi-platform visual studio projects

2015-02-27 Thread John Drescher
 I have been successful with

 Src\build.32 and src\build.64 so that on svn update effects both.

 The problem, for my automated build flow, I was hoping to make a mix, 32/64 
 installer.. it’s a lot harder to do with two completely separate build trees 
 :(

For this I just make separate installers. I use a naming convention
such that win32 / win64 is part of the name of the generated nsis
executable installer.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] Multi-platform visual studio projects

2015-02-27 Thread John Drescher
On Fri, Feb 27, 2015 at 10:44 AM, Scott Aron Bloom
scott.bl...@onshorecs.com wrote:
 Is it possible with cmake, to build a VS 2013, win32 and win64 vsproj
 solution file set?

 If not, I understand, then I have a follow on question..


No create 2 independent trees. I keep the source in a separate tree
also. For example I have my source code in

x:\CMakeBased\Libraries\ITK-4.7.0
x:\CMakeBased\Libraries\VTK-5.10.2
...

x:\CMakeBased\Qt\LungAnalysis
x:\CMakeBased\Qt\StudyManager

...

Where Libraries are source code libraries like ITK, VTK, GDCM, DCMTK ...

And LungAnalysis, StudyManager  ... are applications written by me.


Then the build tress look like

x:\64bit\VC.100\Libraries\ITK-4.7.0
x:\64bit\VC.100\Libraries\VTK-5.10.2
x:\64bit\VC.100\Qt\LungAnalysis

...

x:\64bit\VC.120\Libraries\ITK-4.7.0
x:\64bit\VC.120\Libraries\VTK-5.10.2
x:\64bit\VC.120\Qt\LungAnalysis

...

x:\32bit\VC.100\Libraries\ITK-4.7.0
x:\32bit\VC.100\Libraries\VTK-5.10.2
x:\32bit\VC.100\Qt\LungAnalysis


John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Rename target RUN_TESTS

2015-01-01 Thread John Drescher
On Thu, Jan 1, 2015 at 11:27 PM, Scott Aron Bloom
scott.bl...@onshorecs.com wrote:
 For windows Visual Studio using CMake with google test, one of the
 complaints my team has, is the project name “RUN_TESTS” gets lost in the
 numerous projects.

I am not sure about renaming that however I find it helpful to
organize my projects using solution folders with
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

and

set_target_properties(mylocalproject PROPERTIES FOLDER folder)



John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Re: [CMake] CMake and 64-bit Systems

2014-12-04 Thread John Drescher
 does CMake run on 64-bit OS (e.g. Ubuntu 14.10 64-bit) without problems
 or are there some workarounds necessary to get it run? If so, is there a
 description available?


I have not had any real issue with cmake (32 or 64 bit binary) on 64
bit linux or windows.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] VTK compiling problem with CMake

2014-09-23 Thread John Drescher
Did you try runing cmake-gui from a VisualStudio 2010 x64 command prompt?

John

On Tue, Sep 23, 2014 at 1:08 PM, lanhz h1...@ucsd.edu wrote:
 Hi,

 I'm trying use CMake to build VTK, but got error as below. I searched the
 internet and tried many ways suggested, but they didn't work. The OS is
 Windows 7 with Visual Studio 2010 Pro (up to date). I don't know how to
 solve. I'll appreciate your help.

 Error info from CMake-gui
 -
 The C compiler identification is MSVC 16.0.30319.1
 The CXX compiler identification is MSVC 16.0.30319.1
 Check for working C compiler using: Visual Studio 10 Win64
 Check for working C compiler using: Visual Studio 10 Win64 -- broken
 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:61 (message):
 The C compiler C:/Program Files (x86)/Microsoft Visual Studio
 10.0/VC/bin/x86_amd64/cl.exe is not able to compile a simple test program.

 It fails with the following output:

 Change Dir: C:/Code/VTK-bin/CMakeFiles/CMakeTmp

 Run Build Command:C:\PROGRA~2\MICROS~2.0\Common7\IDE\devenv.com
 CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec696148031


 Microsoft (R) Visual Studio Version 10.0.30319.1.


 Copyright (C) Microsoft Corp. All rights reserved.


 1-- Build started: Project: cmTryCompileExec696148031, Configuration:
 Debug x64 --


 1Build started 9/10/2014 1:31:13 PM.


 1PrepareForBuild:


 1 Creating directory C:\Code\VTK-bin\CMakeFiles\CMakeTmp\Debug\.


 1InitializeBuildStatus:


 1 Creating
 cmTryCompileExec696148031.dir\Debug\cmTryCompileExec696148031.unsuccessfulbuild
 because AlwaysCreate was specified.


 1ClCompile:


 1 Microsoft (R) C/C++ Optimizing Compiler Version 16.00.30319.01 for x64


 1 Copyright (C) Microsoft Corporation. All rights reserved.


 1


 1 cl /c /Zi /W3 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D
 CMAKE_INTDIR=\Debug\ /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise
 /Zc:wchar_t /Zc:forScope /FocmTryCompileExec696148031.dir\Debug\\
 /FdcmTryCompileExec696148031.dir\Debug\vc100.pdb /Gd /TC
 /errorReport:prompt testCCompiler.c


 1


 1 testCCompiler.c


 1LINK : fatal error LNK1123: failure during conversion to COFF: file
 invalid or corrupt


 1


 1Build FAILED.


 1


 1Time Elapsed 00:00:00.26


 == Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==


 CMake will not be able to correctly generate this project.
 Call Stack (most recent call first):
 CMakeLists.txt:28 (project)
 Configuring incomplete, errors occurred!
 See also C:/Code/VTK-bin/CMakeFiles/CMakeOutput.log.
 See also C:/Code/VTK-bin/CMakeFiles/CMakeError.log.


 Best
 Lan



 --
 View this message in context: 
 http://cmake.3232098.n2.nabble.com/VTK-compiling-problem-with-CMake-tp7588569.html
 Sent from the CMake mailing list archive at Nabble.com.
 --

 Powered by www.kitware.com

 Please keep messages on-topic and check the CMake FAQ at: 
 http://www.cmake.org/Wiki/CMake_FAQ

 Kitware offers various services to support the CMake community. For more 
 information on each offering, please visit:

 CMake Support: http://cmake.org/cmake/help/support.html
 CMake Consulting: http://cmake.org/cmake/help/consulting.html
 CMake Training Courses: http://cmake.org/cmake/help/training.html

 Visit other Kitware open-source projects at 
 http://www.kitware.com/opensource/opensource.html

 Follow this link to subscribe/unsubscribe:
 http://public.kitware.com/mailman/listinfo/cmake



-- 
John M. Drescher
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] CMAKE changing Visual Studio Settings

2014-07-21 Thread John Drescher
 So CMAKE can't control the options int he *.user files I guess :-\?  Would a
 potential workaround be to find a command line tool that can edit these and
 run it as a post-build script?

CMake gives you the functionality needed to edit these via your own
script. I mean reading and writing files replacing text.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Changing the the current generator in CMake GUI

2014-07-11 Thread John Drescher
On Fri, Jul 11, 2014 at 10:33 AM, Edward Diener
eldlistmaili...@tropicsoft.com wrote:
 Shouldn't there be a way to change the current generator in the CMake GUI ?
 It seems like I can only do this if I choose a new Where to build the
 binaries path. But what if I just want to change the current generator to
 something else using the current outpath path ?


You can also do this if you reset the cache in cmake-gui.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Question of using cmake in Windows

2014-06-23 Thread John Drescher
 Ok, run cmake -G MinGW Makefiles
 -DCMAKE_C_COMPILER=/c/mingw-w64-4.9.0/mingw64/bin
 I got this error:
 CMake Error: the source directory  does not appear to contain
 CMakeLists.txt

 What I am missing?


You are not passing the folder of the source.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-05-01 Thread John Drescher
 I thought they probably were.  My question was really if the behaviour that
 results from that was desirable.  I can't see any reason why they should be
 cached as they aren't user configurable variables.  Would it break anything
 badly if they were not stored in the cache ?  It would result in more
 consistent behaviour IMHO.


Executing

cmake .

would fail in the bin folder if it had no way to know where the source
folder is.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-05-01 Thread John Drescher
On Thu, May 1, 2014 at 1:54 PM, Glenn Coombs glenn.coo...@gmail.com wrote:
 What I am saying is that project(foo) should internally execute the
 equivalent of set(foo_SOURCE_DIR /path/to/source) rather than set(foo
 /path/to/source CACHE STRING).  That way it would fail on every run if you
 referenced a project source directory variable before you had done the
 add_subdirectory() for that project.  Currently in that situation it fails
 the first time you run cmake but works as expected on subsequent runs of
 cmake, which I think is odd behaviour.


I am saying making this change to not cache the source folder would break

cmake binfolder

and

cmake --build buildfolder

and several other commands that have worked this way for years.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?

2014-05-01 Thread John Drescher
On Thu, May 1, 2014 at 2:16 PM, Matthew Woehlke
mw_tr...@users.sourceforge.net wrote:
 On 2014-05-01 13:35, John Drescher wrote:

 I thought they probably were.  My question was really if the behaviour
 that
 results from that was desirable.  I can't see any reason why they should
 be
 cached as they aren't user configurable variables.  Would it break
 anything
 badly if they were not stored in the cache ?  It would result in more
 consistent behaviour IMHO.


 Executing

 cmake .

 would fail in the bin folder if it had no way to know where the source
 folder is.


 If CMAKE_BINARY_DIR were not cached, yes. But I don't think not caching that
 is being suggested. It's not clear to me why the *per-project* flavors need
 to be cached?


I see now. Sorry for the noise..

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Linking Error with Visual Studio 2013 x64

2014-04-17 Thread John Drescher
 Is there some option to export automatically some methods without using
 __declspec(dllexport)?

 No. There are workarounds like in
 http://stackoverflow.com/questions/225432/export-all-symbols-when-creating-a-dll
 but it's too much work.
 Basically you want to define a macro that resolves to
 __declspec(dllexport) when building the DLL and to nothing when only using
 libraries headers.


CMake module GenerateExportHeader can help a little with this.

John
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Fwd: Visual Studio command line from CMake

2014-01-09 Thread John Drescher
 Why not just write your own batch ('buildit.bat') file that does:

call vcvarsall.bat
nmake

 (or whatever the command to build in the VS command prompt is...)

 And then your command to build is:

C:/full/path/to/buildit.bat

 It's presumably in a Windows-specific chunk of your CMakeLists anyway, so
 that should work fairly simply.

I think the part of problem would be figuring out what vcvarsall.bat
to run especially if you have more than 1 version of Visual Studio.

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake fails on Win7 x64 with VS 2012

2013-12-28 Thread John Drescher
On Sat, Dec 28, 2013 at 8:35 AM, Ansis Māliņš ansis.mal...@gmail.com wrote:
 The minimal CMakeLists.txt with content

 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
 PROJECT(CMakeTest)

 on CMake 2.8.12.1 on Windows 7 64 bit with Visual Studio 2012 produces the
 result

 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446
 (execute_process):
   execute_process given COMMAND argument with no value.
 Call Stack (most recent call first):
   C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48
 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
   C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCCompiler.cmake:131
 (CMAKE_DETERMINE_COMPILER_ID)
   CMakeLists.txt:2 (PROJECT)


 The C compiler identification is unknown
 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446
 (execute_process):
   execute_process given COMMAND argument with no value.
 Call Stack (most recent call first):
   C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:48
 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
   C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/CMakeDetermineCXXCompiler.cmake:127
 (CMAKE_DETERMINE_COMPILER_ID)
   CMakeLists.txt:2 (PROJECT)


 The CXX compiler identification is unknown
 Configuring incomplete, errors occurred!

 What do?


Did you use the correct generator? Remember that Visual Studio 2012 is
Visual Studio 11 not Visual Studio 12.

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] CMake fails on Win7 x64 with VS 2012

2013-12-28 Thread John Drescher
On Sat, Dec 28, 2013 at 9:05 AM, Ansis Māliņš ansis.mal...@gmail.com wrote:
 Yes, I'm using Visual Studio 11 (aka 2012) generator.

Did you try running cmake-gui from a Visual Studio 2012 x64 Command
Prompt so that the compiler environment variables are set?

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Forwarding parameters to cmake through cmake-gui

2013-11-01 Thread John Drescher
 +1 for updating cmake-gui to work equally to ccmake

 But my opinion regarding CMAKE_MODULE_PATH is different. The problem is that
 alot of the default find-modules don't work because the dependency is not in
 the location where the find-module expects it. Currently there are only two
 workarounds:
 - Change the find-module directly so it works in the local environment
 - Change the CMakeLists.txt of the project - which is bad because it's just
 a LOCAL problem and the CMakeLists should be mostly independent of the
 environment.

 With the command-line option it's possible to setup a custom cmake-gui batch
 file once per computer which sets e.g. the CMAKE_MODULE_PATH to a directory
 with customized find modules. If one doesn't want to use custom find modules
 that's fine too but I think everyone should have the option to place
 dependent libraries wherever she/he wants.


For these kind of things I use environment variables in my
CMakeLists.txt. If the environment variable is set I use it. If not I
use the default behavior.

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtkusers] Problems building Vtk on Windows 7

2013-10-04 Thread John Drescher

 Deleting cache and reconfiguring doesn't help... I get the same errors
 repeatedly! Why does it say that it can't recognize the C and CXX
 compilers? Do you think I should try with some vanilla Visual Studio 12 as
 opposed to the Ultimate I got from MS?



Wait a minute. You said Visual Studio 12. Do you have the prerelease of
Visual Studio 2013?

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] [vtkusers] Problems building Vtk on Windows 7

2013-10-04 Thread John Drescher
On Fri, Oct 4, 2013 at 10:34 AM, John Drescher dresche...@gmail.com wrote:


 Deleting cache and reconfiguring doesn't help... I get the same errors
 repeatedly! Why does it say that it can't recognize the C and CXX
 compilers? Do you think I should try with some vanilla Visual Studio 12 as
 opposed to the Ultimate I got from MS?



 Wait a minute. You said Visual Studio 12. Do you have the prerelease of
 Visual Studio 2013?


I ask that because the correct generator for Visual Studio 2012 is Visual
Studio 11.

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Visual Studio 10 compiler identification unknown

2013-08-06 Thread John Drescher
 Configuration of VTK with cmake-gui was ok. Don't know how it was fixed.

 Does it help if I send the output of the minimal test case?


I suspect deleting the cache in cmake-gui then running cmake-gui from
the windows shortcut will break it again.

BTW, I usually run cmake-gui from a visual studio command prompt. The
reason for this is I use more than visual studio compiler and also use
32 and 64 bit in different build trees so I have command prompts with
different environment variables set that help cmake to find the
correct libraries for the build tree that I am currently using.


John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [#RIT-489-15815]: Re: Visual Studio 10 compiler identification unknown

2013-08-05 Thread John Drescher
 Any idea who has subscribed pir...@teamspeakusa.com to this list?


I have seen this spam on multiple email lists not just cmake. This is
getting very annoying.

John
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Target Properties FOLDER not working?

2013-05-30 Thread John Drescher
On Thu, May 30, 2013 at 1:53 PM, Michael Jackson
mike.jack...@bluequartz.net wrote:
 I am trying to group some of my targets for my Visual Studio users and I am 
 using the following code:

 # 
 add_executable(StructArrayTest ${DREAM3DTest_SOURCE_DIR}/StructArrayTest.cpp)
 target_link_libraries(StructArrayTest EbsdLib MXA DREAM3DLib)
 SET_TARGET_PROPERTIES (StructArrayTest PROPERTIES FOLDER Test)

 I have about 30 of those. What I am expecting to see in the Visual Studio 
 2010 solution is a Folder called Test with all my test projects listed in 
 that but I just see everything at the top level. Is there something else that 
 I need to call to enable this?

 Windows 7 x64 with Visual Studio 2010 SP1 Professional.


Did you enable solution folders globally in the top level CMakeLists.txt?

#Use solution folders.
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Multiple versions of ITK in one build?

2013-05-28 Thread John Drescher
On Tue, May 28, 2013 at 10:16 AM, Zamir Khan zamir.k...@gmail.com wrote:
 We have a project where multiple modules rely on ITK. Most modules have been
 upgraded to ITK 4.31, but one still relies on ITK 3.20 and it would take a
 significant effort to upgrade it. In the meantime, is there a way for us to
 keep these modules under a single top-level CMake and have them use their
 respective versions of ITK?

 We thought we could just try to overwrite the ITK_DIR variable in the
 appropriate place, but our first naive implementation of this did not work.

 Just wondering if someone has done this and whether it is possible (before
 we dive deeper).


On windows I have several completely separate build trees with their
own environment. This way I can build for different compiler versions,
32/64 bit and different versions of libraries like this. Inside the
root of each build tree there is a link to the appropriate Visual
Studio command prompt that has its default folder set to the build
tree root. Also in the root there is a batch file that sets quite a
few _DIR environment variables to help cmake find the correct compiled
libraries. This has worked well for the 5 or so years that I have done
it this way. I do not use INSTALL targets so none of the binaries end
up in Program Files.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] building a 64 bit project with: mingw32, Qt and VTK

2013-05-24 Thread John Drescher
 Qt 4.5.0 or greater not found. Please check the QT_QMAKE_EXECUTABLE
 variable.

Did you follow the above advice?

I mean go in cmake-gui and make sure this variable contains the path
to the qmake executable.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] custom NSIS installer

2013-05-06 Thread John Drescher
 It states that...

 To start work on a custom NSIS script, simply create a file (or copy) into
 your module path (e.g. CPACK_MODULE_PATH) called NSIS.template.in.

 Checking the cmake documentation, there is no predefined variable named
 CPACK_MODULE_PATH.

 I could find a NSIS.template.in. in the cmake's (main cmake install
 directory) modules directory. I believe cmake would not ask me to modify
 this file, as each project's nsis template requirement would be different.

 could you please let me know the correct location where I should create the
 template file?

 Thanks,
   Lloyd


Use List append to append your local module path to the
CMAKE_MODULE_PATH then put your custom NSIS.template.in in that folder

LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMake/Modules)

So in my project root I have the following folder:

CMake\Modules

and it contains my customized

NSIS.template.in

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] MSVC10 redistributable issue

2013-05-02 Thread John Drescher
On Thu, May 2, 2013 at 3:35 PM, Laszlo Papp lp...@kde.org wrote:
 Hi,

 I tried to install the following redistributable package after seeing the
 issue below, but it did not help, not even after a reboot.

 Got a clue?

It looks like you were not supposed to install the redistributable but
to put it somewhere and tell cmake-gui where it was then hit generate.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cannot restore timestamp error on Windows

2013-04-24 Thread John Drescher
 I installed it and it ran one time and I didn't see the error, but it's
 intermittent so that's not definitive.  Unfortunately one of my cmake
 files failed (later on; this is a cmake file from a smaller
 sub-project):

 CMake Error at CMakeLists.txt:190 (TARGET_LINK_LIBRARIES):
 Error evaluating generator expression:

   
 $TARGET_PROPERTY:$$CONFIG:DEBUG:php5ts_debug,INTERFACE_INCLUDE_DIRECTORIES

 $TARGET_PROPERTY:tgt,prop expression requires a non-empty target 
 name.

 I have to back out the upgrade until I can figure out what this error
 means: there's no reference to INTERFACE_INCLUDE_DIRECTORIES anywhere in
 my CMakeLists.txt and this project is not one I'm familiar with.


I have seen this as well with the 2.8.11-rc releases. I am not exactly
what causes that.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] QT, CMake and ITK

2013-04-24 Thread John Drescher
 Here it is:
 #---
 project(test)

 cmake_minimum_required(VERSION 2.4.0)

 find_package(Qt4 REQUIRED)

 SET(qtproject_UIS mainwindow.ui)

 QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})

 include_directories(${CMAKE_CURRENT_BINARY_DIR})

 add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H})
 #---

You have no source files in your project.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] QT, CMake and ITK

2013-04-24 Thread John Drescher
 project(test)

 cmake_minimum_required(VERSION 2.4.0)

 find_package(Qt4 REQUIRED)

 SET(qtproject_UIS mainwindow.ui)

 QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})

 include_directories(${CMAKE_
 CURRENT_BINARY_DIR})

 add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H} main.cpp)

 TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters)


Okay, I was wrong about not having any source files. I see main.cpp
being a source file even though ${qtproject_SRCS} is not populated.

Also if you are going to use ITK then you need to use a finder for
that as well..

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] QT, CMake and ITK

2013-04-24 Thread John Drescher
 I put all the folders in the CMakeLists.txt, but still not working...

 TARGET_LINK_LIBRARIES(test ITKCommon ITKIO ITKBasicFilters ITKAlgorithms
 ITKNumerics ITKSpatialObjetcs ITKReview ITKPatented ${QT_LIBRARIES})


Again the missing header files problem has nothing at all to do with
linking. Please put that back to

TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_LIBRARIES} )

 Can you give me an example, please? Is there a way to simplify all this
 process?

You are missing

include(${ITK_USE_FILE})

and

include(${QT_USE_FILE})

before your add_executable()

However you seriously need to look at some more recent CMake tutorials
and documentation. There are tons of examples on the vtk wiki.


John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] QT, CMake and ITK

2013-04-24 Thread John Drescher
On Wed, Apr 24, 2013 at 3:13 PM, Gabriel Santiago
santiago.eletr...@gmail.com wrote:
 I did it, but still not working... Getting the same error message as before.


Are you using very old versions of Qt, ITK and CMake? I ask because of this line

cmake_minimum_required(VERSION 2.4.0)

The current version of CMake is 2.8.10.2 I normally put

cmake_minimum_required(VERSION 2.8)

in all of my projects since 2.8.0 was released in September of 2009.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] QT, CMake and ITK

2013-04-24 Thread John Drescher
On Wed, Apr 24, 2013 at 3:31 PM, Gabriel Santiago
santiago.eletr...@gmail.com wrote:
 Actually my CMake is 2.8.7, ITK is 3.20.1 and QT is the latest...


I believe this file should work. Although I really do not have any
more time to help if it does not.

project(test)

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)

find_package(Qt4 REQUIRED)
include(${QT_USE_FILE})

find_package(ITK REQUIRED)
include( ${ITK_USE_FILE} )

set( qtproject_SRCS main.cpp)

set(qtproject_UIS mainwindow.ui)

QT4_WRAP_UI(qtproject_UIS_H ${qtproject_UIS})

include_directories(${CMAKE_CURRENT_BINARY_DIR})

add_executable(test ${qtproject_SRCS} ${qtproject_UIS_H})

TARGET_LINK_LIBRARIES(test ${ITK_LIBRARIES} ${QT_LIBRARIES} )

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtkusers] compiling examples using Xcode

2013-04-03 Thread John Drescher
 I already have CMake 2.8.1 installed. Sorry for not specifying that earlier.
 I also have installed the GIT repository version of VTK.


If CMake is not found then it is either not properly installed or not
in your path.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to avoid having /D _MBCS ?

2013-03-21 Thread John Drescher
On Thu, Mar 21, 2013 at 10:20 AM, Martin Koller martin.kol...@etm.at wrote:
 In my win project, when I use the visual studio generator (64bit), I always 
 get the /D _MBCS flag in the compiler options
 (started with msbuild).
 When I generate Makefiles with the same project (JOM NMakefiles), _MBCS is 
 not defined.
 I do not want to have it defined. How can I avoid it and still using vcxproj 
 files ?
 --

I would use remove_definitions(-D_MBCS)

x:\x64\VC.110cmake --help-command remove_definitions
cmake version 2.8.10.2
  remove_definitions
   Removes -D define flags added by add_definitions.

 remove_definitions(-DFOO -DBAR ...)

   Removes flags (added by add_definitions) from the compiler command
   line for sources in the current directory and below.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Build several targets using cmake --build dir

2013-03-14 Thread John Drescher
 I use cmake 2.8.10 on windows.



 I would like to build several targets with cmake --build dir so  the
 underlying build tool to do parallel jobs.



 Currently it only seems to be possible to build one target at a time, using
 --target .
 (http://www.cmake.org/cmake/help/v2.8.10/cmake.html#opt:--builddir)



 Can someone tell me how I could achieve that with current cmake version?


I execute more than 1 cmake --build at the same time on windows. I
actually do this in a program called runjobs

http://www.codeproject.com/Articles/25810/Run-All-Jobs-at-Once-Utility

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Check for working C compiler using: Visual Studio 10 -- broken

2013-03-05 Thread John Drescher
On Tue, Mar 5, 2013 at 10:58 AM, David Cole dlrd...@aol.com wrote:
 Is your VS 2010 up to date with respect to available service packs?


I was going to ask that because Visual Studio 2010 RTM has a nasty
optimizer bug that caused me some pain in the past. SP1 fixed that
issue.


John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake and Visual Studio platforms

2013-03-01 Thread John Drescher
 If CMake developers say that the code is simply not structured like that, or
 it is too much work to rewrite these parts (and a few others that might
 depend on it), then I leave this subject be and not bother again with it.

David led the CMake development for years.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake and Visual Studio platforms

2013-03-01 Thread John Drescher
On Fri, Mar 1, 2013 at 10:52 AM, John Drescher dresche...@gmail.com wrote:
 If CMake developers say that the code is simply not structured like that, or
 it is too much work to rewrite these parts (and a few others that might
 depend on it), then I leave this subject be and not bother again with it.

 David led the CMake development for years.

http://www.kitware.com/blog/home/user/9

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake and Visual Studio platforms

2013-02-28 Thread John Drescher
 There are multiple posts in multiple forums asking this question, so
 naturally there is public need for this feature. How come CMake never aimed
 at creating a solution for this? I suspect there is some great design issue
 that prevents implementing it in CMake. There are several platform and
 generator specific options already inside CMake, why can't this be another
 one?

I believe the current method of forcing the developer to use different
build trees for 64bit and 32bit works very well. I have used this for
almost 5 years now of development under Visual Studio 2005 to 2012.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake and Visual Studio platforms

2013-02-28 Thread John Drescher
On Thu, Feb 28, 2013 at 6:31 AM, John Drescher dresche...@gmail.com wrote:
 There are multiple posts in multiple forums asking this question, so
 naturally there is public need for this feature. How come CMake never aimed
 at creating a solution for this? I suspect there is some great design issue
 that prevents implementing it in CMake. There are several platform and
 generator specific options already inside CMake, why can't this be another
 one?

 I believe the current method of forcing the developer to use different
 build trees for 64bit and 32bit works very well. I have used this for
 almost 5 years now of development under Visual Studio 2005 to 2012.

Also there are reasons why this will not work in the current design.
Outside of the few CMAKE variables that are set for the compiler that
would be wrong the biggest problem I believe would be libraries. You
can not link a x64 library with a 32 bit program so CMake would have
to track what libraries were x64 versus 32bit which may seem like just
adding additional configurations over Release,Debug ... would solve
but that will not work with the way finders work. Also I do not
believe CMake supports this configuration on any other platform.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMAKE_SYSTEM_PROCESSOR says x86 on Win64

2013-02-21 Thread John Drescher
On Thu, Feb 21, 2013 at 2:46 PM, Martin Koller martin.kol...@etm.at wrote:
 Hi all,

 I found an old cmake bug entry (see below) for the problem I have:

 I downloaded and installed the 32bit cmake exe on a 64bit windows
 and wanted to build our project as 64bit executable. However in our
 cmake files (which are used for Linux, Solaris, windows) we often check
 for the current processor architecture we build for as we need to link
 against external libraries which are stored in different subdirs etc.

 Problem is: as cmake is a 32bit exe, wincrap always returns a value
 of x86 even on a 64bit machine as described here:
 http://blogs.msdn.com/b/david.wang/archive/2006/03/26/howto-detect-process-bitness.aspx

 In brief - they say to detect the current CPU shall be done as:

 IF PROCESSOR_ARCHITECTURE == amd64 OR
PROCESSOR_ARCHITEW6432 == amd64 THEN
// OS is 64bit
 ELSE
// OS is 32bit
 END IF

 I think this should really be fixed in cmake directly to be able
 to use this cmake variable in a true platform independant way
 (at least it already works perfectly for all other platforms)
 and the cmake doc suggest that it tells me excactly that:
 CMAKE_SYSTEM_PROCESSOR: The name of the CPU CMake is building for.
 which is not correct in this case.


Here is what works for me:

if (CMAKE_SIZEOF_VOID_P MATCHES 8)
set( PROJECT_ARCH x86_64 )
else(CMAKE_SIZEOF_VOID_P MATCHES 8)
set( PROJECT_ARCH x86 )
endif(CMAKE_SIZEOF_VOID_P MATCHES 8)

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem in configuring VTK with Visual Studio 2010, Windows 7 64bit.

2013-02-20 Thread John Drescher
On Wed, Feb 20, 2013 at 2:07 PM, amitsuveer amitsuv...@gmail.com wrote:
 I am using cmake-2.8.10.2-win32-x86 and vtk-5.10.1.

 I am trying to configure VTK, I have installed Visual Studio 10 (not the
 express version, the full one along with SP1), with x64 support. However,
 when selecting Visual Studio 10 (for 32 bit)or Visual Studio 10 x64 and
 choosing the default native compilers, I have the following errors.

 ---
 Error in configuration process, project files may be invalid

 The C compiler identification is unknown
 The CXX compiler identification is unknown

Did you select the correct generator when you ran cmake-gui?

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] So Long

2013-02-01 Thread John Drescher
 Thought I'd ping the CMake mailing lists one last time before I have to give
 up david.c...@kitware.com... ;-)

Thanks for all your hard work on 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


Re: [CMake] unable to view file properties using CMAKE 2.8.7 in VS2010

2013-01-31 Thread John Drescher
 Hey there. I created a bare minimum cmake project



 ADD_LIBRARY (foo foo.c)



 When I open that solution in VS2010 and right click on foo.c and select
 properties, the properties dialog comes up but when I try to view each
 property (C/C++  General, Optimization, Preprocessor, etc…), nothing
 displays. The view is literally blank. No fields, just white. If I make the
 same project using the visual studio 2010 wizard instead of cmake, I am able
 to see properties.



 Is there something I need to enable in CMAKE to see these properties or is
 this a bug?


Properties work for my projects in VisualStudio 2010 for me when using
CMake-2.8.10.2 to generate my projects.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to handle RelWithDebInfo and MinSizeRel when not built?

2013-01-18 Thread John Drescher
 The suggestion in the bug report looks somewhat reasonable to me, but then
 again, we don't actually create separate debug info, and the 'Release'
 configuration would be no different to the 'RelWithDebInfo' configuration,
 so it's sort of a 'lie'.

 The real need for it though is probably that it allows the downstream of Qt
 to use RelWithDebInfo themselves?

 The alternative way to do that would be to set the MAP_IMPORTED_CONFIG*
 properties. I'm not sure whether I should advise that and close the bug
 report, or should I implement the suggested change.

 Any ideas?

As a windows programmer who regularly uses CMake generated
RelWithDebInfo targets with Qt4 since 2008 I believe the behavior of
using the Release versions for RelWithDebugInfo is fine (and actually
preferred for me). If I need to debug deeply into a Qt problem I will
switch to use the Debug build however most of the time for itk or vtk
I want to use RelWithDebInfo to debug since these tend to be slow to
Debug in Debug mode that is when I use dicom images that are similar
resolution to what my programs typically use.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtkusers] Fwd: CMAKE_MAKE_PROGRAM is not set - Win7 and Visual Studio 10

2012-12-12 Thread John Drescher
On Wed, Dec 12, 2012 at 4:03 AM, Benoît Thiébault thieba...@artenum.com wrote:
 Hi everyone,

 I sent this question on CMake mailing list a week ago and never had any
 answer.

 As it deals with compiling VTK, I'm thinking maybe some of you have a
 solution.


Can't you specify the location of the make program in CMake-gui? That
is until a better solution is worked out.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [vtkusers] Fwd: CMAKE_MAKE_PROGRAM is not set - Win7 and Visual Studio 10

2012-12-12 Thread John Drescher
 The question is: what is the location of the make program?

 If I remember correctly, on Windows XP, I did not have to install MinGW to
 compile VTK. Just Visual Studio Express was required.

 Do I have to install MinGW?

Not unless you want to move your development to MinGW.

Or is it provided by VS?


This should be devenv.com or msbuild.exe (located in your system .NET
location). However I believe the express version of VisualStudio does
not work with MSBuild so make it the location of devenv.com


 A more general question, what is the recommended way to compile VTK on
 Windows?

I am not sure about recommended however I build vtk from the command
line via a Visual Studio command prompt.

I first configure VTK to turn off shared libraries because I want to
avoid having to copy dlls around.

cmake --build PathToBuildFolderForVTK --config Debug
cmake --build PathToBuildFolderForVTK --config Release
cmake --build PathToBuildFolderForVTK --config RelWithDebInfo

After that I do not install VTK. Since the INSTALL will only install a
single configuration. I instead point my own projects that use cmake
to use the vtk build folder as VTK_DIR and CMake is happy to set it up
so that my debug configurations will use debug vtk libs and my release
applications will use release vtk libs.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Testing Qt 5 RC 1 CMake files

2012-12-12 Thread John Drescher
 I didn't try running any examples, but I also ported it to Qt 5. My patch
 for that is attached. John, the patch for older VTK versions should be
 similar if you wish to try it.


I will see what I can do this weekend.

Thanks,
John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Testing Qt 5 RC 1 CMake files

2012-12-11 Thread John Drescher
On Tue, Dec 11, 2012 at 12:02 PM, Stephen Kelly steve...@gmail.com wrote:
 John Drescher wrote:

 I emailed before about reviewing Config files that are being shipped with
 Qt 5 and got great feedback:


 http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7165/focus=41551

 Now that Qt 5 beta 2 is out, I'd like to ask for feedback again on
 anything that can still be changed before Qt 5.0. Note that Qt 5 beta 1
 was broken regarding cmake files on Windows and Mac. As those are not
 primary platforms for me, I'd particularly appreciate feedback on those.

 You can download Qt 5 beta 2 here:

  http://qt-project.org/downloads

 Known issues are here:

  http://qt-project.org/wiki/Qt500beta2KnownIssues

 cmake related documentation is here:

  http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html

 unit tests are here:

  https://qt.gitorious.org/qt/qtbase/trees/master/tests/auto/cmake

 Thanks for any feedback!


 I will try to take a look at this on a windows 7 x64 test box when I can.

 Thanks for the offer. Did anything come of this?


I had some trouble building a x64 version of Qt 5.0 beta2 but then
after getting past that I found out that vtk-5.10.X would not work
with Qt5 so it pretty much ended what I wanted to test since pretty
much all of my current code uses vtk.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] COMPILE_DEFINITIONS

2012-12-11 Thread John Drescher
On Tue, Dec 11, 2012 at 2:24 PM, John Drescher dresche...@gmail.com wrote:
 My goal is to a specific definition to the Debug and RelWithDebInfo
 configurations for all targets in the project but not to the Release
 configuration when using VisualStudio. I believe that
 COMPILE_DEFINITIONSCONFIG appears to support this however I am
 unsure if I have to get the previous value of the COMPILE_DEFINITIONS
 before setting the new value?



It looks like

set_property(
DIRECTORY
APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG MyDef
)

set_property(
DIRECTORY
APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO MyDef
)

is what I am after.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Testing Qt 5 RC 1 CMake files

2012-12-11 Thread John Drescher
 In VTK 5.10, there were some other configure time options (I'd have to go
 look them up or try it out) to control building the Qt-related bits...


In vtk-5.X you needed to enable VTK_USE_GUISUPPORT then that gave you
the ability to enable VTK_USE_QT

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Testing Qt 5 Beta 2 CMake files

2012-11-28 Thread John Drescher
 I emailed before about reviewing Config files that are being shipped with Qt
 5 and got great feedback:

  http://thread.gmane.org/gmane.comp.kde.devel.buildsystem/7165/focus=41551

 Now that Qt 5 beta 2 is out, I'd like to ask for feedback again on anything
 that can still be changed before Qt 5.0. Note that Qt 5 beta 1 was broken
 regarding cmake files on Windows and Mac. As those are not primary platforms
 for me, I'd particularly appreciate feedback on those.

 You can download Qt 5 beta 2 here:

  http://qt-project.org/downloads

 Known issues are here:

  http://qt-project.org/wiki/Qt500beta2KnownIssues

 cmake related documentation is here:

  http://doc-snapshot.qt-project.org/5.0/qtdoc/cmake-manual.html

 unit tests are here:

  https://qt.gitorious.org/qt/qtbase/trees/master/tests/auto/cmake

 Thanks for any feedback!


I will try to take a look at this on a windows 7 x64 test box when I can.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with Visual Studio 2010, Windows 7 64bit

2012-11-28 Thread John Drescher
 A colleague mentioned that with the same setup he was getting the same
 error, and then installed SP1 for VS 2010 and things started working.

I also remember that Visual Studio 2012 RTM had an optimizer bug that
caused Qt applications to crash so the first thing I always do after
installing VS 2010 is install SP1.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to get Visual Studio to use more than a single core for compiling

2012-11-27 Thread John Drescher
On Tue, Nov 27, 2012 at 7:21 AM, Michael Jackson
mike.jack...@bluequartz.net wrote:


 On Nov 27, 2012, at 12:46 AM, Titus von Boxberg ti...@v9g.de wrote:

 Am 27.11.2012 05:24, schrieb Michael Jackson:
 That will teach me to hit enter in GMail..

 My question is this: What is the magic CMake incantation to get Visual
 Studio 2010 to use more than a single processor when compiling my
 project?
 You could add /MP to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS

 Regards
 Titus
 --



 Thanks for the tip. I'll give it a try.

I can tell you that sometimes its hard to get Visual Studio to make
good use of your cores (especially if you have 8 or 12 threads) even
though multithreded building is on. I believe there are too many parts
of the chain that are single threaded only.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to get Visual Studio to use more than a single core for compiling

2012-11-27 Thread John Drescher
On Tue, Nov 27, 2012 at 9:41 AM, Mateusz Loskot mate...@loskot.net wrote:
 On 27 November 2012 14:23, John Drescher dresche...@gmail.com wrote:

 On Tue, Nov 27, 2012 at 7:21 AM, Michael Jackson
 mike.jack...@bluequartz.net wrote:
 
 
  On Nov 27, 2012, at 12:46 AM, Titus von Boxberg ti...@v9g.de wrote:
 
  Am 27.11.2012 05:24, schrieb Michael Jackson:
  That will teach me to hit enter in GMail..
 
  My question is this: What is the magic CMake incantation to get Visual
  Studio 2010 to use more than a single processor when compiling my
  project?
  You could add /MP to CMAKE_C_FLAGS and CMAKE_CXX_FLAGS
 
  Regards
  Titus
  --
 
 
 
  Thanks for the tip. I'll give it a try.

 I can tell you that sometimes its hard to get Visual Studio to make
 good use of your cores (especially if you have 8 or 12 threads) even
 though multithreded building is on. I believe there are too many parts
 of the chain that are single threaded only.


 It's fairly easy to make both, VS and cl.exe, utilise multiple cores,
 even using command line. The problem is that build configurations like
 NMAKE require significant gymnastics:

 http://public.kitware.com/pipermail/cmake/2012-September/052116.html

 It is easier with VS projects:

 http://www.cmake.org/pipermail/cmake/2009-April/028669.html

My comment was even though it will do multithreaded builds with VS
projects for some projects it will build at very low CPU utilization
for long periods while other projects it maxes out at 100% on all 12
cores.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to get Visual Studio to use more than a single core for compiling

2012-11-27 Thread John Drescher
 Right, perhaps complex inter-project dependencies halt the processes.

I believe this is part of the reason. Projects like ITK with hundreds
of small utilities tend to utilize the cores after the dependent
libraries are built however my code that has very few utilities and
significantly more inter-project dependencies do not tend to make good
use of the cores.

On top of that it appears that VS building slows down significantly as
the # of include folders greatly increases. This cuts into CPU
utilization when the OS searches your includes for your header files.
In the past I have tried to get around the inter-project dependency
problem by building Release, Debug and RelWithDebInfo in 3 separate
processes only to find that on some builds this did not fix the issue
because the OS spent an a large portion of the build time searching
the include paths. I even tried to stop this by placing the projects
and includes on a RAM disk but even that did not totally fix the
issue.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake link trouble in Windows

2012-10-23 Thread John Drescher
  Thanks  for your help。 but now i am in another trouble.
 In Windows,i am trying to build a shard library,It needs to link dynamic
 library and static library。
 when i want to link a dynamic library,it  comes:
 (fatal error U1073:does not know how to generate ACE.lib)

 AUX_SOURCE_DIRECTORY(. SRC)
 ADD_LIBRARY(test  SHARED  ${FAN_SRC})
 LINK_DIRECTORIES(${ACE_LIB_DIR})
 TARGET_LINK_LIBRARIES(fan ACE)

 1. Actually, test should link ACE.dll,how to make test link to ACE.dll ?

 2.if i use LINK_LIBRARIES() instead of TARGET_LINK_LIBRARIES(),this may
 work,why ??

 AUX_SOURCE_DIRECTORY(. SRC)
 LINK_DIRECTORIES(${ACE_LIB_DIR})
 LINK_LIBRARIES(ACE)
 ADD_LIBRARY(test SHARED ${FAN_SRC})

 3.Seems Windows will give priority to link static library,but  i need to
 link dynamic library in my projects ,how could i do ??

 4.how do TARGET_LINK_LIBRARIES() and LINK_LIBRARIES() determine what kind of
 library to link  ?  DO i need to use LINK_LIBRARIES(ACE.dll) instead of
 LINK_LIBRARIES(ACE)  in  Windows ?


You do not link to DLLs on windows. You link to import libraries when
using dlls. During the dll creation it should create a .lib along with
the .dll.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] cmake on Windows x64

2012-10-15 Thread John Drescher
 Except that you have CMAKE_SYSTEM_PROCESSOR == x86 (event for Win64
 generators) in your CMake files along with all search paths which sometimes
 very inconvenient.

I am not sure that has ever caused me a problem on any of the 64 bit
applications I have written. The only problem I had with CMake was for
a while my x64 applications were being installed (by nsis) in Program
Files (x86) instead of Program Files. I have since fixed my
settings for NSIS and this has worked for over a year for me..

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmake on Windows x64

2012-10-15 Thread John Drescher
 Having CMAKE_SYSTEM_PROCESSOR be x86 for a 64-bit build is very 
 inconvenient when detecting machine-dependent compiler flags, constructing 
 directory names for outputs based on configuration, configuring third party 
 search directories, etc.  It's always possible to work around (among other 
 things, one can consult the generator string for Visual Studio builds, though 
 not for MinGW builds) but that doesn't mean it shouldn't be better behaved - 
 it's entirely reasonable to assume that CMAKE_SYSTEM_PROCESSOR should be the 
 target processor for the build, especially so that you can have similar 
 behavior on Windows, Linux, and Mac.  Though as previously discussed I also 
 have the opposite problem on Linux when compiling for 32-bit CPU on 64-bit OS.


I see. I have always compared the size of the pointer for 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


Re: [CMake] cmake on Windows x64

2012-10-12 Thread John Drescher
 I noticed that there is cmake binary package for Windows x64. Should a
 32-bit cmake (under syswow6432) be adequate for all cmake tasks? If
 not, what is the right way to build cmake for 64-bit. I tried building
 it on a 32-bit build server using the 64 bit generator (this build
 server routinely does 64-bit cross compiles). However, apparently some
 of the products of the 64-bit build are run to generate sources that
 are built by other parts of the build. This being a 32-bit box does
 not allow that and hence the cross-compile to 64-bit failed.


32 bit cmake works fine for 64 bit builds on x64. I use this almost
every day for the last 3+ years..

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Specifying libraries with a variable

2012-10-02 Thread John Drescher
On Tue, Oct 2, 2012 at 9:11 AM, Arindam Mukherjee
arindam.muker...@gmail.com wrote:
 Hi,

 I want to define a single variable in a top-level CMakeLists.txt and
 use it in multiple CMakeLists.txt in sub-directories to specify
 target_link_libraries for executables built in these subdirectories. I
 tried defining a custom variable in the root CMakeLists.txt and using
 it in others but its value doesn't seem to be used.

 Tried something:

 src/CMakeLists.txt
 
 set (MYPROJ_LINK_LIBS, iconv perfstat mylib)


 src/cmd/dsbv/CMakeLists.txt
 --
 target_link_libraries(${PROJECT_NAME}, ${MYPROJ_LINK_LIBS})

 What's the right way to achieve this?


Get rid of the comma in both statements. Also get rid of the quotes in the set.

set (MYPROJ_LINK_LIBS iconv perfstat mylib)
target_link_libraries(${PROJECT_NAME} ${MYPROJ_LINK_LIBS})


John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cross compiling for Windows x64/amd64 on 32-bit Windows

2012-10-01 Thread John Drescher
On Mon, Oct 1, 2012 at 4:35 PM, Arindam Mukherjee
arindam.muker...@gmail.com wrote:
 Hi,

 I have a Windows XP build setup with Visual Studio 2008 SP1 and
 Windows SDK 6. I have set up a CMake project for a source base that is
 built on Linux, Solaris, AIX and Windows. So far I have managed to get
 the Windows 32-bit build going but cannot make the x64 cross-compile
 work.

 It seems that CMake generates 32-bit builds even when I initialize the
 64-bit build system (vcvarsall.bat x64). What is the correct way to
 set such a build up.


I do not believe Visual Studio will build x64 targets on 32 bit
windows. The first issue would be installing the x64 compiler. However
I could be wrong.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [Insight-users] Building FLTK for Visual Studio 2010

2012-09-04 Thread John Drescher
On Tue, Sep 4, 2012 at 6:33 AM, Zein Salah zeinsa...@gmail.com wrote:
 Hi,

 Previously, i used to build fltk 1.1.7 with Cmake for VS2008 and
 everything (ITK, InsightApplication, etc.) worked fine.

 I try now to make the same using Cmake 2.8.9 for VS2010.
 Building FLTK 1.1.7  works fine (No error!). But Cmake fails
 to generate a project for InsightApplication. First, it did not include
 an entry for FLTK_FLUID_EXECUTABLE. When I add an entry
 manually, All error disappear except for this one:

 CMake Error at CMakeLists.txt:131 (INCLUDE):   include called with
 wrong number of arguments.  Include only takes one   file


This sounds like it did not find FLTK at all. I have seen this error
before on packages that were not found.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [Cmake] Retrieve all runtime dependencies

2012-09-03 Thread John Drescher
On Mon, Sep 3, 2012 at 11:05 AM, Klaim - Joël Lamotte mjkl...@gmail.com wrote:
 Hi,

 Is there any way in CMake to get a list of all binaries related to one
 target?
 What I mean is that assuming I have a target, say a library lib_a, that
 depends on lib_b and lib_c which are either SHARED or MODULE (so they
 produce a .dll/.so),
 is there a way or macro to get a string with the paths of each binary
 output:
.../.../.../lib_a.dll
.../.../.../lib_b.dll
.../.../.../lib_c.dll
 on windows, assuming I only provide the target name libi_a?

 My first thinking was that as CMake produce project files that have all
 these information, then it should be possible to get this list in some way.
 However I'm a bit lost on where to find the necessary information, in a
 generic way.
 Also, I think the build mode should be provided to any function or macro
 that would provide such a list.

 It would be extremely useful (to me) to get such a list, to apply some
 target's post-build scripts to these binaries.
 The simpler alternative is to have such list hand-written outside of CMake
 scripts, making the information located at more than one locations.


take a look at the GetPrerequisites cmake module.

-- 
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] cmake-gui's separation between configuration generation

2012-08-23 Thread John Drescher
 Is the separation between configuration  generation really necessary
 for cmake-gui? I ask because several of my co-workers are confused
 between the differences in the two, even though I explain it.

 Honestly there isn't really a reason that I can think of to do a
 configure without a generate, unless you're testing the integrity of
 your CMake script changes maybe, but even then, if its broken
 generation won't take place.

 The command line program does not separate the two, so I simply think
 cmake-gui should eliminate the configure button, and simply have a
 generate button. Does this seem fair? Is there a reason why they are
 separated?

I can think of one use case that I use that the separation is a good
thing. What about when you have options and variables that are
conditional depending on other CMake variables so that setting the
variables / options may take more than 1 configure.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Formatting CMakeLists

2012-08-23 Thread John Drescher
On Thu, Aug 23, 2012 at 11:39 AM, Jason T. Slack-Moehrle
slackmoeh...@gmail.com wrote:
 A few questions on formatting the CMakeLists file.

 Is there sort of a template that everyone uses to ensure not
 overwriting options, etc?

 Second, when using commands like:

 SET( CORE_SOURCE_FILES main.cpp )

 can I break lines like:

 SET( CORE_SOURCE_FILES main.cpp
 file1.cpp
 file2.cpp
 )

Yes.

Here is an example I have from one open project.

SET( ${PROJECT_NAME}_SRCS
./src/main.cxx
./src/MainWindow.cxx
./src/dbDev2App.cxx
./src/CmdCounterBalanceStudyModes.cxx
./src/CmdExportTable.cxx
)

 and do I have to use the quotes () around the source file names?


You do not need quotes around the source file names if there are no
spaces in the file names.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] EXECUTABLE_OUTPUT_PATH showing in list of cache variables

2012-08-23 Thread John Drescher
On Thu, Aug 23, 2012 at 4:55 PM, Robert Dailey rcdailey.li...@gmail.com wrote:
 I'm not sure if my eyes are playing tricks on me, but after upgrading
 to 2.8.9 I'm seeing EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH in
 my list of cache variables now, I don't remember seeing them before.

 Is this a feature? I didn't see any mention of this in the changelogs.

 If this is new, why do they show up now? According to the
 documentation, they seem to be deprecated since they are referred to
 as old.
 --

Hmm. Not showing up for me on 2.8.9 on windows 7 x64.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake is unable to find QtCore!

2012-08-12 Thread John Drescher
On Sun, Aug 12, 2012 at 10:30 AM, Toronto Andrew
andrew.loui...@gmail.com wrote:
 I get the following errors when trying to build my Qt project:

 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/FindQt4.cmake:595 (MESSAGE):
   Could NOT find QtCore.  Check

 And I need to manually point the CMake gui in the direction of qmake.exe;
 additionally, I receive these flags: QT_QTCORE_LIBRARY_DEBUG-NOTFOUND,
 QT_QTCORE_LIBRARY_RELEASE-NOTFOUND and QT_MKSPECS_DIR-NOTFOUND, and I  am
 unsure about how to get FindQt4.cmake to work properly.

 Thanks in advance!


Did you point cmake-gui to the location of qmake?

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake is unable to find QtCore!

2012-08-12 Thread John Drescher
On Sun, Aug 12, 2012 at 10:33 AM, John Drescher dresche...@gmail.com wrote:
 On Sun, Aug 12, 2012 at 10:30 AM, Toronto Andrew
 andrew.loui...@gmail.com wrote:
 I get the following errors when trying to build my Qt project:

 CMake Error at C:/Program Files (x86)/CMake
 2.8/share/cmake-2.8/Modules/FindQt4.cmake:595 (MESSAGE):
   Could NOT find QtCore.  Check

 And I need to manually point the CMake gui in the direction of qmake.exe;
 additionally, I receive these flags: QT_QTCORE_LIBRARY_DEBUG-NOTFOUND,
 QT_QTCORE_LIBRARY_RELEASE-NOTFOUND and QT_MKSPECS_DIR-NOTFOUND, and I  am
 unsure about how to get FindQt4.cmake to work properly.

 Thanks in advance!


 Did you point cmake-gui to the location of qmake?

Are all the Qt dlls in the same folder as qmake.exe? This should be
the bin folder inside of the Qt build.

-- 
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] Why are my static libs not being read?

2012-07-31 Thread John Drescher
 The qt libraries are included in the target link flag (this project uses qt
 of course), however the two lib files that exist in the lib folder in the
 same directory are either not recognized. They draw up linker issues in the
 compiler, even though I can tell through the cmake gui that it does find
 those paths.

 Any input at all would be great. Below I have included the CMakeLists.txt, a
 screenshot of the cmake gui as well as a sample of the linking errors being
 drawn.

 PROJECT(CppSampleQt01)
 FIND_PACKAGE(Qt4 REQUIRED)

 //These are the lines I am concerned do not function appropriately. However
 you can  http://i.imgur.com/EDrHR.png see here  that they are recognized by
 CMake
 FIND_LIBRARY(SIMPLONLIB lv.simplon lib)
 FIND_LIBRARY(SIMPLONIMGPROC lv.simplon.imgproc lib)

 SET(CppSampleQt01_SOURCES include/lv.simplon.class.cpp camera.cpp main.cpp
 mainwindow.cpp osdep.cpp paint.cpp)
 SET(CppSampleQt01_HEADERS include/lv.simplon.class.h camera.h mainwindow.h
 osdep.h paint.h)
 SET(CppSampleQt01_RESOURCES icons.qrc)

 INCLUDE(${QT_USE_FILE})
 ADD_DEFINITIONS(${QT_DEFINITIONS})

 ADD_EXECUTABLE(CppSampleQt01 ${CppSampleQt01_SOURCES}
 ${CppSampleQt01_HEADERS_MOC}
 ${CppSampleQt01_RESOURCES_RCC})

 TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES})

You need to add your 2 libraries in TARGET_LINK_LIBRARIES. CMake will
not do that automatically.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Why are my static libs not being read?

2012-07-31 Thread John Drescher
On Tue, Jul 31, 2012 at 2:21 PM, Toronto Andrew
andrew.loui...@gmail.com wrote:
 Include it using the flags? Like so:


 TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES} SIMPLONLIB
 SIMPLONIMGPROC) ?

 Because when I did this, the libs were not found either.


I think it should be:

TARGET_LINK_LIBRARIES(CppSampleQt01 ${QT_LIBRARIES} ${SIMPLONLIB}
${SIMPLONIMGPROC})

since both of these should be variables.




John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Why are my static libs not being read?

2012-07-31 Thread John Drescher
On Tue, Jul 31, 2012 at 2:54 PM, Toronto Andrew
andrew.loui...@gmail.com wrote:
 Thank you John, this did work. I get the idea now, thank you.

 I have another concern though, that I hope I can be helped with though it's
 doesn't fall under the original problem.

 So I am using a project within my project: http://i.imgur.com/bqqnp.png, and
 I found a custom
 https://qextserialport.googlegroups.com/attach/9b25d0e5e8974d99/CMakeLists.txt?view=1part=4
 CMakeLists.txt  for it created by the developers, and I was wondering how
 would I go about integrating that into my existing CMakeLists.txt, any input
 regarding how to go about doing this will be greatly appreciated.

 Thank you guys once again!


One way is to put this file along with the sources in a subdirectory
of your project and use the add_subdirectory cmake command to add that
to your project. Then add qextserialport to your
TARGET_LINK_LIBRARIES. This time just use qextserialport since it is
not a variable but a target. You will also have to add a entry to your
include_directories for the location of the .h file in this
subdirectory.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] file cannot create direc

2012-07-21 Thread John Drescher
   file cannot create directory:
   C:/JenkinsCI/jobs/te/workspace/_CPack_Packages/win32/ZIP/libhello-1.0.9
   /lib.  Maybe need administrative privileges.

Does this folder exist? Can you create this using your user account?

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] file cannot create direc

2012-07-21 Thread John Drescher
 well this is created and doesn't exist from the beginning:
 _CPack_Packages/win32/ZIP/libhello-1.0.9

 when I try to go in and delete this folder by hand I can't. The libhello is
 locking up the hole thing. It just says I can't remove it and I have tried
 everything.
 I can create things in the ZIP file but below that nothing. It is just like
 it doenst exist but I can see it.

 I have no clue what so ever whats wrong.


Sounds like this is either a problem with an antivirus, OS locking or
your hard drive is going bad. For the latter install CrystalDiskInfo
and see if it says your drive is any other status than good.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] cmakelists.txt

2012-06-24 Thread John Drescher
On Sun, Jun 24, 2012 at 5:57 AM, Heena Mahur hen...@rocketmail.com wrote:
  Hey,I need to that what should i do in
 cmakelists.txt http://pastebin.com/raw.php?i=BGV9NAmQ since i am getting
 this error  (target_link_libraries):   Cannot specify link libraries for
 target ptedit_1 which is not built by   this project.
 Please suggest the errors and the suggested commands in detail .I am a
 beginer
 Reagards
 Bye

put the kde4_add_executable line before the target_link_libraries line.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to deal with pre built 3rd party libs?

2012-05-15 Thread John Drescher
 I have a project that depends on 3rd party dll's (libxml2).

 Is there a 'best practice' to deal with associated files, .h, .lib .dll of
 such within a CMake project?

 My library needs to link to the 3rd party lib, and needs its dll for
 execution (obviously), so I feel the need for copying this DLL to my libs
 'install/bin' folder, so that any of my executables can run, without getting
 a '...dll not found'.



I wrote cmake macros to generate a batch file containing cmake -e
commands to copy the dlls to each configuration. This I run as a
target in my projects.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Moving large MSVS projects to CUDA

2012-05-07 Thread John Drescher
 I’ve
 had issues in the past trying to perform a configure command in CMake-gui
 when the buidl directory already existed..?

I do this all the time for years. No problems at all.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Clear cache on upgrade?

2012-04-23 Thread John Drescher
On Mon, Apr 23, 2012 at 1:46 PM, Robert Dailey rcdailey.li...@gmail.com wrote:
 I am wondering what a good rule of thumb is when upgrading CMake. Should I
 delete my cache after each upgrade? I'm on Windows.
 --

I never ever do that on windows. And I have done 100s of builds with
CMake and many upgrades since CMake 2.4.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Clear cache on upgrade?

2012-04-23 Thread John Drescher
 A good rule of thumb is to try just upgrading CMake and running it on
 existing build trees. It's obviously quicker than a re-configure from
 scratch.

 But then, before complaining about something not working, try it in a fresh
 build tree first, then if it's still wrong, complain. :-)

 It's rare, although it does happen sometimes, that we make a change in CMake
 itself that invalidates something that's in an existing cache.


Fully agreed.. It has been quite rare that a CMake upgrade has caused
a problem or a need to re configure.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Wrong cl.exe getting picked up

2012-03-15 Thread John Drescher
 OK, but it does try to fill in the CMAKE_C_COMPILER value.  What are you
 suggesting?  That this is a bug or some kind of mistake on my part thinking
 that the value in CMAKE_C_COMPILER is somehow relevant for Visual Studio
 targets?


CMAKE_C_COMPILER is not used for Visual Studio targets
--

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] Forcibly run 'moc' on Qt files that are NOT part of the build

2012-03-07 Thread John Drescher
 I would have to say that I didn't dig into the QT4_WRAP_CPP macro at all. If 
 I had I would have probably answered my own question. I will give you idea a 
 shot and report back if it works or not. Thanks for the idea.


Please do so. I would be very interested in your findings on this one..

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio 10 - GenerateDebugInformation always false

2012-03-01 Thread John Drescher
On Thu, Mar 1, 2012 at 10:01 AM, Johannes Sasongko sason...@gmail.com wrote:
 Are you using CMake 2.8.7? If not, please upgrade and try with that
 version. If there's still a problem after that, let us know.


 Yes, I'm using 2.8.7. I've tested it on a very simple project (essentially
 just a Hello World with one lib and one exe), from an empty cache/build dir,
 and am still seeing the problem.


I am not seeing this at all on Windows 7, Windows 2008 with 2.8.7 and
Visual Studio 2010 or Visual Studio 2008.

Can you make a small example?

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] smarter shortcuts with NSIS

2012-02-27 Thread John Drescher
 By the way, how do I see the actual paths NSI configuration that generates
 the final exe?
 It seems that if NSIS works the file used get all removed..

It does not get removed for me using Visual Studio 2010. All of the
NSIS stuff exists in a _CPack_Packages folder inside of the build
tree.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] smarter shortcuts with NSIS

2012-02-27 Thread John Drescher
 Ah yes you're right, last time I checked I didn't see them..
 Anyway my extra_commands don't appear anywhere in the nsi file, is that
 normal?

I can't help with that part. I do add components also executables with
shortcuts for my executables by setting the CPACK_PACKAGE_EXECUTABLES
variable. However I never mess with changing the installation folders
or creating shortcuts directly.


-- 
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] Is there a cookbook?

2012-02-24 Thread John Drescher
 but my point
 here is that we really need a CMake CookBook or snippet repository. I always
 hit the FAQ first, but that /explains/ when what a coder tends to need in
 that frame of mind is a living example.

Maybe some user committed examples in the wiki just like what has been
done for the vtk and itk examples..

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Can't generate Release build in Visual Studio 9

2012-02-24 Thread John Drescher
 2. Do batch building. I do this option. Look at the cmake --build command


Here is an example of this for one of my current projects (not exactly
what I do but close enough):

rem configure
pushd .
cd X:\64Bit\VC.100\Qt\StudyManager
cmake X:/CMakeBased/Qt/StudyManager
popd

rem build the nsis package.
cmake --build X:/64Bit/VC.100/Qt/StudyManager --config Release --target PACKAGE

X:/64Bit/VC.100/Qt/StudyManager is the build folder containing the
.sln CMakeCache.txt ...


John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] simplest possible NSIS package

2012-02-23 Thread John Drescher
 Just to make you laugh I found the source of the problem.
 Apparently if you try to run an installer from a directory which is on a
 shared directory (with the virtualbox
 sharing) it just won't run :D

 Copying it somewhere else works perfectly, quite amazing issue.


Thanks for reporting back. That was very puzzling to me since my NSIS
builds have worked for a long time.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [Insight-users] CMake configure insightapplications with FLTK

2012-02-23 Thread John Drescher
On Thu, Feb 23, 2012 at 6:19 PM, Yang, Jinzhong jinzhon...@gmail.com wrote:
 Hi All,



 I was trying to configure InsightApplications in CMake with USE_FLTK turned
 on, but I continuously got the error message:



 CMake Error at CMakeLists.txt:128 (INCLUDE):

 include called with wrong number of arguments. Include only takes one

 file.


That means on line 128 you have an

include( ${SomeCmakeVariable} )

and the cmake variable is blank.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Shared intermediary files

2012-02-21 Thread John Drescher
On Mon, Feb 20, 2012 at 4:07 PM, Kevin Schmidt ke...@eyesopen.com wrote:
 Hello,

   I’m in the process of converting over a large, monolithic tree with many
 libraries from a custom build solution over to cmake.  So far, we’ve loved
 it.  I am wondering about others’ solutions to a problem we have
 encountered.



 We have more than a few cases of generated source files - for example, Qt
 moc files.   These all get dumped into CMAKE_CURRENT_BINARY_DIR.  Now, the
 libraries we have build both static  shared, and have the same source
 files.  In Visual Studio, this generates two projects in the solution.  It
 seems that these do not share dependencies.  Occasionally, this means that
 both libraries try to write to the generated source file at the same time,
 which generates a (false) build failure.



 What do others do?  Am I misunderstanding something?


I have my batch build script that calls cmake --build for each
configuration build 2 times. This works for almost all cases. However
when building VTK in parallel the generation of 1 unicode header
usually fails.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Generating CMake scripts from Visual Studio solutions projects?

2012-02-18 Thread John Drescher
 2+ years? That could easily end up like a Yugo vs. Porsche surprise ;)


 The original vcproj2cmake script was composed of 300 lines,
 and now the project is to the tune of around 4000 lines.


I have a lot of 5 to 15 year old MFC code(applications, dlls, static
libraries) that I would like to use this on. I could give it a test
sometime next week.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake hangs on testing -- Check for working C compiler using: Visual Studio 10

2012-02-18 Thread John Drescher
 Now I don't know what is happening. This is no longer working. Back to
 hanging up.


I have never had this hang and I use visual studio 2010 SP1 daily for
over a year with cmake. Now I am on cmake-2.8.7 however I have used
probably every other 2.8 release as well.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Cmake hangs on testing -- Check for working C compiler using: Visual Studio 10

2012-02-18 Thread John Drescher
On Sat, Feb 18, 2012 at 11:23 PM, Nicky Perian nickyper...@gmail.com wrote:
 Applied 5 additional microsoft updates related to sp1 and seems to by
 working. Need to follow my own advice and apply updates to exhaustion.

I do have Microsoft Update running on all machines that I use CMake/VS
2010 and all of them are kept up to date.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Generating CMake scripts from Visual Studio solutions projects?

2012-02-17 Thread John Drescher
 Did you try the tool listed in the Wiki
 http://www.cmake.org/Wiki/CMake#Visual_Studio


I would be interested in if you get any of these to work well with non
trivial projects. When I last looked at some of these (probably 2+
years ago so things may have changed) they did not work well with my
complex visual studio projects.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] On WINDOWS, Is it Possible to build 64-bit and 32-bit Solutions in One Go?

2012-02-16 Thread John Drescher
On Thu, Feb 16, 2012 at 2:54 PM, Hashim Mir h...@rim.com wrote:
 Hi,



 This is what I am doing presently in order to compile both a 32-bit and a
 64-bit version of my project:



 cmake.exe -G “Visual Studio 9 2008” #for x32

 cmake.exe -G “Visual Studio 9 2008 Win64”   #for x64



 Is it possible to consolidate the two individual statements into one
 somehow, in order to compile both 32 and 64 bit configurations of my project
 files with one command?


No. CMake does not allow this. Only 1 generator can exist for a solution.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] On WINDOWS, Is it Possible to build 64-bit and 32-bit Solutions in One Go?

2012-02-16 Thread John Drescher
On Thu, Feb 16, 2012 at 3:27 PM, John Drescher dresche...@gmail.com wrote:
 On Thu, Feb 16, 2012 at 2:54 PM, Hashim Mir h...@rim.com wrote:
 Hi,



 This is what I am doing presently in order to compile both a 32-bit and a
 64-bit version of my project:



 cmake.exe -G “Visual Studio 9 2008” #for x32

 cmake.exe -G “Visual Studio 9 2008 Win64”   #for x64



 Is it possible to consolidate the two individual statements into one
 somehow, in order to compile both 32 and 64 bit configurations of my project
 files with one command?


 No. CMake does not allow this. Only 1 generator can exist for a solution.

And I mean in the same build folder tree. You can however make 2 build
folder trees and use a batch file to have both build separately at the
same time from the command prompt.

John
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Doesn't anyone know how to get precompiled headers working under CMake for Visual Studio 2010?

2012-02-16 Thread John Drescher
On Thu, Feb 16, 2012 at 7:39 PM,  david_bjorn...@agilent.com wrote:
 My team has been using precompiled headers under CMake and Visual Studio
 2008 for quite a while.  Now we’ve switched to VS 2010,  the cmake code we
 used to support precompiled headers is no longer working.



 The following is the code in question and we’re just using
 set_source_files_properties to add the appropreiate /Yc , /Yu and /FI flags.



 It appears, under VS 2010, the property manager is not accepting or over
 writing these settings.



 Doesn’t anyone know how to get precompiled headers working under CMake for
 Visual Studio 2010?









 IF(EXISTS ${pch_unity})

    FILE(READ ${pch_unity} buffer)

 ENDIF(EXISTS ${pch_unity})

 IF(NOT (${buffer} STREQUAL ${file_contents}))

    FILE(WRITE ${pch_unity} ${file_contents})

 ENDIF(NOT (${buffer} STREQUAL ${file_contents}))

 SET_SOURCE_FILES_PROPERTIES(${pch_unity}  PROPERTIES COMPILE_FLAGS
 /Yc\${pch_abs}\)



 ###

 #

 # Update properties of source files to use the precompiled header.

 # Additionally, force the inclusion of the precompiled header at beginning
 of each source file.

 #

 FOREACH(source_file ${srcFilesThatUsePCH} )

    SET_SOURCE_FILES_PROPERTIES(

  ${source_file}

  PROPERTIES COMPILE_FLAGS

  /Yu\${pch_abs}\ /FI\${pch_abs}\

    )

 ENDFOREACH(source_file)



 ###

 #

 # Finally, update the source file collection to contain the precompiled
 header translation unit

 #

 SET(${FILES_VARIABLE_NAME} ${${FILES_VARIABLE_NAME}} ${pch_unity}
 PARENT_SCOPE)



For me I use the same exact macro that I have used since VS 2005.

Attached is the macro and here is an example library that uses the macro.

SET( ${PROJECT_NAME}_SRCS
./src/smException.cxx
./src/smitkIndent.cxx
./src/smState.cxx
./src/smPropertyMap.cxx
./src/smOperation.cxx
./src/smPgmSettings.cxx
./src/smStringList.cxx
./src/smObject.cxx
./src/smAppBase.cxx
./src/smSpawnJob.cxx
./src/smLog.cxx
./src/smBIRADS7.cxx
./src/smErrorBase.cxx
)

SET( ${PROJECT_NAME}_EXT_HDRS
./Include/smException.h
./Include/smitkIndent.h
./Include/smMacros.h
./Include/smPropertyMap.h
./Include/smOperation.h
./Include/smPgmSettings.h
./Include/smStringList.h
./Include/smConstants.h
./Include/smLog.h
./Include/smBIRADS7.h
./Include/smErrorBase.h
)

SET( ${PROJECT_NAME}_MOC_HDRS
./Include/smState.h
./Include/smObject.h
./Include/smAppBase.h
./Include/smSpawnJob.h
)

# some .ui files
SET( ${PROJECT_NAME}_UIS
)

# and finally an resource file
SET( ${PROJECT_NAME}_RCS
)

SET( ${PROJECT_NAME}_INT_HDRS

)

#Add precompiled header support
MSVC_PCH_SUPPORT(${PROJECT_NAME})

# this command will generate rules that will run rcc on all files from
UPMC_LA_RCS
# in result UPMC_LA_RC_SRCS variable will contain paths to files produced by rcc
QT4_ADD_RESOURCES( ${PROJECT_NAME}_RC_SRCS ${${PROJECT_NAME}_RCS} )

# and finally this will run moc:
QT4_WRAP_CPP( ${PROJECT_NAME}_MOC_SRCS ${${PROJECT_NAME}_MOC_HDRS} )

# this will run uic on .ui files:
QT4_WRAP_UI( ${PROJECT_NAME}_UI_HDRS ${${PROJECT_NAME}_UIS} )

IF(BUILD_EXPERIMENTAL)
add_subdirectory(Experimental)
ENDIF(BUILD_EXPERIMENTAL)

include_directories(
${PROJECT_BINARY_DIR}
${PROJECT_BINARY_DIR}/..
${PROJECT_SOURCE_DIR}/Include
${STUDY_MANAGER_SRC}/Include
)

add_library(${PROJECT_NAME}
${${PROJECT_NAME}_SRCS}
${${PROJECT_NAME}_EXT_HDRS}
${${PROJECT_NAME}_MOC_HDRS}
${${PROJECT_NAME}_MOC_SRCS}
${${PROJECT_NAME}_INT_HDRS}
${${PROJECT_NAME}_UI_HDRS}
${${PROJECT_NAME}_RC_SRCS}
)

John


MSVCPCHSupport.cmake
Description: Binary data
--

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] What can cause cmake (2.8.4 and 7) to fail after upgrade of Visual Studio 10 Express to Professional? stackoverflow question. posting here

2012-02-13 Thread John Drescher
On Mon, Feb 13, 2012 at 12:15 AM, Nicky Perian nickyper...@gmail.com wrote:

 Solved by uninstalling all versions of Visual Studio and reinstalling Visual 
 Studio 10 Professional.



Although I have no idea why you had this problem, I have 5 versions of
Visual Studio installed and I use cmake 2.8.7 with 3 of them without
this issue.


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


  1   2   3   4   5   6   >