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
> The SLN solution contains all possible build-types. The user just have to
> select which one they want (i.e. in Visual Studio, not cmake)
>

Continuing on this subject. The default configuration in Visual Studio
is Debug so that is why debug is selected.

There are many ways around this:

1. You could reduce the configurations that CMake creates down just to
the one you want.

2. Do batch building. I do this option. Look at the cmake --build command

3. Use nmake makefiles (I believe)

4. Generate a new .user file to specify the default build for your
project in visual studio when you configure the project in cmake.

...

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] 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] Visual Studio 10 - GenerateDebugInformation always false

2012-03-01 Thread John Drescher
On Thu, Mar 1, 2012 at 10:01 AM, Johannes Sasongko  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] Where can I download the cmake for win64?

2012-03-03 Thread John Drescher
> I download the cmake-2.8.7-win32-x86.exe , but it failed when it works with
> visual studio 2008 win64 and give the message below:
>
> Check for working C compiler using: Visual Studio 9 2008 Win64
>
> Check for working C compiler using: Visual Studio 9 2008 Win64 -- broken
>
> CMake Error at C:/Program Files (x86)/CMake
> 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
>
> The C compiler "cl" is not able to compile a simple test program.
>

I have seen a few instances of this on the list. I think a good deal
of them were either a botched compiler install or a permissions
problem.

> It fails with the following output:
>
> Change Dir: I:/CMake2.8.7-x64/CMakeFiles/CMakeTmp
>
> Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\devenv.com
>
> CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec
>
> Microsoft (R) Visual Studio 9.0.21022.8
>
> 
>
> CMake will not be able to correctly generate this project.
>
> Call Stack (most recent call first):
>
> CMakeLists.txt:14 (PROJECT)
>
> Configuring incomplete, errors occurred!
>
>
>
> How could i fix the errors? And where can I download the cmake for win64?
> I'm very appreciate if someone answer the question above.
>

The 32 bit version works fine for win64. You can get the source and
build a 64 bit cmake however that does not really give you anything
more than the 32 bit version does. Its not like you need 4GB of ram to
create your 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] 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] 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] Clear cache on upgrade?

2012-04-23 Thread John Drescher
On Mon, Apr 23, 2012 at 1:46 PM, Robert Dailey  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] 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] 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] Headers for VC project files

2008-10-29 Thread John Drescher
On Wed, Oct 29, 2008 at 7:07 PM, Powei Feng <[EMAIL PROTECTED]> wrote:
> Hi,
> This is probably yet another noob question.  When I use
> cmake to generate Visual Studio project files, only the
> sources (cpp's) show up in the project.  Is there a flag I
> can set to include the headers (h's) as well.
> Thanks in advance,
>

Include the headers in the target. Here is an example project that I
am working on:

INCLUDE_DIRECTORIES(${PROJECT_BINARY_DIR})

IF(WIN32)
SET(CMAKE_CXX_FLAGS "/WL /GR /EHsc" )
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(WIN32)

ADD_DEFINITIONS(-DNEED_WL_FILTER)
#ADD_DEFINITIONS(-DNEED_SHIFT_SCALE_FILTER)

IF(USE_BZ_AIRWAY_ANALYSIS)
ADD_DEFINITIONS(-DUSE_BZ_AIRWAY_ANALYSIS)

include_directories("${PROJECT_SOURCE_DIR}/External/WrapCT_COPD/LungProcessing")
set (UPMC_EXTERNAL_LIBS ${UPMC_EXTERNAL_LIBS} LungProcessing)
ENDIF (USE_BZ_AIRWAY_ANALYSIS)

IF(COMMAND cmake_policy)
  cmake_policy(SET CMP0003 NEW)
endif(COMMAND cmake_policy)

SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all executables.")

FIND_PACKAGE( Boost REQUIRED )
FIND_PACKAGE( Qt4 REQUIRED )
FIND_PACKAGE( ITK REQUIRED )
FIND_PACKAGE( VTK REQUIRED )
#FIND_PACKAGE( WrapITK  REQUIRED )

INCLUDE( ${ITK_USE_FILE} )
INCLUDE( ${VTK_USE_FILE} )

#The following finds WrapITK
FIND_PATH(ITK_VTK_GLUE_DIR "CMakeLists.txt" PATHS
${ITK_SOURCE_DIR}/Wrapping/WrapITK/ExternalProjects/ItkVtkGlue)
INCLUDE_DIRECTORIES(${ITK_VTK_GLUE_DIR}/src)

INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIR} . Include)

INCLUDE_DIRECTORIES( ${Boost_INCLUDE_DIRS} )

INCLUDE( ${QT_USE_FILE} )
SET( UPMC_LA_SRCS
./src/main.cxx
./src/mainwindow.cxx
./src/textwidget.cxx
./src/VTK2dWidget.cpp
./src/itkQtProgressBar.cxx
./src/ImageSliceViewer.cxx
./src/DicomImageReaderBase.cxx
./src/InteractorObserver.cxx
./src/GenericVTKViewer.cxx
./src/upmcView.cxx
./src/upmcDocument.cxx
./src/upmcDocumentMgr.cxx
  )

SET( UPMC_LA_MOC_HDR
./Include/mainwindow.h
./Include/textwidget.h
./Include/VTK2dWidget.h
./Include/itkQtAdaptor.h
./Include/itkQtLightIndicator.h
./Include/itkQtProgressBar.h
./Include/upmcView.h
./Include/upmcDocument.h
./Include/upmcDocumentMgr.h
)

SET( UPMC_LA_HDRS
./Include/ImageSliceViewer.h
./Include/DicomSeries.h
./Include/DicomSeries.txx
./Include/DicomSeriesBase.h
./Include/DicomSeriesBase.txx
./Include/DicomImageReader.h
./Include/DicomImageReader.txx
./Include/DicomImageReaderBase.h
./Include/InteractorObserver.h
./Include/ClickedPointEvent.h
./Include/GenericVTKViewer.h
)

# some .ui files
SET( UPMC_LA_UIS
./rc/vtk2dWidget.ui
)

# and finally an resource file
SET( UPMC_LA_RCS
./rc/LungAnalysis.qrc
)

# 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( UPMC_LA_RC_SRCS ${UPMC_LA_RCS} )

# and finally this will run moc:
QT4_WRAP_CPP( UPMC_LA_MOC_SRCS ${UPMC_LA_MOC_HDR} )

# this will run uic on .ui files:
QT4_WRAP_UI( UPMC_LA_UI_HDRS ${UPMC_LA_UIS} )

LINK_LIBRARIES ( LungAnalysis ${UPMC_EXTERNAL_LIBS} ${QT_LIBRARIES}
ITKCommon ITKBasicFilters
ITKIO QVTK vtkCommon
)

ADD_EXECUTABLE( LungAnalysis ${UPMC_LA_SRCS} ${UPMC_LA_MOC_SRCS}
${UPMC_LA_HDRS}
${UPMC_LA_MOC_HDR} ${UPMC_LA_RC_SRCS} ${UPMC_LA_UI_HDRS}
)
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] File modification detection based on content (not timestamp)

2009-01-07 Thread John Drescher
> ### QUESTIONS ###
> 1. Is file modification detection based on file content instead of
> timestamp supported already?
> 2. Is support for it planned?
> If not, i would like to make a feature request!
> 3. How hard would it be to implement that?
>
I could be totally wrong but doesn't CMake have nothing to do with
this? I mean CMake generates Visual Studio Projects, unix makefiles
... and its up to whatever build system you use to handle its
dependencies how correctly.

John
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] File modification detection based on content (not timestamp)

2009-01-07 Thread John Drescher
On Wed, Jan 7, 2009 at 5:19 PM, John Drescher  wrote:
>> ### QUESTIONS ###
>> 1. Is file modification detection based on file content instead of
>> timestamp supported already?
>> 2. Is support for it planned?
>> If not, i would like to make a feature request!
>> 3. How hard would it be to implement that?
>>
> I could be totally wrong but doesn't CMake have nothing to do with
> this? I mean CMake generates Visual Studio Projects, unix makefiles
> ... and its up to whatever build system you use to handle its
> dependencies how correctly.
>
Bad choice of words. Should have been its up to the build system to
detect what files have changed and use the rules of the project file
to determine what to build.

John
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Visual Studio build question

2009-01-12 Thread John Drescher
On Mon, Jan 12, 2009 at 3:27 PM, James Bigler  wrote:
> So when I have a project that builds a library (call it libprovides) and I
> have another project that uses that library (libuses), CMake creates a build
> dependency between the two projects.  I can see them when I open the Project
> Dependencies dialog and notice that there are check marks next to the
> libprovides library project.
>
> The issue I'm seeing, is that if libprovides library project fails to build,
> VS decides to try and build the libuses library anyway, and then complains
> that libprovides isn't there.
>
> Is this the intended behavior of VS, or did I perhaps set something up wrong
> in my CMakeLists.txt?
>

This is the intended feature of VS. I see that in my non cmake projects as well.

John
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Why the ui_header.h can not be found in Qt project when I add a share lib?

2009-01-20 Thread John Drescher
On Tue, Jan 20, 2009 at 1:12 PM, Kermit Mei  wrote:
> Clinton Stimpson wrote:
>>
>> How about using ${GUI_UIS} instead of ${SAMPLE_UIS}, which is undefined.
>>
>> Clint
>
> Hmm, thank you. I had repired some erros, and the GUI.so can be created.
>
> But the new troubles come:
>

You do not appear to be linking with ${QT_LIBRARIES}

John
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Build install from command line Visual Studio

2009-03-03 Thread John Drescher
This worked for me inside the folder containing the sln file and
running from a Visual Studio 2005 command prompt.

X:\VC.80\Lung\QtBasicUtils>devenv QtBasicUtils.sln /build Debug /project INSTALL


Microsoft (R) Visual Studio Version 8.0.50727.762.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
1>-- Build started: Project: INSTALL, Configuration: Debug Win32 --
1>
1>Performing Post-Build Event...
1>-- Install configuration: "Debug"
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/lib/QtBasicUtilsConfig.cmake

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/lib/QtBasicUtilsLibraryDepen
ds.cmake
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/lib/QtBasicUtilsUse.cmake
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/lib/QtBasicUtils_d_2005.lib
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QtBasicUtils.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QLimits.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmd.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdLine.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdExtra.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdParseError.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdHelpException.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdParseException.h

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdLineFileList.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdPart.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArg.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOpt.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasicBase.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasicBase.txx

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasicBaseMM.h

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasicBaseMM.t
xx
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasic.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBasic.txx
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptBool.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptQChar.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptQString.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdOptQStringList.h

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBool.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasic.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasic.txx
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasicBase.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasicBase.txx

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasicBaseMM.h

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgBasicBaseMM.t
xx
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgQChar.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgQString.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgQStringList.h

1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdArgFileList.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/QCmdHelp.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/Property.h
1>-- Up-to-date: C:/Program Files/UPMC/QtBasicUtils/include/PropertyMap.h
1>Build log was saved at "file://x:\VC.80\Lung\QtBasicUtils\INSTALL.dir\Debug\Bu
ildLog.htm"
1>INSTALL - 0 error(s), 0 warning(s)
== Build: 1 succeeded, 0 failed, 5 up-to-date, 0 skipped ==

X:\VC.80\Lung\QtBasicUtils>
___
Powered by www.kitware.com

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

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

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


[CMake] Non existent / new file handling

2009-03-13 Thread John Drescher
Is there a way to have cmake automatically create empty missing source
files instead of failing?

Basically I when I need to add new files I add new entries to my
CMakeLists.txt file then I have to go to the shell and touch on each
file I add so that cmake will not fail to regenerate the project.

Thanks in Advance,
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] Non existent / new file handling

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 1:15 PM, Denis Scherbakov
 wrote:
>
> John,
>
> You may want to look into ADD_CUSTOM_COMMAND.
>
> 
> PROJECT(CORBASAMPLE)
>
> ADD_CUSTOM_COMMAND(
>  OUTPUT "${PROJECT_BINARY_DIR}/MyMicoGeneratedSource.cpp"
>  COMMAND "${MICO_IDL_EXECUTABLE}" --hh-suffix=hh --any --poa 
> ${PROJECT_SOURCE_DIR}/IdlSource.idl)
>
> SET_SOURCE_FILES_PROPERTIES(
>  "${PROJECT_BINARY_DIR}/MyMicoGeneratedSource.cc"
>  "${PROJECT_BINARY_DIR}/MyMicoGeneratedSource.hh"
>  PROPERTIES
>  GENERATED TRUE
> )
>
> SET (CORBASAMPLE_SRCS
>     ${PROJECT_BINARY_DIR}/MyMicoGeneratedSource.cc
>
>     MyNormalSource.cc
>     MyOtherSource.cc
>     OneMoreSource.cc
> )
>
> INCLUDE_DIRECTORIES(
> )
>
> ADD_LIBRARY(CorbaSample STATIC ${CORBASAMPLE_SRCS})
> 
> [ 25%] Generating MyMicoGeneratedSource.cc
> Scanning dependencies of target CorbaSample
> [ 50%] Building CXX object 
> CorbaSample/CMakeFiles/CorbaSample.dir/MyNormalSource.cc.o
> [ 75%] Building CXX object 
> CorbaSample/CMakeFiles/CorbaSample.dir/MyOtherSource.cc.o
> [100%] Building CXX object 
> CorbaSample/CMakeFiles/CorbaSample.dir/OneMoreSource.cc.o
> Linking CXX static library libCorbaSample.a
> [100%] Built target CorbaSample
>
Thanks, I see. I could use a script and touch if the file did not exist.

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] Non existent / new file handling

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 1:39 PM, Alexander Neundorf
 wrote:
> On Friday 13 March 2009, John Drescher wrote:
>> Is there a way to have cmake automatically create empty missing source
>> files instead of failing?
>
> No, there is not.
>
>> Basically I when I need to add new files I add new entries to my
>> CMakeLists.txt file then I have to go to the shell and touch on each
>> file I add so that cmake will not fail to regenerate the project.
>
> Maybe you can write a macro which helps you with that. Like
> MY_ADD_EXECUTABLE(), which takes the same arguments as the normal
> ADD_EXECUTABLE(), but before handing them all over to ADD_EXECUTABLE(), check
> if each file exists and if it doesn't, create it using FILE(WRITE ...).
> But then you may get problems with files generated via ADD_CUSTOM_COMMAND().
> I would not recommend this.
>

Thanks, that sounds better than ADD_CUSTOM_COMMAND with a script to
check existence and create if needed.

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] Boost CMakeification progress?

2009-03-13 Thread John Drescher
> Will standard releases of Boost
> contain CMakeLists files in my lifetime?

They do already. 1.38.0 did. Although I did not have good success
building it that way.

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] Boost CMakeification progress?

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 3:08 PM, John Drescher  wrote:
>> Will standard releases of Boost
>> contain CMakeLists files in my lifetime?
>
> They do already. 1.38.0 did. Although I did not have good success
> building it that way.
>
Here is a link to the release notes (look at the bottom of the page):

http://www.boost.org/users/download/version_1_38_0

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] Boost CMakeification progress?

2009-03-13 Thread John Drescher
On Fri, Mar 13, 2009 at 3:09 PM, John Drescher  wrote:
> On Fri, Mar 13, 2009 at 3:08 PM, John Drescher  wrote:
>>> Will standard releases of Boost
>>> contain CMakeLists files in my lifetime?
>>
>> They do already. 1.38.0 did. Although I did not have good success
>> building it that way.
>>
> Here is a link to the release notes (look at the bottom of the page):
>
> http://www.boost.org/users/download/version_1_38_0
>
Slight correction that is mentioned in Other Changes pretty much in
the middle of the page:


Other Changes

* Experimental support for building Boost with CMake has been
introduced in this version. For more details see the wiki, Discussion
is taking place on the Boost-cmake mailing list.
* Fixed subversion properties for several files. Most notably,
unix shell scripts should always have unix line endings, even in the
windows packages.

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] VS2005 all headers are excluded

2009-03-13 Thread John Drescher
> cmake 2.6.3.
> There has been a number of modifications which have caused all headers in the 
> generated project files .vcproj to be excluded frm build
> (the red minus sign next to the file in Solution explorer)
>
> I have searched from inside VStudio the string HEADER_ONLY (ignoring case) in 
> all solution *cmake*.* files, nothing.
>
> 1 of the CMakeLists.txt looks like this
> ADD_CUSTOM_TARGET("..."
> SOURCES . ... .
> )
>
> I don't believe there is a VStudio-wide option to exclude headers from builds.
>
> An example of a .vcproj looks like:
>                                      Name="Source Files"
>                       Filter="">
>                                                      RelativePath="cpp">
>                       
>               
>                                      Name="Header Files"
>                       Filter="">
>                                                      RelativePath="hpp">
>                                                                      Name="Debug|Win32" 
> ExcludedFromBuild="true">
>                                                                              Name="VCCLCompilerTool"
>                                       />
>                               
>                                                                      Name="MinSizeRel|Win32" 
> ExcludedFromBuild="true">
>                                                                              Name="VCCLCompilerTool"
>                                       />
>                               
>                                                                      Name="RelWithDebInfo|Win32" 
> ExcludedFromBuild="true">
>                                                                              Name="VCCLCompilerTool"
>                                       />
>                               
>                                                                      Name="Release|Win32" 
> ExcludedFromBuild="true">
>                                                                              Name="VCCLCompilerTool"
>                                       />
>                               
>                       
>               
>
>
> as you see, ExcludedFromBuild="true" is set to true for some reason.
> any clues,
> regards,
>
This is known and has been discussed several times this week. I
believe this was the result of a bug fix. I use vs2005 and it does not
cause me any problem that I notice. Does this cause you any problem?
Just wondering..


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] VS2005 all headers are excluded

2009-03-13 Thread John Drescher
> Is this causing issues with the building of your project? Or is it just ugly
> to look at?
>
Bill,
I am not the OP but I use cmake 2.6.3 since it was released with
vs2005 but for me I can not see any difference besides the ugly symbol
in the solution explorer.


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 issues

2009-03-18 Thread John Drescher
On Wed, Mar 18, 2009 at 3:28 AM, Oliver Kania
 wrote:
> I think using Cmake implies having to manually add the names of new files
> etc. to the Cmake file, doesnt it ? Whenever the project changes, I have to
> "regenerate" the visual studio solution. I do not consider this to be
> convenient.
> It would be if Cmake could be integrated in Visual Studio and the Cmake
> stuff would
> be generated automatically.
>

I add new files to the CMakeLists.txt file (usually 2 or more at a
time) then I either create a new files with notepad++ or visual studio
or drag the file names (one at a time) to my command window (I always
have a command/shell window open on windows or linux) and execute
touch . Which is usually touch ./src/MyNewClassName.cxx and
touch ./Include/MyNewClassName.h

I have touch in my path from git but there are other places to get it.
I discussed with the list this week 2 different ways to automatically
call touch on nonexistent files but I have not implemented this yet.

I really like the out of source building with cmake. It makes cvs/svn
and backups cleaner and smaller and also cleaning any junk that ends
up in the binary folders when testing. I can just delete the whole
build tree (minus the CMakeCache.txt) if I want and I am assured that
every file in there is generated from the compiler or cmake. And then
there is the integrated unit testing and generation of an installer.
And I am forgetting the ability to have one source tree and build for
multiple compilers in their own build tree with or without different
settings. I am now not sure how I programmed in windows for 12 years
(and 500K+ lines of MFC code) without it. Eventually I plan to convert
all my code to cmake.

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_INSTALL_PREFIX

2009-03-18 Thread John Drescher
On Wed, Mar 18, 2009 at 1:43 PM, George Neill  wrote:
> Hi All,
>
>  On windows, I pass CMAKE_INSTALL_PREFIX on the command line e.g.
> "-DCMAKE_INSTALL_PREFIX=c:\some\path".  In my cmake code I use
> variable which contain the suffixes  /lib, /man/man1 etc...
>
> The install commands end up looking like this,
>
>  C:\some\path/man/man1/some_man_file
>
> In 2.4 this appears to work, in 2.6 it throws an error about invalid
> escape sequences.
>
> I have tried to use
>
> FILE(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" TEMP_PREFIX)
> SET(CMAKE_INSTALL_PREFIX "${TEMP_PREFIX}" CACHE INTERNAL "my prefix")
>
> But that doesn't seem to stick, I suspect it's because I am passing it
> in on the command line.
>
> What is the best way to deal with this?
>

Here is what I do for Program Files

string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})

then I use PGM_FILES and there is no complaint about bad escape sequences.

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_INSTALL_PREFIX

2009-03-18 Thread John Drescher
> Here is what I do for Program Files
>
> string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})
>
> then I use PGM_FILES and there is no complaint about bad escape sequences.
>
BTW, here is the whole section:

IF(WIN32)

#The following command changes \ to / in the Program Files Path so
CMake will not complain
#about bad escape sequences.
string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})

SET (CMAKE_INSTALL_PREFIX ${PGM_FILES}/UPMC/${CMAKE_PROJECT_NAME}
CACHE STRING "Default Install Path" FORCE)
ENDIF(WIN32)
___
Powered by www.kitware.com

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

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

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


[CMake] Fwd: CMAKE_INSTALL_PREFIX

2009-03-18 Thread John Drescher
All,

On Wed, Mar 18, 2009 at 1:20 PM, John Drescher  wrote:
>> It seems the following works (at least the cmake_install.cmake
>> commands appear to get generated appropriately).
>>
>> FILE(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)
>>
>> Is there a CMP policy which deals with this which I have missed?
>>
> Sorry I don't know.

No problem.

Well to shed some further light on it, it is not CMAKE_INSTALL_PREFIX
which is causing me grief.  I wrote a simple CMakeLists.txt and it
appears that there's some magic happening on CMAKE_INSTALL_PREFIX
variable.   Even though I pass in c:\some\path, it still becomes
c:/some/path.

So looking further, I have a third party library path which is also
passed in on the command line (where this munged path is coming from).

running my sample project, like this,

cmake -G"NMake Makefiles"
-D"CMAKE_INSTALL_PREFIX=%userprofile%\Desktop\project"
-D"THIRD_PARTY_PATH=%userprofile%\Desktop" ..

nmake install

provides this notice,

   C:/Users/gneill/Desktop/test/build/cmake_install.cmake:36

 when parsing string

   C:\Users\gneill\Desktop/doc/george.txt

 Invalid escape sequence \U

 Policy CMP0010 is not set: Bad variable reference syntax is an error.  Run
 "cmake --help-policy CMP0010" for policy details.  Use the cmake_policy
 command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

... but installs the files correctly.

By changing my command line to this (adding :PATH to the
THIRD_PARTY_PATH variable)

cmake -G"NMake Makefiles"
-D"CMAKE_INSTALL_PREFIX=%userprofile%\Desktop\project"
-D"THIRD_PARTY_PATH:PATH=%userprofile%\Desktop" ..

It runs without any warnings.  So I guess :PATH automatically runs
TO_CMAKE_PATH on the variable.

Thanks,
George.



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


[CMake] Fwd: CMAKE_INSTALL_PREFIX

2009-03-18 Thread John Drescher
-- Forwarded message --

Please remember to send this to the cmake list as well. There are
experts who should be better help than me..

On Wed, Mar 18, 2009 at 2:35 PM, George Neill  wrote:
> All,
>
> On Wed, Mar 18, 2009 at 1:20 PM, John Drescher  wrote:
>>> It seems the following works (at least the cmake_install.cmake
>>> commands appear to get generated appropriately).
>>>
>>> FILE(TO_CMAKE_PATH "${CMAKE_INSTALL_PREFIX}" CMAKE_INSTALL_PREFIX)
>>>
>>> Is there a CMP policy which deals with this which I have missed?
>>>
>> Sorry I don't know.
>
> No problem.
>
> Well to shed some further light on it, it is not CMAKE_INSTALL_PREFIX
> which is causing me grief.  I wrote a simple CMakeLists.txt and it
> appears that there's some magic happening on CMAKE_INSTALL_PREFIX
> variable.   Even though I pass in c:\some\path, it still becomes
> c:/some/path.
>
> So looking further, I have a third party library path which is also
> passed in on the command line (where this munged path is coming from).
>
> running my sample project, like this,

Here's my sample project,

C:\Users\gneill\Desktop\test\build>cat ..\CMakeLists.txt
CMAKE_MINIMUM_REQUIRED(VERSION 2.4 FATAL_ERROR)

IF(COMMAND cmake_policy)
 CMAKE_POLICY(SET CMP0002 OLD) # duplicate target names
 CMAKE_POLICY(SET CMP0003 OLD) # bare lib linker searches
 CMAKE_POLICY(SET CMP0005 OLD) # escaping on macros
 #  CMAKE_POLICY(SET CMP0010 OLD)
ENDIF(COMMAND cmake_policy)

SET(INSTALL_BIN_DIR  "bin")
SET(INSTALL_LIB_DIR  "lib")
SET(INSTALL_MAN_DIR  "man/doc")

ADD_EXECUTABLE(test test.c)

INSTALL(TARGETS test
 RUNTIME DESTINATION "${INSTALL_BIN_DIR}"
 LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
 ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
)

FILE(GLOB CFILES "${THIRD_PARTY_PATH}/doc/*.txt")

INSTALL(FILES ${CFILES} DESTINATION "${INSTALL_MAN_DIR}")


Later,
George.



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


[CMake] moc Cannot open options file specified with @

2009-03-18 Thread John Drescher
I have been using CMake with my Qt projects for a few months now and
every once and a while moc fails with
"Cannot open options file specified with @"

I did a google search and ended up finding my own post to this list on
the same subject in April of last year.

http://www.cmake.org/pipermail/cmake/2008-April/021263.html

That time it was with visual studio 2003 now I have 2005 and the
problem is more rare however it still occurs. Usually exiting visual
studio fixes it but this time I am not having any luck. I have
regenerated the project 3 times and it still is happening.

3>-- Build started: Project: laBatchProcessing, Configuration:
Debug Win32 --
2>Generating Include/moc_pqMultiView.cxx
3>Generating Include/moc_QCmdQuit.cxx
3>moc: Cannot open options file specified with @
2>moc: Cannot open options file specified with @
2>Usage: moc [options] 
2>  -o   write output to file rather than stdout
2>  -Iadd dir to the include path for header files
2>  -E preprocess only; do not generate meta object code
2>  -D[=]  define macro, with optional definition
2>  -U  undefine macro
2>  -i do not generate an #include statement
2>  -p   path prefix for included file
2>  -f[] force #include, optional file name
2>  -nwdo not display warnings
2>  -v display version of moc
3>Usage: moc [options] 
3>  -o   write output to file rather than stdout
3>  -Iadd dir to the include path for header files
3>  -E preprocess only; do not generate meta object code
3>  -D[=]  define macro, with optional definition
3>  -U  undefine macro
3>  -i do not generate an #include statement
3>  -p   path prefix for included file
3>  -f[] force #include, optional file name
3>  -nwdo not display warnings
3>  -v display version of moc
2>Project : error PRJ0019: A tool returned an error code from
"Generating Include/moc_pqMultiView.cxx"
2>Build log was saved at
"file://c:\Programming\VC.80\Qt\LungAnalysis\External\kwCoreLib\kwCoreLib.dir\Debug\BuildLog.htm"
3>Project : error PRJ0019: A tool returned an error code from
"Generating Include/moc_QCmdQuit.cxx"
2>kwCoreLib - 1 error(s), 0 warning(s)
3>Build log was saved at
"file://c:\Programming\VC.80\Qt\LungAnalysis\Libraries\Internal\laBatchProcessing\laBatchProcessing.dir\Debug\BuildLog.htm"
3>laBatchProcessing - 1 error(s), 0 warning(s)
4>-- Skipped Build: Project: uninstall, Configuration: Debug Win32 --
4>Project not selected to build for this solution configuration
5>-- Build started: Project: UserInterface, Configuration: Debug
Win32 --
6>-- Build started: Project: LungAnalysis, Configuration: Debug Win32 --
5>Compiling...
5>main.cxx
6>Generating Include/moc_upmcLungCTSeries.cxx
6>moc: Cannot open options file specified with @
6>Usage: moc [options] 
6>  -o   write output to file rather than stdout
6>  -Iadd dir to the include path for header files
6>  -E preprocess only; do not generate meta object code
6>  -D[=]  define macro, with optional definition
6>  -U  undefine macro
6>  -i do not generate an #include statement
6>  -p   path prefix for included file
6>  -f[] force #include, optional file name
6>  -nwdo not display warnings
6>  -v display version of moc
6>Project : error PRJ0019: A tool returned an error code from
"Generating Include/moc_upmcLungCTSeries.cxx"
6>Build log was saved at
"file://c:\Programming\VC.80\Qt\LungAnalysis\LungAnalysis.dir\Debug\BuildLog.htm"
6>LungAnalysis - 1 error(s), 0 warning(s)
5>X:\CMakeBased\LungAnalysis\External\kwCoreLib\include\pqMultiViewFrame.h(37)
: fatal error C1083: Cannot open include file:
'ui_pqMultiViewFrameMenu.h': No such file or directory
5>Build log was saved at
"file://c:\Programming\VC.80\Qt\LungAnalysis\Development\UserInterface\UserInterface.dir\Debug\BuildLog.htm"
5>UserInterface - 1 error(s), 0 warning(s)
7>-- Skipped Build: Project: INSTALL, Configuration: Debug Win32 --
7>Project not selected to build for this solution configuration
== Build: 1 succeeded, 4 failed, 1 up-to-date, 2 skipped ==


-- 
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] moc Cannot open options file specified with @

2009-03-18 Thread John Drescher
On Wed, Mar 18, 2009 at 10:38 PM, John Drescher  wrote:
> I have been using CMake with my Qt projects for a few months now and
> every once and a while moc fails with
> "Cannot open options file specified with @"
>
> I did a google search and ended up finding my own post to this list on
> the same subject in April of last year.
>
> http://www.cmake.org/pipermail/cmake/2008-April/021263.html
>
> That time it was with visual studio 2003 now I have 2005 and the
> problem is more rare however it still occurs. Usually exiting visual
> studio fixes it but this time I am not having any luck. I have
> regenerated the project 3 times and it still is happening.
>

It worked this time. I changed to X: (which is mapped to
C:\Programming using the subst command) regenerated the project with
Cmake-gui. In the process I made sure that everything pointed to X:
instead of C:\Programming.

3>Compiling manifest to resources...
3>Linking...
3>   Creating library
X:\VC.80\Qt\LungAnalysis\bin\Debug\LungAnalysis.lib and object
X:\VC.80\Qt\LungAnalysis\bin\Debug\LungAnalysis.exp
3>Embedding manifest...
3>Build log was saved at
"file://x:\VC.80\Qt\LungAnalysis\LungAnalysis.dir\Debug\BuildLog.htm"
3>LungAnalysis - 0 error(s), 0 warning(s)
5>-- Skipped Build: Project: INSTALL, Configuration: Debug Win32 --
5>Project not selected to build for this solution configuration
== Build: 3 succeeded, 0 failed, 3 up-to-date, 2 skipped ==

Then I built one of the subprojects by itself first and then build
solution. This was not even the project it was failing on but it
caused moc to be happy..


So with all these changes I can not figure out what caused it.. Sorry.

John
___
Powered by www.kitware.com

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

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

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


[CMake] CMake and multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
On my windows XP box, I have VC6, 2003, 2005 and 2008 installed and I
have selected VS2005 for the build however all the CMake checks are
happening for VC6. It does not seem to cause any harm but what about
header and library differences between the compilers? I mean all the
checks for stl ... are probably for the stl that is included with vc6
and not vs2005 (which I know is not the same).

Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - not found
Looking for stddef.h
Looking for stddef.h - found
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of void*
Check size of void* - done
Check size of char
Check size of char - done
Check size of short
Check size of short - done
Check size of float
Check size of float - done
Check size of double
Check size of double - done
Looking for limits.h
Looking for limits.h - found
Looking for unistd.h
Looking for unistd.h - not found
Looking for pthread.h
Looking for pthread.h - not found
Looking for include files CMAKE_HAVE_SYS_PRCTL_H
Looking for include files CMAKE_HAVE_SYS_PRCTL_H - not found.
Check if the system is big endian
Searching 16 bit integer
Check size of unsigned short
Check size of unsigned short - done
Using unsigned short
Check if the system is big endian - little endian
Found Threads: TRUE
Looking for C++ include iostream
Looking for C++ include iostream - found
Check for STD namespace
Check for STD namespace - found
Check for ANSI scope
Check for ANSI scope - found
Check for sstream
Check for sstream - found
Checking to see if this platform supports large bit-fields (>32 bits)
Checking to see if this platform supports large bit-fields (>32 bits) - yes
Check the value of the 22nd bit of a 32-bit quiet-NaN
Check the value of the 22nd bit of a 32-bit quiet-NaN - 1
Check size of long long
Check size of long long - done
Check size of __int64
Check size of __int64 - done
Checking whether long and __int64 are the same type
Checking whether long and __int64 are the same type -- no
Checking if ostream supports long long
Checking if ostream supports long long -- no
Checking if istream supports long long
Checking if istream supports long long -- no
Checking to see if this platform has the __FUNCTION__ C-Preprocessor directive
Checking to see if this platform supports has the __FUNCTION__
C-Preprocessor directive - yes
Checking for Large File Support
Checking for Large File Support - failed to compile
Checking whether STL classes are in std namespace
Checking whether STL classes are in std namespace - yes
Checking whether ANSI stream headers are available
Checking whether ANSI stream headers are available - yes
Checking whether ANSI streams are in std namespace
Checking whether ANSI streams are in std namespace - yes
Checking whether ANSI string stream is available
Checking whether ANSI string stream is available - yes
Checking whether header cstddef is available
Checking whether header cstddef is available - yes
Checking whether stl string has operator!= for char*
Checking whether stl string has operator!= for char* - yes
Checking whether stl has iterator_traits
Checking whether stl has iterator_traits - yes
Checking whether stl has standard template allocator
Checking whether stl has standard template allocator - yes
Checking for rebind member of stl allocator
Checking for rebind member of stl allocator - yes
Checking for non-standard argument to stl allocator<>::max_size
Checking for non-standard argument to stl allocator<>::max_size - no
Checking whether stl containers support allocator objects.
Checking whether stl containers support allocator objects. - yes
Checking whether "<>" is needed for template friends
Checking whether "<>" is needed for template friends - yes
Checking for member template support
Checking for member template support - yes
Checking for standard template specialization syntax
Checking for standard template specialization syntax - yes
Checking whether argument dependent lookup is supported
Checking whether argument dependent lookup is supported - yes
Check size of char
Check size of char - done
Check size of short
Check size of short - done
Check size of int
Check size of int - done
Check size of long
Check size of long - done
Check size of long long
Check size of long long - done
Check size of __int64

-- 
John M. Drescher
___
Powered by www.kitware.com

Visit other Kitware open-source projects at

Re: [CMake] CMake and multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
>> Makes sense. So then I should be opening cmake-gui from the compiler's
>> command prompt instead of the shortcut on the desktop. Not a big deal
>> I am one to use the command prompt all the time windows or linux..
>>
> I'm not very familar with cmake-gui but I don't see another option.
>
Thanks. You got me to thinking...

When I think of it, there is a second option for me. This is to setup
the environment variables to default to VS2005 since I build all my
CMake projects under windows with that version. The rest of the
compilers except 2008 are for application support for software I wrote
under MFC years ago. When you run the IDE for each of these it does
not use the environment variables anyways and my old non cmake build
process (my own batch files / installer generator) for these directly
sets up the environment for each application 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] CMake and multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
> If you use the IDE generators for CMake, you do not need to modify the
> environment at all.  It is only when using nmake or make, that you need an
> environment that is setup to run the compiler.   If you do want to use
> nmake, VS 2003 and above have command prompts that can be found in the
> "Visual Studio Tools" menu of the Start menu.   Just run the one you want,
> then run cmake-gui from the command line:  c:\Program Files\CMake
> 2.6\bin\cmake-gui.
>

But then with this setup cmake-2.6.3 is scanning my vc6 headers and
libs to generate vc2005 projects.

Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for sys/types.h
Looking for sys/types.h - found
Looking for stdint.h
Looking for stdint.h - not found
Looking for stddef.h
Looking for stddef.h - found
Check size of int

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 multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
On Fri, Mar 20, 2009 at 3:49 PM, John Drescher  wrote:
>> If you use the IDE generators for CMake, you do not need to modify the
>> environment at all.  It is only when using nmake or make, that you need an
>> environment that is setup to run the compiler.   If you do want to use
>> nmake, VS 2003 and above have command prompts that can be found in the
>> "Visual Studio Tools" menu of the Start menu.   Just run the one you want,
>> then run cmake-gui from the command line:  c:\Program Files\CMake
>> 2.6\bin\cmake-gui.
>>
>
> But then with this setup cmake-2.6.3 is scanning my vc6 headers and
> libs to generate vc2005 projects.
>

This has not caused me any problems but I am unsure if checks like
partial template specification are being used or is this part of cmake
not really used if I use the .sln and vcproj that cmake generates?

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 multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
>>> But then with this setup cmake-2.6.3 is scanning my vc6 headers and
>>> libs to generate vc2005 projects.
>>>
>>
>> This has not caused me any problems but I am unsure if checks like
>> partial template specification are being used or is this part of cmake
>> not really used if I use the .sln and vcproj that cmake generates?
>>
>
> You lost me...  Why is anything scanning the incorrect headers
>
When I run cmake-gui from the link on my desktop and select vc2005 as
the compiler for the project it shows me in the debug output window of
cmake-gui that it is using VC6 as the compiler and doing tests for crt
functionality, templates and stl ... All of this appears to be done on
the VC6 libraries and headers and not the vs2005 ones.

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] RUN_TESTS project & dependencies

2009-03-20 Thread John Drescher
On Fri, Mar 20, 2009 at 4:50 PM, Robert Dailey  wrote:
> On Fri, Mar 20, 2009 at 9:33 AM, Marcel Loose  wrote:
>>
>> Hi Robert,
>>
>> I am planning to use (but haven't implemented and tried yet):
>>
>> - add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
>>  to define a custom 'check' target (as with GNU Autotools)
>>
>> - add_executable( EXCLUDE_FROM_ALL ...)
>>  for each test program
>>
>> - add_dependencies(check )
>>  for each  you want to be compiled, linked and run
>>
>> Hope it helps.
>
I am going to have to look into that myself. I had the same issue when
developing unit tests and it drove me nuts because I fixed a bug in my
software and expected the unit test to pass only to have it still fail
and then I spent an hour trying to figure out how on earth my new fix
was bad only to find out that the executable for the unit test was
from the previous day...

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 multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
> If you select "Visual Studio 8 2005" as a generator, it should not use VC6.
>   Please make sure you start with an empty binary directory, with no
> CmakeCache.txt file.
>
I just created a new build tree selected vs2005 and it still used the
vc6 compiler:

Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working C compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE
Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio/VC98/Bin/CL.EXE -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for Q_WS_X11
Looking for Q_WS_X11 - not found.
Looking for Q_WS_WIN
Looking for Q_WS_WIN - found
Looking for Q_WS_QWS

I believe the reason for this is VC6 is set up in the default
environment 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] CMake and multiple Microsoft compilers on windows

2009-03-20 Thread John Drescher
> OK, I am pretty sure (99.9%) it is not actually using that compiler for the
> tests.  The CMAKE_CXX_COMPILER value is not actually used by the visual
> studio IDE projects.  However, that does seem to be some disturbing
> output  I need to change the platform files so that the cl full path is
> not searched for.  Please create a bug report.
>

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

> If you want to prove it to yourself you can run cmake with
> --debug-trycompile and look at the projects it is using for trycompiles.
>

I will try that on Monday if I remember.

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] Patches with "your name" all over them?

2009-03-23 Thread John Drescher
> Have another question. doing out-of-source build and I have src files that
> include QT .moc files, but cannot find them.
>
> Normally this files .moc files get generated in the src directory, but
> out-of-source build put the .moc files into the build/src directory.
>
> What is the typical strategy to change the -I flag to make it look int he
> build/src directory?
>
CMake should handle this for you if you use the QT4_WRAP_CPP macro.

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] Patches with "your name" all over them?

2009-03-23 Thread John Drescher
>> CMake should handle this for you if you use the QT4_WRAP_CPP macro.
>
>
> Project is QT3 and it does not look to be moving to QT4 anytime soon.
>
Sorry, I can't help with that then. I have only used Qt4 with CMake.

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] Getting the Generator during CMAKE

2009-03-27 Thread John Drescher
On Fri, Mar 27, 2009 at 4:36 PM, Neal Meyer  wrote:
> I need to have my CMakeLists file do different things depending on the
> Generator that is being used.  Mostly passing on that version information to
> a build of a 3rd party library.  Is there a way to get that information
> during the CMake run?
>
http://www.cmake.org/cmake/help/cmake2.6docs.html#variable:CMAKE_GENERATOR

http://www.cmake.org/cmake/help/cmake2.6docs.html#section_Variables%20That%20Describe%20the%20System


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 can I manage the Qt4's .rc file with CMake?

2009-03-30 Thread John Drescher
On Mon, Mar 30, 2009 at 12:04 PM, Kermit Mei  wrote:
> Hello community! I want to change my program's icon on windows, and it
> wrote with Qt4. I looked up the assistant, it told me the following.
>
> But I don't know how to use it in cmake?
> And, another question: If I use MinGW+Qt, but not M$ VC++, can I use it?
>
>
Shouldn't that be qrc for Qt4? And then you use something like this in
your CMakeLists.txt

# and finally an resource file
SET( UPMC_LA_RCS
./rc/LungAnalysis.qrc
)

# 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( UPMC_LA_RC_SRCS ${UPMC_LA_RCS} )


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] make make test make all

2009-04-01 Thread John Drescher
On Wed, Apr 1, 2009 at 12:47 PM, Bill O'Hara  wrote:
> I couldn't resist the subject - my question is whether given some number of
> executables that are produced during a build, and some tests that later run
> using those, is there a straightforward way to have cmake (globally) always
> run "make all" before make test? Right now, with my current setup, if
> someone does "make test" without doing "make all", the executables aren't
> found and they complain that things are "broken" (ie. not like they are used
> to). I'd rather prefer to not add custom targets or add_dependencies for all
> the individual tests if at all possible.
>

There was a discussion of this last week on the mailing list.

http://www.cmake.org/pipermail/cmake/2009-March/thread.html#27887

John
___
Powered by www.kitware.com

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

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

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


[CMake] Fwd: make make test make all

2009-04-01 Thread John Drescher
> There was a discussion of this last week on the mailing list.
>
> http://www.cmake.org/pipermail/cmake/2009-March/thread.html#27887
>
Also a bug report

http://www.vtk.org/Bug/view.php?id=8774
___
Powered by www.kitware.com

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

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

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


[CMake] Fwd: solution folder

2009-04-01 Thread John Drescher
On Wed, Apr 1, 2009 at 1:34 PM, Nicolas Slythe (Intern)
 wrote:
> Is it possible in cmake to add solution folder in the generated visual
> studio solution
>

Isn't that ${PROJECT_BINARY_DIR}



-- 
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] [vtkusers] How to hide the console for a VTK/Qt app

2009-04-06 Thread John Drescher
On Mon, Apr 6, 2009 at 5:06 PM, John Drescher  wrote:
> On Mon, Apr 6, 2009 at 4:59 PM, Jim  wrote:
>>
>> Dear vtkusers,
>>
>> While executing VTK examples such as qtevents, a black (debugging) console
>> like Windows Command Prompt pops up. This doesn't look nice if my customers
>> see it. How can I hide this console?
>>
>> #SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /subsystem:windows")
>>
> Bing a windows developer for 15 years I know this should be the
> working one. Check your linker settings in your Visual Studio project
> file and make sure that it does say /subsystem:windows
>
> The default in cmake I believe is /subsystem:console which I know
> starts a new console. I remember that I used that option years ago to
> add debug console to all my GUI apps. :)
>
>From the cmake mailing list, I found this:

if(WIN32)
set_target_properties(WindowApplicationExample PROPERTIES
LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
set_target_properties(WindowApplicationExample PROPERTIES
RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
set_target_properties(WindowApplicationExample PROPERTIES
LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
set_target_properties(WindowApplicationExample PROPERTIES
MINSIZEREL "/SUBSYSTEM:WINDOWS")
endif(WIN32)


-- 
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] load CMakeCache.txt settings into new build directory?

2009-04-06 Thread John Drescher
On Mon, Apr 6, 2009 at 10:33 PM, Michael Jackson
 wrote:
> I _think_ the way to do this in your script would be to use either one of:
>
>  -C           = Pre-load a script to populate the cache.
>  -D :=     = Create a cmake cache entry.
>
> In the -C variant you would have a *.cmake file that has all the necessary
> entries in it that you want to set, or want the user to automatically have.
> I think you just use the normal cmake syntax:
>
> set(CMAKE_BUILD_TYPE "Debug")
>
> In the -D variant you would need to pass in all the settings that you need
> on the command line:
>
> cmake -D CMAKE_BUILD_TYPE:STRING=Debug ../SourceDirectory
>
>
Thanks. Although  I was not the OP I will look in to this so I can
simplify having others install of some libs with the options that I
want / need. Looks like this will save me some time making a step by
step guide...

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] changing Visual Studio project environment setting with CMake

2009-04-06 Thread John Drescher
On Fri, Apr 3, 2009 at 6:04 AM, Neuhaus Jochen
 wrote:
> Hi,
>
> in Visual Studio, you can add custom environment variables that will
> exist if you run your application from visual studio. They are at
> [execuatable project]-->Properties-->Configuration
> Properties-->Debugging-->Environment
> My project needs to have a debug version of ITKCommon.dll in its PATH
> when running in Debug mode and a Release version of the DLL in Release
> mode respectively.

Doesn't cmake automatically handle the itk ... dlls correctly? I do
not have any debug / release issues with ITK, VTK or Qt all work
without me doing anything and there are no Qt, vtk, or itk dlls in my
project binary folder.

John
___
Powered by www.kitware.com

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

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

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


[CMake] Fwd: load CMakeCache.txt settings into new build directory?

2009-04-07 Thread John Drescher
-- Forwarded message --
From: John Drescher 
Date: Tue, Apr 7, 2009 at 10:04 AM
Subject: Re: [CMake] load CMakeCache.txt settings into new build directory?
To: Ian Monroe 


> But I don't really know what the users needs. Like for me I don't need
> to pass any options. Others might have had to tweak things to
> recognize a given library.
>
> I wonder if I could just run a find&replace regex on the
> CMakeCache.txt to change the build directory.
>

I am pretty sure I have done that manually with itk or vtk to avoid
having to figure out what I set during a version upgrade.

John



-- 
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] lack of operator for easy string concatenation

2009-04-08 Thread John Drescher
On Wed, Apr 8, 2009 at 2:27 PM, Piotr Dobrogost
 wrote:
> Hi
>
> Am I missing something or there is no operator for easy string
> concatenation in cmake?
>
> Instead of writing
>
> SET(CMAKE_MODULE_PATH
> "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}")
>
> it would be nice to be able to write
>
> CMAKE_MODULE_PATH += "${CMAKE_CURRENT_SOURCE_DIR}/CMake;"
>
> or at least
>
> SET(CMAKE_MODULE_PATH += "${CMAKE_CURRENT_SOURCE_DIR}/CMake;")
>
> "+=" would mean to prepend to and "=+" to append to existing string.
>

I guess its a matter of preference. I prefer the first/working 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] "Combo Box" cache variables

2009-04-09 Thread John Drescher
On Thu, Apr 9, 2009 at 5:16 PM, Bill Hoffman  wrote:
> Robert Dailey wrote:
>>
>> On Thu, Apr 9, 2009 at 3:58 PM, Bill Hoffman > > wrote:
>>
>>        I'm using CMake 2.6.4 RC4. Is it included in this build?
>>
>>
>>    No.
>>
>>
>> Thanks, Bill. When can I expect to see this feature? More specifically,
>> what version of CMake will it be included in?
>
> 2.8 when that comes out.  No ETA right now.
>

Wouldn't it be also in the nightly cvs 2.7 windows 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] /MP flag an VS parallel builds

2009-04-10 Thread John Drescher
On Fri, Apr 10, 2009 at 3:25 PM, Bill Hoffman  wrote:
> Jeff Baumes at Kitware recently made this discovery:
>
>
> Some may already know this, but I found a flag that you can use in
> Visual Studio that enables file-level build parallelism within
> projects like gmake. By default, Visual Studio only allows project-level
> parallelism, which does not always use all your cores, for example if
> you are building a project with a relatively small number of large
> libraries (like VTK) with deeper dependency trees.
>
> To enable this, add the flag /MP to CMAKE_CXX_FLAGS. I (and others)
> noticed significant build time speedup for builds of CMake, ParaView,
> and VTK. This is available in Visual Studio 2008, although some online
> thread discussions state that this flag is also available as a "hidden
> feature" of Visual Studio 2005. But you should probably assume it is
> buggy or incomplete in that version.
>
> The only known possible caveat is that having both file and project
> parallelism on work independently, so having 8 cores with /MP on a
> project with lots of project parallelism could spawn as many as 64
> build threads, which will be inefficient. A repository like VXL with
> 600 projects may fall into this category. You can also play with a
> global setting for all projects (in Options, Projects and Solutions,
> Build and Run) to limit the number of projects built at once if this
> is an issue, or in those cases you can just not use /MP.
>
> Jeff
>
>
> BTW, this seems to beat gmake -j N on my dual core laptop.  CMake build went
> from 3m (gmake) to 2m30s VS IDE from the command line.
>

I have had that in my CMakeLists.txt for my main application for a few
months and I use this for the most part with VS2005. I got this info
here:

http://vagus.wordpress.com/2008/02/15/source-level-parallel-build-in-visual-studio-2005/

BTW, I have not noticed any problems related to this flag with VS2005.

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] looking for Visual Studio installation

2009-04-19 Thread John Drescher
>> I guess multiple installations of VS is a very rare case.
>> Wouldn't reading VS variables in registry help?
>>
>
> Not if you are on a yearly academic licensing program. Every developer
> in our department has at least 3 versions of Visual Studio installed.
>
> John
>



-- 
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] looking for Visual Studio installation

2009-04-19 Thread John Drescher
>> I guess multiple installations of VS is a very rare case.
>
> I pretty much doubt that, making sure a piece of software builds on
> different compilers is important for _anybody_ producing some kind of
> library thats being used by other software components.
>
> Where I work, everybody who has a win32 installation for working on our
> software has at least 2 VS installations. (though we don't use cmake at
> all, but our buildsystem also relies on properly setup environment)
>
One reason for us having more than one version of Visual C++ after the
fact that it cost us no more to have both installed (except for 2 to 4
GB on a 500 to 750GB drive that is worth $50 to $75US with todays sata
prices) is that each version is not 100% backwards compatible and it
sometimes takes a lot of work to port your code base to the next
compiler version. At work I have written 500,000 lines of MFC (about
50,000 lines per year). Most of this was with VC6 however a few years
back I spent over 1 month getting around 80% of this to compile with
VS 2003. Since then I have not taken the time to update that to a
newer compiler. My new projects are now using VS 2005. So I absolutely
need to have VC6, VS2003 and VS2005 installed at minimum. I do have
VS2008 installed as well but I do not use it yet because doing so
would make me have to install that on any developers machine that
would need to use my code...

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] ITK.dsw

2009-04-24 Thread John Drescher
On Fri, Apr 24, 2009 at 11:32 AM, mahshid farzinfar
 wrote:
>
> Visual Studio 2008.
>

After the configure step. Did you select 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] Using cmake first time..

2009-04-30 Thread John Drescher
On Thu, Apr 30, 2009 at 12:46 AM, Usman Ajmal  wrote:
> Hi,
>
> I am not clear with this CMakeLists.txt as to how to create it automatically
> because i don't know the conventions related to it.
>
> I have a project named test.pro having following files
>
> treemap.cpp
> treemap.h
> main.cpp
>
> Libraries i am using are qt4, qt3support. The treemap.cpp comes from KDE
> sources so i will need to use some KDE libraries. Qmake is not working
> because it could not find kconfig.h, klocale.h and kdebug.h so i turned to
> cmake and now i don't now what CMakeLists.txt should be for my project.
>
> Any help will be a great relief for me.
>
How about an example. Last week I took the qt example simpletreemodel
and made a CMakeLists.txt file for it:

project(simpletreemodel)

cmake_minimum_required(VERSION 2.6)

FIND_PACKAGE( Qt4 REQUIRED )
INCLUDE( ${QT_USE_FILE} )

include_directories(Include)

SET (LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin CACHE INTERNAL
"Single output directory for building all executables.")

SET( DEMO_SRCS
./src/main.cpp
./src/treemodel.cpp
./src/treeitem.cpp
)

SET( DEMO_HDRS

)

SET( DEMO_MOC_HDRS
./Include/treemodel.h
./Include/treeitem.h
)

# some .ui files
SET( DEMO_UIS
)

# and finally an resource file
SET( DEMO_RCS
./rc/simpletreemodel.qrc
)

# this command will generate rules that will run rcc on all files from DEMO_RCS
# in result DEMO_RC_SRCS variable will contain paths to files produced by rcc
QT4_ADD_RESOURCES( DEMO_RC_SRCS ${DEMO_RCS} )

# and finally this will run moc:
QT4_WRAP_CPP( DEMO_MOC_SRCS ${DEMO_MOC_HDRS} )

# this will run uic on .ui files:
QT4_WRAP_UI( DEMO_UI_HDRS ${DEMO_UIS} )

add_executable(simpletreemodel ${DEMO_SRCS}
${DEMO_MOC_SRCS}
${DEMO_HDRS}
${DEMO_MOC_HDRS}
${DEMO_UI_HDRS}
${DEMO_RC_SRCS}
)

target_link_libraries(simpletreemodel
${QT_LIBRARIES}
)
___
Powered by www.kitware.com

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

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

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


[CMake] .txx files and Visual Studio 2005 now being compiled

2009-05-04 Thread John Drescher
I updated my cmake to 2.6.4 on one of my windows development boxes
(vs2005) and this has caused me problems with .txx files. I generally
include these from a .h file and they are not supposed to be compiled
however with 2.6.4 they have changed from built tool "Custom Build
Tool" to "C/C++ Compiler Tool"

-- 
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] .txx files and Visual Studio 2005 now being compiled

2009-05-04 Thread John Drescher
On Mon, May 4, 2009 at 12:25 PM, Bill Hoffman  wrote:
> John Drescher wrote:
>>
>> I updated my cmake to 2.6.4 on one of my windows development boxes
>> (vs2005) and this has caused me problems with .txx files. I generally
>> include these from a .h file and they are not supposed to be compiled
>> however with 2.6.4 they have changed from built tool "Custom Build
>> Tool" to "C/C++ Compiler Tool"
>>
>
>
>
> This is the fix for the header file only change causing this trouble.
>
> However, that said, I do not think txx is a default extension for vs to try
> and compile.  Did add it to your visual studio?
>

I will check on that. .txx is not listed in the Options / Text Editor
/ File Extensions however I may have added it in the registry a while
back. I will check into 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] .txx files and Visual Studio 2005 now being compiled

2009-05-04 Thread John Drescher
On Mon, May 4, 2009 at 12:37 PM, John Drescher  wrote:
> On Mon, May 4, 2009 at 12:25 PM, Bill Hoffman  
> wrote:
>> John Drescher wrote:
>>>
>>> I updated my cmake to 2.6.4 on one of my windows development boxes
>>> (vs2005) and this has caused me problems with .txx files. I generally
>>> include these from a .h file and they are not supposed to be compiled
>>> however with 2.6.4 they have changed from built tool "Custom Build
>>> Tool" to "C/C++ Compiler Tool"
>>>
>>
>>
>>
>> This is the fix for the header file only change causing this trouble.
>>
>> However, that said, I do not think txx is a default extension for vs to try
>> and compile.  Did add it to your visual studio?
>>
>
> I will check on that. .txx is not listed in the Options / Text Editor
> / File Extensions however I may have added it in the registry a while
> back. I will check into that.
>

I had it (.txx) in the registry under:

HKEY_USERS\S-1-5-21-4112411809-3170923821-3750361785-3186\Software\Microsoft\VisualStudio\8.0\VC\VC_OBJECTS_PLATFORM_INFO\Win32\ToolDefaultExtensionLists\VCCLCompilerTool


I will fix that after lunch and write back if it fixes 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


Re: [CMake] .txx files and Visual Studio 2005 now being compiled

2009-05-04 Thread John Drescher
On Mon, May 4, 2009 at 12:44 PM, John Drescher  wrote:
> On Mon, May 4, 2009 at 12:37 PM, John Drescher  wrote:
>> On Mon, May 4, 2009 at 12:25 PM, Bill Hoffman  
>> wrote:
>>> John Drescher wrote:
>>>>
>>>> I updated my cmake to 2.6.4 on one of my windows development boxes
>>>> (vs2005) and this has caused me problems with .txx files. I generally
>>>> include these from a .h file and they are not supposed to be compiled
>>>> however with 2.6.4 they have changed from built tool "Custom Build
>>>> Tool" to "C/C++ Compiler Tool"
>>>>
>>>
>>>
>>>
>>> This is the fix for the header file only change causing this trouble.
>>>
>>> However, that said, I do not think txx is a default extension for vs to try
>>> and compile.  Did add it to your visual studio?
>>>
>>
>> I will check on that. .txx is not listed in the Options / Text Editor
>> / File Extensions however I may have added it in the registry a while
>> back. I will check into that.
>>
>
> I had it (.txx) in the registry under:
>
> HKEY_USERS\S-1-5-21-4112411809-3170923821-3750361785-3186\Software\Microsoft\VisualStudio\8.0\VC\VC_OBJECTS_PLATFORM_INFO\Win32\ToolDefaultExtensionLists\VCCLCompilerTool
>
>
> I will fix that after lunch and write back if it fixes this issue..
>
Removing .txx from the registry entry above fixed the issue.

Thanks for pointing me in the right direction..
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] INSTALL project disabled by default in visual studio 8 configuration manager

2009-05-05 Thread John Drescher
On Tue, May 5, 2009 at 10:09 AM, David Larsson  wrote:
> Hi!
> I've noticed that the INSTALL project generated in visual studio projects
> when using "install" commands in CMakeLists.txt is disabled by default in
> the configuration manager.
> Is it possible to make it enabled by default so I don't have to install it
> explicitly after each build?
> The background for the problem is that I want to copy some headers,
> libraries and dll's to a directory after each build.
> If installation is something that's generally considered too heavy to be
> done after each build, is there a good way of expressing file copying in a
> platform independent way so I can work around it manually?
> Cheers
> /David
>

Can't you just build the install project instead of a target? That is what I do.

John
___
Powered by www.kitware.com

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

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

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


Re: [CMake] CMake and Visual Studio

2009-05-09 Thread John Drescher
On Sat, May 9, 2009 at 3:00 PM, Brandon Olivares
 wrote:
> Hi,
>
> I'm trying to use Cmake for a cross-platform application. I'm trying to
> configure it for Visual Studio on Windows, since that's what I use to
> develop in.
>
> Is there a better way of adding files, though? I can't really add files from
> within Visual Studio, it appears, because it'd go in the build directory.
>
This will not add them to the CMakeLists.txt either so its really no
good use to add files in Visual Studio itself. I just associate
CMakeLists.txt to Notepad++ and then click on that in the Solution
View and then edit the CMakeLists.txt file and have Notepad++ create
the files.

http://notepad-plus.sourceforge.net/uk/site.htm

>
> Also, is there any better way to actually replicate the folder structure of
> the source code?
>
I am confused at that question.
I have my code organized as

Project

>
> I might just move to using vim because using Visual Studio is quite a pain
> at this point, but in case someone else wants to build it or contribute to
> the code, developing in Visual Studio, I'd like to make it as easy as
> possible.
>
> I'm just starting out with this, but here's my current CMakeLists.txt in the
> src directory.
>
> set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
> set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
>
> set(FC_SRCS main.cpp)
>
> include_directories(${PROJECT_SOURCE_DIR}/include)
>
> if(MSVC_IDE)
>  file(GLOB_RECURSE FC_HEADERS ${PROJECT_SOURCE_DIR}/include/*.hpp)
>  source_group("Header Files" FILES ${FC_HEADERS})
>  list(APPEND FC_SRCS ${FC_HEADERS})
> endif()
>
> add_executable(fight-controller ${FC_SRCS})
>
> include(CPack)
>
> Thanks,
> Brandon
>
> --
> www.perpetualseeker.com
> Blog about college, programming, and other random things.
> Follow me on Twitter: http://twitter.com/devbanana
>
>
> ___
> 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
>



-- 
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 and Visual Studio

2009-05-09 Thread John Drescher
Sorry I hit tab and accidently pressed enter and gmail sent the email..

>  wrote:
>> Hi,
>>
>> I'm trying to use Cmake for a cross-platform application. I'm trying to
>> configure it for Visual Studio on Windows, since that's what I use to
>> develop in.
>>
>> Is there a better way of adding files, though? I can't really add files from
>> within Visual Studio, it appears, because it'd go in the build directory.
>>
> This will not add them to the CMakeLists.txt either so its really no
> good use to add files in Visual Studio itself. I just associate
> CMakeLists.txt to Notepad++ and then click on that in the Solution
> View and then edit the CMakeLists.txt file and have Notepad++ create
> the files.
>
> http://notepad-plus.sourceforge.net/uk/site.htm
>
>>
>> Also, is there any better way to actually replicate the folder structure of
>> the source code?
>>
> I am confused at that question.
> I have my code organized as
>
>
Project
   Src
   Include
   Libraries
Internal
   someLibrary
   Src
   Include
   someOtherLibrary
   Src
   Include


>
>>
>> I might just move to using vim because using Visual Studio is quite a pain
>> at this point, but in case someone else wants to build it or contribute to
>> the code, developing in Visual Studio, I'd like to make it as easy as
>> possible.
>>
>> I'm just starting out with this, but here's my current CMakeLists.txt in the
>> src directory.
>>

Here is an example of mine..

PROJECT(LungAnalysis)

set (LungAnalysis_VERSION_MAJOR 0)
set (LungAnalysis_VERSION_MINOR 4)

#

set( LUNG_ANALYSIS_SRC ${PROJECT_SOURCE_DIR} )
set( LUNG_ANALYSIS_BINARY ${PROJECT_BINARY_DIR} )

add_subdirectory(Libraries)

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

option (USE_BZ_AIRWAY_ANALYSIS "Use Bin Zheng's Airway Analysis" ON)
option (USE_SCP_LS "Use Sean Choel Park's Lung Segmentation" ON)
option (DUMP_DICOM_HEADERS "Dump DICOM headers" OFF)
option (DUMP_DEBUG_IMAGES "Dump DEBUG Images" OFF)
option (DUMP_SERIES_DEBUG_INFO "Dump the dicom series debug info." OFF)
option (USE_QTBASICUTILS"Use QTBasicUtils" ON)
option (USE_kwCoreLib   "Use kwCoreLib" ON)
option (USE_DEVELOMPENT "Build developement code and test projects" ON)
option (USE_CMD_LINE"Build Lung Analysis with command line support" 
ON)
option (USE_FILTERS "Build Lung Analysis with filter 
support" ON)
option (MAKE_DEBUGRELEASE   "Add support for building a Release Target
with debug info" ON)
option (USE_LA_BASE_LIB "Add support for laBase library." ON)
option (USE_LA_RESULTS  "Add support for results." ON)
option (USE_LA_DOCVIEW  "Add support for documents and views." ON)
option (USE_LA_ANALYSIS "Add support for the analysis package." ON)
option (USE_LA_GUI  "Add support for the GUI package." ON)
option (USE_LA_DICOM"Add support for the DICOM." ON)
option (USE_ideality"Use the ideality library." ON)
option (USE_MSVC_PCH"Use precompiled headers in MSVC." ON)

option (DISABLE_OPENGL  "Disable opengl. This will 
disable the
display of images." OFF)
option (DISABLE_RESULT_TIMESTAMPS   "Don't save the timetamp in the
filenames for the results" ON)
option (DISABLE_SLICE_THICK_IN_NAME "Don't put the slice thickness in
the document name." ON)

IF(DISABLE_OPENGL)
ADD_DEFINITIONS(-DDISABLE_OPENGL)
ENDIF(DISABLE_OPENGL)

IF(DISABLE_RESULT_TIMESTAMPS)
ADD_DEFINITIONS(-DDISABLE_RESULT_TIMESTAMPS)
ENDIF(DISABLE_RESULT_TIMESTAMPS)

IF(DISABLE_SLICE_THICK_IN_NAME)
ADD_DEFINITIONS(-DDISABLE_SLICE_THICK_IN_NAME)
ENDIF(DISABLE_SLICE_THICK_IN_NAME)

IF (MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;Release;RelWithDebInfo" CACHE
STRING "Debug;Release;RelWithDebInfo" FORCE)
ELSE(MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
"Debug;Release" FORCE)
ENDIF (MAKE_DEBUGRELEASE)

IF(WIN32)

#The following command changes \ to / in the Program Files Path so
CMake will not complain
#about bad escape sequences.
string (REPLACE "\\" "/" PGM_FILES $ENV{PROGRAMFILES})

SET (CMAKE_INSTALL_PREFIX ${PGM_FILES}/UPMC/${CMAKE_PROJECT_NAME}
CACHE STRING "Default Install Path" FORCE)
ENDIF(WIN32)

configure_file (
"${LUNG_ANALYSIS_SRC}/LungAnalysisConfig.h.in"
"${LUNG_ANALYSIS_BINARY}/LungAnalysisConfig.h"
)

INCLUDE_DIRECTORIES(${LUNG_ANALYSIS_BINARY})

IF(WIN32)
SET(CMAKE_CXX_FLAGS "/WL /MP /GR /EHsc" )
SET(CMAKE_EXE_LINKER_FLAGS "/INCREMENTAL:NO /MANIFEST
/STACK:1000 /machine:I386")

#IF(CMAKE_SIZEOF_VOID_P MATCHES 4)
  SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
#ENDIF(CMAKE_SIZEOF_VOID_P MATCHES 4)

ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE)
END

Re: [CMake] CMake and Visual Studio

2009-05-09 Thread John Drescher
> Thanks. I tend to either use vim or PSPad. I think editing CMakeLists.txt to
> add the new file, then `touch'ing the new file, should work?
Yes.

> I suppose cmake
> would have to be called again though.
>
If you click compile in visual studio. It will execute CMake
automatically if you changed any CMakeLists.txt file in the source
tree.

>
 Also, is there any better way to actually replicate the folder
 structure of the source code?

>>> I am confused at that question.
>>> I have my code organized as
>>>
>>>
>> Project
>>    Src
>>    Include
>>    Libraries
>>         Internal
>>            someLibrary
>>                Src Include someOtherLibrary Src Include
>>
>>
>
> Well, I mean that it'll be quite a large project, so I will probably be
> organizing my source files into subfolders of src/. Unfortunately, it seems
> that Visual Studio won't recognize these subdirectories, but will just list
> all the files under "Source Files," and the same for header files.
>
There is a way to do this in CMake. I something to do with source
groups I have never used this though. I tend to organize all of my
large projects in several static libraries. And each of these has its
own src and include folders.
>>>
  I might just move to using vim because using Visual Studio is quite a
 pain at this point, but in case someone else wants to build it or
 contribute to the code, developing in Visual Studio, I'd like to make
 it as easy as possible.

 I'm just starting out with this, but here's my current CMakeLists.txt
 in the src directory.

>>
>> Here is an example of mine..
>>
>
> Thanks, that helps a lot. I'm still learning about the best way to do
> certain things.
>
> I notice you have a libraries directory. How do you manage external
> libraries, especially if they aren't by default built with cmake?
>
I have not used any that do not already have a CMake finder so I am
not sure. I am still new at this. I have used CMake on 1 application
with ~12 internal libraries and a library only project in the past
year. This totaled around 55K lines of C++ code and 200 to 400 source
and header files.

> I'll be
> using an audio library and I'm not really sure how to include it.
>
> Also, I need to include boost, but most examples I've seen just search for
> boost on the system, so it is somewhat of a prerequisite.
>
> Thanks a lot for the response.
>
Your welcome..

John
___
Powered by www.kitware.com

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

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

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


[CMake] CMake version check 2.7 versus 2.6.4

2009-05-11 Thread John Drescher
After trying to go back to the released version of cmake versus the
nightly builds I am getting errors like this:

CMake Error at C:/Program Files/CMake
2.6/share/cmake-2.6/Modules/CMakeImportBuildSettings.cmake:14
(MESSAGE):
  ITK was built using CMake 2.7, but this is CMake2.6.  Please upgrade CMake
  to a more recent version.

Is there any way to avoid this without having to rebuild everything
configured with cmake 2.7?


-- 
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] include_directories per target

2009-05-13 Thread John Drescher
On Wed, May 13, 2009 at 8:50 AM,   wrote:
> Olivier Delannoy  wrote:
>> I would like to set include_directories on a per target basis. I
>> understand that the INCLUDE_DIRECTORIES property is currently on a per
>> folder basis. It is a bit of a problem as I would like to flatten my
>> build and have all my targets generated in a single destination
>> folder. Is there any way to achieve this currently?
>
> The "per folder" basis refers to the source directories or folders.  You
> don't need to flatten the entire source of your project in order to put
> the built libraries and executables in one directory.  Instead, direct
> the output of each target to the common directory.

 That would be my suggestion as I have spent a lot of time taking flat
src structures and making folders so I can organize my code..

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] Adding program arguments for Debug configuration

2009-05-17 Thread John Drescher
On Sun, May 17, 2009 at 7:42 AM, Alexandru Duţu  wrote:
> Hello,
>
> I am new to CMake, and I've been searching the web for a solution to this
> problem also CMake wiki and I found nothing concludent.
> I am using Windows XP SP3 and Visual Studio 2008.
>
> I am trying to include program arguments in debug configuration, without
> arguments I can't debug, normally in VS this is done by going to
> Project/Settings/Debugging/Command Arguments. If I am using a CMake for
> build configuration, by setting the arguments from VS it has no effect,

I do this almost every single day to debug under Visual Studio for my
CMake projects and it works fine. I mean right click on the main
executable click properties and add the debug arguments. Visual studio
will keep these as long as you do not wipe the build folder.

John
___
Powered by www.kitware.com

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

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

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


[CMake] Fwd: How to get the evaluated path to a target - MSVC

2009-05-22 Thread John Drescher
On Fri, May 22, 2009 at 12:18 PM, Steve Huston  wrote:
> I'm using cmake for some cross-platform Linux/Windows stuff. When
> ctest runs my tests, there is often the need to have a wrapper script
> run the test - it sets up env variables (sometimes by reading the
> content of a file), runs the test, scans log files, runs valgrind,
> etc. So, I'm passing the actual test exe name to the script, and the
> script runs it at the proper time.
>
> This works fine on Linux. On Windows, however, I'm having a problem
> getting the actual path - when I get the LOCATION property, it has
> $(OutDir) embedded. Visual Studio can substitute this in if ctest/VS
> is directly executing the test. However, if passed to the wrapper
> script, the VS OutDir variable is not available. Is there a portable
> way to get the test executable's path (either relative or complete) so
> I can pass it to the wrapper script?
>

Shouldn't you already know the path in your CMakeLists.txt?

It should be somewhere off of
${PROJECT_BINARY_DIR}


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] need two compilation to achieve success

2009-05-31 Thread John Drescher
On Sun, May 31, 2009 at 5:01 PM, Tyler Roscoe  wrote:
> On Sun, May 31, 2009 at 11:56:18PM +0300, e...@cs.bgu.ac.il wrote:
>> I've got a strange problem, when I try to compile a clean version of
>> my program it fails without any explanation but if I try to compile
>> again without running clean I compiles fine...
>
> We need way more information to help you. What platform? What compiler?
> How exactly does it fail? What do you do to "compile a clean version"?
>

I am not the OP but I have this with Qt applications under Visual
Studio however its very clear why. It appears when VS builds stuff in
parallel moc may not be run before VS wants to compile the .cxx file
that moc generates. For me this is not a problem because I can easily
click compile again or re run nmake a second 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] win32 and x64 in the same generator?

2009-06-02 Thread John Drescher
> Our developers are used to a single .vcproj that knows how to build both
> 32-bit and 64-bit versions of libraries. Under CMake, 32-bit and 64-bit
> are considered separate platforms with separate generators and requiring
> separate binary directories.
>
> Conceptually and as a build engineer, this makes more sense to me.
> Pragmatically and as a developer, it just means extra hoops to jump
> through.
>

I do both 64 and 32 bit builds except I have separate build trees with
shared source. I do the same for different versions of visual studio.
I mean my development folder looks like this:

CMakeBased
32bit\vc6
   \vc.71
   \vc.80
   \vc.90
64bit\vc.80


The source (in CMakeBased) will appear just once however in some
instances 3 build trees may be using it.

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: release builds with "Generate Debug Info" enabled

2009-06-02 Thread John Drescher
On Tue, Jun 2, 2009 at 3:54 PM, Tyler Roscoe  wrote:
> We build the Release versions of our libraries with Debug info enabled.
>
> In Visual Studio, you enable this by setting
> Properties->Linker->Debugging->Generate Debug Info to Yes.
>
> All this really does is add /DEBUG to the link flags for the library.
>
> So I added "/DEBUG" to the LINK_FLAGS_RELEASE property for that library.
> This does the right thing, and objdump verifies that the libraries are
> generated correctly.
>
> The trouble is that setting this flag doesn't update the dropdown box in
> Properties->Linker->Debugging. Some diffing shows that selecting Yes in
> the dropdown sets a flag in the .vcproj,
> GenerateDebugInformation="true".
>
> Is there a way to set this flag from CMake? A developer could get
> confused and think debug info is not being generated even though it
> really is.
>
> Maybe the VS Generator could change the GenerateDebugInformation flag if
> /DEBUG is present in the link flags?
>

How about using the RelWithDebInfo build that CMake generates?

John
___
Powered by www.kitware.com

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

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

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


[CMake] Minor Cache generation bug..

2009-06-05 Thread John Drescher
The comment for CMAKE_RC_FLAGS is wrong:

//RC compiler
CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual
Studio/COMMON/MSDev98/Bin/RC.EXE

//Flags for Fortran compiler.
CMAKE_RC_FLAGS:STRING='  '

-- 
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] Minor Cache generation bug..

2009-06-05 Thread John Drescher
On Fri, Jun 5, 2009 at 10:37 AM, John Drescher wrote:
> The comment for CMAKE_RC_FLAGS is wrong:
>
> //RC compiler
> CMAKE_RC_COMPILER:FILEPATH=C:/Program Files (x86)/Microsoft Visual
> Studio/COMMON/MSDev98/Bin/RC.EXE
>
> //Flags for Fortran compiler.
> CMAKE_RC_FLAGS:STRING='  '
>

BTW this is with CMake 2.7.20090514 on windows xp64

-- 
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] Precompiled Headers

2009-06-06 Thread John Drescher
On Sun, Jun 7, 2009 at 12:07 AM, Robert Dailey wrote:
> Hey guys,
> First of all I just want to let you guys know that I DID find this in my
> search:
> http://www.cmake.org/pipermail/cmake/2008-May/021483.html
> However, I do not feel as if a direct answer was given. Besides, that was
> over a year ago and I'm hoping some new developments have taken place. Is
> there a portable way of handling PCH files in CMake 2.6.4 or in a
> development/nightly build? If so, how do I enable it? I'm using Visual
> Studio 2008, generated by CMake 2.6.4.
> Thanks.
>

Here is what I do for Vs2005 builds and CMake 2.6.4

I put this in the main CMakeLists.txt before any add_subdirectory(Libraries)

macro( LA_PCH_SUPPORT ProjectName )
if (MSVC)
if (USE_MSVC_PCH)

set_source_files_properties(${ProjectName}PCH.cxx
PROPERTIES
COMPILE_FLAGS "/Yc${ProjectName}PCH.h"
)
foreach( src_file ${${ProjectName}_SRCS} )
set_source_files_properties(
${src_file}
PROPERTIES
COMPILE_FLAGS "/Yu${ProjectName}PCH.h"
)
endforeach( src_file ${${ProjectName}_SRCS} )

list(APPEND ${ProjectName}_SRCS ${ProjectName}PCH.cxx)
list(APPEND ${ProjectName}_EXT_HDRS ${ProjectName}PCH.h)

endif(USE_MSVC_PCH)
endif (MSVC)
endmacro (LA_PCH_SUPPORT)



So then to use the macro for a library named laGUI

SET( laGUI_SRCS
./src/laMultiViewFrameMgr.cxx
./src/VTK2dWidget.cpp
./src/laCentralWidget.cxx
./src/laImageSliceView.cxx
./src/laWLWidget.cxx
./src/laTableWidget.cxx
./src/laPipelineWidget.cxx
./src/ImageSliceViewer.cxx
./src/InteractorObserver.cxx
./src/laVTKInteractorStyleImage2D.cxx
./src/laVTKCommandImage2D.cxx
./src/la2DView.cxx
./src/la3DView.cxx
)

SET( laGUI_EXT_HDRS
./Include/InteractorObserver.h
./Include/laVTKInteractorStyleImage2D.h
./Include/laVTKCommandImage2D.h
)

SET( laGUI_MOC_HDRS
./Include/ImageSliceViewer.h
./Include/laMultiViewFrameMgr.h
./Include/VTK2dWidget.h
./Include/laCentralWidget.h
./Include/laImageSliceView.h
./Include/laWLWidget.h
./Include/laTableWidget.h
./Include/laPipelineWidget.h
./Include/la2DView.h
./Include/la3DView.h
)

#Add precompiled header support
LA_PCH_SUPPORT(laGUI)


You need to then create

laGUIPCH.h
laGUIPCH.cxx

the .cxx file contains any headers that will be not changed often.
This is the same as stdafx.cpp was and the .h file must be included in
every cpp that is in the ${ProjectName}_SRCS list


I hope this makes sense.

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] Precompiled Headers

2009-06-07 Thread John Drescher
> Thanks for your help. Do you (or anyone else) know if there are any plans to
> make a dedicated function for this so it is cleaner and portable?

http://www.vtk.org/Bug/view.php?id=1260


-- 
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] Precompiled Headers

2009-06-08 Thread John Drescher
>> I've been reading this newsgroup for a while and I notice that most
>> of the people complain that they miss some feature on Windows, but
>> completely forget that there are other cool OSes out there and CMake
>> stands for Crossplatform Make. This means that a feature must work on all
>> platforms and all supported compilers, not just on Microsoft ones.
>
> On a philosophical level, I really shouldn't be asking for this feature.
> Precompiled headers are mostly evil and considered an anti-pattern. It's
> actually pretty good that CMake makes it difficult to use :)
> So on that note, I think I'll be happy regardless of the outcome :)
>

After installing the macro I presented in my first reply a month ago
this has saved me several hours of compile time total on my main
project. However the recent addition of a velociraptor has reduced
this need since the compile operation is now cpu bound instead of io
bound.

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] Precompiled Headers

2009-06-08 Thread John Drescher
>>> After installing the macro I presented in my first reply a month ago
>>> this has saved me several hours of compile time total on my main
>>> project. However the recent addition of a velociraptor has reduced
>>> this need since the compile operation is now cpu bound instead of io
>>> bound.
>>
>> Yikes! Don't velociraptors eat source code for dinner?? Be careful with
>> that thing!!
>
> RAID1 FTW?

Not needed here. All of my valuable source code is in cvs on that is
on an external server. This server gets both backed up and mirrored
nightly.

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


[CMake] Fwd: Determine if generator is Visual Studio

2009-06-09 Thread John Drescher
On Tue, Jun 9, 2009 at 8:06 PM, Robert Dailey wrote:
> Is there a clean and compact way I can find out if Visual Studio targets are
> being built? Note that I want to be able to check this regardless of the
> version. I know I can check CMAKE_GENERATOR, but I would end up having to
> check around 8 strings for all possible versions of visual studio. Is there
> a cleaner way?

if (MSVC)
endif(MSVC)



-- 
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] Determine if generator is Visual Studio

2009-06-09 Thread John Drescher
On Tue, Jun 9, 2009 at 8:13 PM, Robert Dailey wrote:
> On Tue, Jun 9, 2009 at 7:13 PM, John Drescher  wrote:
>>
>> On Tue, Jun 9, 2009 at 8:06 PM, Robert Dailey wrote:
>> > Is there a clean and compact way I can find out if Visual Studio targets
>> > are
>> > being built? Note that I want to be able to check this regardless of the
>> > version. I know I can check CMAKE_GENERATOR, but I would end up having
>> > to
>> > check around 8 strings for all possible versions of visual studio. Is
>> > there
>> > a cleaner way?
>>
>> if (MSVC)
>> endif(MSVC)
>
> Ah, I posted too early :)
> Thank you for this. I can't believe I missed this in the docs!

I make a lot of use of the wiki

http://www.cmake.org/Wiki/CMake_Useful_Variables

-- 
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 generating wrong MSVC flags for static libraries?

2009-06-16 Thread John Drescher
> It appears that CMake is, by default, generating Makefiles that build
> static libraries with the /MD (or /MDd) flag.  Can anyone please verify
> that?

Yes it does that for me.

>
>  If so, shouldn't CMake be using the /MT (or /MTd) flag when
> building static libraries?  Is this a known issue?
>

Not necessarily. I mean I would prefer that the crt was a dll versus a
static lib even though I am creating my own static lib. I also believe
you can override this if you want.

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] Handling library interdependencies

2009-06-17 Thread John Drescher
On Wed, Jun 17, 2009 at 11:53 AM, Mark Lohry wrote:
> Thanks guys, you've helped me to find the real problem :) explicitly linking
> the libraries got rid of a lot of the chaff.
>
> Looks like the core error on linking has to do with just one of the
> libraries. lib1 contains two subdirectories (sublib1 & sublib2) with just a
> handful of files, which are to be built into the lib1 library. These two
> subdirectories have no CMakeLists.txt of their own; lib1/CMakeLists.txt
> explicitly includes their code for compiling to lib1 ( sources list is like
> = src1.cxx sublib1/src2.cxx sublib2/src3.cxx ).
>
> When linking the executables to the library, the build fails, with all the
> errors of the form
>
> "in function (some func in lib1 ) undefined reference to (function in
> sublib1 or sublib2)" or
> "in function (some func in sublib1 or sublib2 )undefined reference to
> (function in sublib1 or sublib2)" or
> "in function (some func in src ) undefined reference to (function in sublib1
> or sublib2)",
>
> despite these subdirectory sources having been compiled and linked into the
> static library. Any thoughts on why these subdirectories wouldn't be linking
> correctly?
>

Using it this way was not automatic for me so I created a variable
which at each each subdirectory gets appended the current library.
Here is an example from my current project:

LungAnalysis/CMakeLists.txt:

PROJECT(LungAnalysis)

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

set (LungAnalysis_VERSION_MAJOR 0)
set (LungAnalysis_VERSION_MINOR 12)

#

option (USE_BZ_AIRWAY_ANALYSIS  "Use Bin Zheng's Airway Analysis" ON)
option (USE_SCP_LS  "Use Sean Choel Park's 
Lung Segmentation" ON)
option (USE_JPU_FISSURE "Use Fissure Analysis" ON)
option (DUMP_DICOM_HEADERS  "Dump DICOM headers" OFF)
option (DUMP_DEBUG_IMAGES   "Dump DEBUG Images" OFF)
option (DUMP_SERIES_DEBUG_INFO  "Dump the dicom series debug info." OFF)
option (USE_QTBASICUTILS"Use QTBasicUtils" ON)
option (USE_kwCoreLib   "Use kwCoreLib" ON)
option (USE_DEVELOMPENT "Build developement code and 
test projects" ON)
option (USE_CMD_LINE"Build Lung Analysis with 
command line support" ON)
option (USE_FILTERS "Build Lung Analysis 
with filter support" ON)
option (MAKE_DEBUGRELEASE   "Add support for building a 
Release
Target with debug info" ON)
option (USE_LA_BASE_LIB "Add support for laBase 
library." ON)
option (USE_LA_RESULTS  "Add support for results." ON)
option (USE_LA_DOCVIEW  "Add support for documents and 
views." ON)
option (USE_LA_ANALYSIS "Add support for the analysis 
package." ON)
option (USE_LA_GUI  "Add support for the 
GUI package." ON)
option (USE_LA_DICOM"Add support for the DICOM." ON)
option (USE_ideality"Use the ideality library." ON)
option (USE_lavtkINRIA3D"Use lavtkINRIA3D library." ON)
option (USE_MSVC_PCH"Use precompiled headers in 
MSVC." ON)

option (DISABLE_OPENGL  "Disable opengl. This will 
disable the
display of images." OFF)
option (DISABLE_RESULT_TIMESTAMPS   "Don't save the timetamp in the
filenames for the results" ON)
option (DISABLE_SLICE_THICK_IN_NAME "Don't put the slice thickness in
the document name." ON)
option (PACKAGE_FOR_INSTALL "Package Lung Analysis for 
installation." OFF)
option (USE_NEGATIVE_SPACING"Force using negative spacing on the Z 
axis." OFF)

#

set( LUNG_ANALYSIS_SRC ${PROJECT_SOURCE_DIR} )
set( LUNG_ANALYSIS_BINARY ${PROJECT_BINARY_DIR} )

IF (MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING
"Debug;RelWithDebInfo" FORCE)
SET (RELEASE_BUILD_NAME "RelWithDebInfo")
ELSE(MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
"Debug;Release" FORCE)
SET (RELEASE_BUILD_NAME "Release")
ENDIF (MAKE_DEBUGRELEASE)

#

macro( LA_PCH_SUPPORT ProjectName )
if (MSVC)
if (USE_MSVC_PCH)

set_source_files_properties(${ProjectName}PCH.cxx
PROPERTIES
COMPILE_FLAGS "/Yc${ProjectName}PCH.h"
)
foreach( src_file ${${ProjectName}_SRCS} )
set_source_files_properties(
${src_file}
  

Re: [CMake] One target being built several times during parallel build

2009-06-18 Thread John Drescher
> Since no one has been motivated enough to address it in the 9 year history
> of the project I wouldn't consider it a showstopping bug.  Besides, even
> if one tries this the build should still complete successfully...just with
> some waste.
>
This has not caused me any trouble on gentoo and also the waste can be
reduced if the user has ccache enabled which IMO should be enabled on
most gentoo boxes since you build the entire os and all software from
source. ccache saves an enormous amount of time installing upgrades
and patches since most of the files will not change.

John
___
Powered by www.kitware.com

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

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

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


[CMake] Specify include paths for RC on Visual Studio

2009-06-18 Thread John Drescher
Is it possible to specify or limit the include folders that are passed
to RC in Visual Studio. I am trying to add an icon to my main
application but rc is choking on the number of includes that are being
passed to it.

Thanks in Advance,

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] How to add cache variables so they show up in own group in cmake-gui "Grouped View"

2009-06-23 Thread John Drescher
On Tue, Jun 23, 2009 at 4:04 PM, Gooch, Allen wrote:
> My variables all start with "BWA_*" prefix, but I'm still seeing them show up 
> under "Ungrouped Entries" exclusively.
>

This is definitely working for me. I mean if I have 2 or more entries
that start with the same thing up to the first underscore it gets
grouped.

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 add cache variables so they show up in own group in cmake-gui "Grouped View"

2009-06-23 Thread John Drescher
On Tue, Jun 23, 2009 at 4:32 PM, Gooch, Allen  wrote:
>
> I misspoke. Sorry for the confusion. I had a couple of distinct prefixes, 
> each containing one var.  But to my last question, is this behavior as 
> designed or a bug?

I believe this is the designed behavior. You need 2 variables with the
same prefix to form a group.

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] Boost on Windows

2009-06-23 Thread John Drescher
On Tue, Jun 23, 2009 at 4:23 PM, Bill Hoffman wrote:
> Christopher Harvey wrote:
>>
>> define BOOST_ROOT and point it at the root install location for boost. I
>> had the same problem, that fixed it. I only had to do that on windows.
>>
> There seems to be a bug in the FindBoost, BOOST_ROOT should not be required.
>   I got it to work by adding this:
>
>
>  SET(_boost_LIBRARIES_SEARCH_DIRS
>    C:/boost/lib
>    C:/boost
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
>
> "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}/lib"
>    "$ENV{ProgramFiles}/boost"
>    /sw/local/lib
>  )
>

That explains why I needed to do that on windows also. I do not have
boost in any of these locations...

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] CPACK_SOURCE_IGNORE_FILES

2009-06-29 Thread John Drescher
On Mon, Jun 29, 2009 at 9:18 PM, Knox, Kent wrote:
> I'm integrating CPack into my build system, and can't quite get
> CPACK_SOURCE_IGNORE_FILES to work right.
>
> I want to cull individual files from the source package, like .ncb files
> and .pdb files and such.  It seems as though CPACK_SOURCE_IGNORE_FILES
> honors the directories that I want to exclude, but not individual files.
> For instance:
>
> set( CPACK_SOURCE_IGNORE_FILES
> "/Build/;/.hg/;/.svn/;/.ncb$/" )
>
> will ignore the Build directory, as well as the .svn directory, but
> happily includes the .ncb files, even though I don't want them.
>
> I found a related post on stackoverflow.com from another user who seems
> to be experiencing the same problem:
>  -files-under-unix>
>
> Thx in advance.
>

My advice is to use out of source builds so that no generated files
like .ncb .. are mixed in with your source.

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 generated source and header files

2009-07-01 Thread John Drescher
>> I hope my examples convinced you enough that globbing is (in general) a
>> bad idea.
>>
> So is it common practice among users of CMake to manually create and
> maintain a list of all files that are to be compiled, even if such a list is
> very large and may involve several directories and subdirectories?
>
I do with all of my projects. The thing is that I generally add only 2
or 4 files at a time so its not like this is a lot of work.

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] Starting with Cmake

2009-07-11 Thread John Drescher
> I am starting with Cmake, I have looked a bit at the wiki and a few other
> sites that I found.
>
> I have a few items to help get me started:
>
> 1. Is there a doc that describes the 'bare essentials' to a CMake file. What
> I absolutely need to have in the file.
>

Look at the cmake wiki or buy the book.

>
> 2. Can I call my Cmake file anything? Or do I have to call it
> CMakeLists.txt?
>

It has to be CMakeLists.txt

> 3. Can CMake check out code from SVN?
>
I think so but I do not use that so I can not help on that one..
>
> 4. Can CMake e-mail build results to a specified e-mail address?
>

Not sure.

>
> 5. Say I have something like:
> SET(SRCS file1.c file2.c file3.c)
> Can I write this like:
> SET(SRCS /
>        file1.c /
>        file2.c /
>        file3.c
> )
>
> Like one file name per line like I can do in a gnu Make File?

You do not need the  /

> 6. In Make I would define all of my headers too, would I do the same as #5
> above?

You do this similar. Here is an example from my current project.

PROJECT(LungAnalysis)

cmake_minimum_required(VERSION 2.6 FATAL_ERROR)

set (LungAnalysis_VERSION_MAJOR 0)
set (LungAnalysis_VERSION_MINOR 15)
set (LungAnalysis_VERSION_PATCH 3)

#

option (USE_BZ_AIRWAY_ANALYSIS  "Use Bin Zheng's Airway Analysis" ON)
option (USE_SCP_LS  "Use Sean Choel Park's 
Lung Segmentation" ON)
option (USE_JPU_FISSURE "Use Fissure Analysis" ON)
option (DUMP_DICOM_HEADERS  "Dump DICOM headers" OFF)
option (DUMP_DEBUG_IMAGES   "Dump DEBUG Images" OFF)
option (DUMP_SERIES_DEBUG_INFO  "Dump the dicom series debug info." OFF)
option (USE_QTBASICUTILS"Use QTBasicUtils" ON)
option (USE_kwCoreLib   "Use kwCoreLib" ON)
option (USE_DEVELOMPENT "Build developement code and 
test projects" ON)
option (USE_CMD_LINE"Build Lung Analysis with 
command line support" ON)
option (USE_FILTERS "Build Lung Analysis 
with filter support" ON)
option (MAKE_DEBUGRELEASE   "Add support for building a 
Release
Target with debug info" ON)
option (USE_LA_BASE_LIB "Add support for laBase 
library." ON)
option (USE_LA_RESULTS  "Add support for results." ON)
option (USE_LA_DOCVIEW  "Add support for documents and 
views." ON)
option (USE_LA_ANALYSIS "Add support for the analysis 
package." ON)
option (USE_LA_GUI  "Add support for the 
GUI package." ON)
option (USE_LA_DICOM"Add support for the DICOM." ON)
option (USE_ideality"Use the ideality library." ON)
option (USE_lavtkINRIA3D"Use lavtkINRIA3D library." ON)
option (USE_MSVC_PCH"Use precompiled headers in 
MSVC." ON)

option (DISABLE_OPENGL  "Disable opengl. This will 
disable the
display of images." OFF)
option (DISABLE_RESULT_TIMESTAMPS   "Don't save the timetamp in the
filenames for the results" ON)
option (DISABLE_SLICE_THICK_IN_NAME "Don't put the slice thickness in
the document name." ON)
option (PACKAGE_FOR_INSTALL "Package Lung Analysis for 
installation." OFF)
option (USE_NEGATIVE_SPACING"Force using negative spacing on the Z 
axis." OFF)

#

set( LUNG_ANALYSIS_SRC ${PROJECT_SOURCE_DIR} )
set( LUNG_ANALYSIS_BINARY ${PROJECT_BINARY_DIR} )

IF (MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING
"Debug;RelWithDebInfo" FORCE)
SET (RELEASE_BUILD_NAME "RelWithDebInfo")
ELSE(MAKE_DEBUGRELEASE)
SET (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
"Debug;Release" FORCE)
SET (RELEASE_BUILD_NAME "Release")
ENDIF (MAKE_DEBUGRELEASE)

#

macro( LA_PCH_SUPPORT ProjectName )
if (MSVC)
if (USE_MSVC_PCH)

set_source_files_properties(${ProjectName}PCH.cxx
PROPERTIES
COMPILE_FLAGS "/Yc${ProjectName}PCH.h"
)
foreach( src_file ${${ProjectName}_SRCS} )
set_source_files_properties(
${src_file}
PROPERTIES
COMPILE_FLAGS "/Yu${ProjectName}PCH.h"
)
endforeach( src_file ${${ProjectName}_SRCS} )

list(APPEND ${ProjectName}_SRCS ${ProjectName}PCH.cxx)
list(APPEND ${ProjectName}_EXT_H

Re: [CMake] CMake & GCC on Windows

2009-07-20 Thread John Drescher
On Mon, Jul 20, 2009 at 12:05 PM, Robert Dailey wrote:
> Thanks for the response Bill.
> I guess I could always use CodeBlocks & MinGW.
> Sincerely,
> Robert Dailey
>

How about a single source folder that is shared between two binary out
of source builds. One for Visual Studio and the second for CodeBlocks
/ Mingw?

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] specific target to gettext

2009-07-25 Thread John Drescher
On Sat, Jul 25, 2009 at 7:20 PM, alexis
lameire wrote:
> Hi, I've spent weeks and weeks to solve this problem, but I haven't got any
> solution yet. that's why I need your help. My project uses gettext for
> localization, and cmake for build. I'd like to set a make target to
> automatically generate .pot files and update .po files, and another one to
> compile the .po files to .mo files and write them in the "bin" subdirectory
> of my project root.with the standard tree of gettext . How to do this? Thaks
> for your help
>

Check out add_custom_command

http://cmake.org/cmake/help/cmake2.6docs.html#command:add_custom_command

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] specific target to gettext

2009-07-25 Thread John Drescher
> thenks
> i have try it but i have this error when i make
> CMakeFiles/update_pot.dir/build.make:50: *** les commandes commencent avant
> la première cible. Arrêt.
> make[2]: *** [CMakeFiles/update_pot.dir/all] Erreur 2
> make[1]: *** [CMakeFiles/update_pot.dir/rule] Erreur 2
> make: *** [update_pot] Erreur 2
> http://pastie.org/559051 : my CMakeListe.txt :) sorry if the pastbin is not
> the good solution but i never yet use mailling list
>

Make sure you send your replies to the list also. I will try to look
at this as soon as I can. Pastebin is fine.

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, PrivateClass and not fount moc_xxx.cpp

2009-07-29 Thread John Drescher
On Wed, Jul 29, 2009 at 10:39 AM, John Drescher wrote:
> On Wed, Jul 29, 2009 at 10:27 AM, panter.dsd wrote:
>> On Wednesday 29 of July 2009 18:19:38 Michael Jackson wrote:
>>> You probably need to add an "include_directories()" command that
>>> points to where ever the moc_XXX.cpp file can be found.
>>>
>>>
>>> _
>>> Mike Jackson                  mike.jack...@bluequartz.net
>>> BlueQuartz Software                    www.bluequartz.net
>>> Principal Software Engineer                  Dayton, Ohio
>>>
>>
>> CMake does not generate moc_XXX.cpp. When compiling the generated file
>> moc_XXX.cxx, but I need the cpp.
>>
>
> I have seen this as well. The problem is moc is not executed on .cpp
> files only headers so if you have a private class defined in your .cpp
> file you will not get a moc_XXX.cpp file for it.
>

I mean CMake is not setting up moc for .cpp 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] Qt, PrivateClass and not fount moc_xxx.cpp

2009-07-29 Thread John Drescher
On Wed, Jul 29, 2009 at 10:27 AM, panter.dsd wrote:
> On Wednesday 29 of July 2009 18:19:38 Michael Jackson wrote:
>> You probably need to add an "include_directories()" command that
>> points to where ever the moc_XXX.cpp file can be found.
>>
>>
>> _
>> Mike Jackson                  mike.jack...@bluequartz.net
>> BlueQuartz Software                    www.bluequartz.net
>> Principal Software Engineer                  Dayton, Ohio
>>
>
> CMake does not generate moc_XXX.cpp. When compiling the generated file
> moc_XXX.cxx, but I need the cpp.
>

I have seen this as well. The problem is moc is not executed on .cpp
files only headers so if you have a private class defined in your .cpp
file you will not get a moc_XXX.cpp file for it.

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, PrivateClass and not fount moc_xxx.cpp

2009-07-29 Thread John Drescher
On Wed, Jul 29, 2009 at 10:48 AM, panter.dsd wrote:
> So how do I do?

I would create a bug report for this with a small example (not your
whole application).

In the past I just converted code like this to use a separate header
for the private class as a workaround.

-- 
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] Qt, PrivateClass and not fount moc_xxx.cpp

2009-07-29 Thread John Drescher
On Wed, Jul 29, 2009 at 10:52 AM, Bill Hoffman wrote:
> panter.dsd wrote:
>
>>
>> CMake does not generate moc_XXX.cpp. When compiling the generated file
>> moc_XXX.cxx, but I need the cpp.
>>
> I think you might want to not use #include with cpp when using Cmake, and
> that should fix your problem.  qt4_wrap_cpp( MOC_SOURCES ...) will put the
> list of moc sources in the variable MOC_SOURCES add_executable(
> PantherCommander ${MOC_SOURCES} ) will compile them into your exe, so no
> need to #include them.
>

I see. Thanks. I had the same problem a long while back and ended up
pulling class definition out of the cpp file and putting it in a
separate header file but this makes a lot of sense..

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   >