Re: [CMake] nmake build with different options at command line

2010-02-22 Thread Chauhan, Vikas
Thanks, I understand it now.

 

Vikas

 



From: David Cole [mailto:david.c...@kitware.com] 
Sent: 19 February 2010 18:12
To: Chauhan, Vikas
Cc: Tyler Roscoe; cmake@cmake.org; Bill Hoffman
Subject: Re: [CMake] nmake build with different options at command line

 

You cannot do the same thing with nmake. You must do it with cmake.

 

If you want to build multiple configurations in the same build tree, you
must use the Visual Studio or Xcode generators. The nmake and other
Makefile generators only support ONE CMAKE_BUILD_TYPE in a given build
tree.

 

The way to do it with nmake is to have two separate build trees. One for
Release and one for Debug. Then, in each of those directories, you may
simply run "nmake". Switch from one directory to the other to change
configurations with a make file generator.

 

 

HTH,

David

 

On Fri, Feb 19, 2010 at 12:50 PM, Chauhan, Vikas
 wrote:

My question has been stated in this post before, but I will repeat here
for convenience:
We have a way to build desired configuration using cmake (independent of
what is present as default in cmakecache.txt):

cmd> cmake --build .. --config= Release

I can choose different build config here at build time NOT at build
generation time (and is independent of what is present in
cmakecache.txt).

However, this is with cmake. My question is that how do I do the same
thing with nmake?

Thanks,
Vikas


> -Original Message-
> From: Tyler Roscoe [mailto:ty...@cryptio.net]

> Sent: 19 February 2010 16:09
> To: Chauhan, Vikas

> Cc: cmake@cmake.org; Bill Hoffman
> Subject: Re: [CMake] nmake build with different options at command
line
>
> On Fri, Feb 19, 2010 at 08:03:59AM -0800, Tyler Roscoe wrote:
> > On Fri, Feb 19, 2010 at 11:19:18AM -, Chauhan, Vikas wrote:
> > > Thanks but what is the option when we use nmake to build?
> >
> > I don't understand your question.
>
> Ok I'll take a stab.
>
> Since CMAKE_BUILD_TYPE is a cache variable, you only have to specify
the
> -D flag once, when running cmake and populating your build directory
for
> the first time. Subsequent builds (make) will use this
previously-cached
> CMAKE_BUILD_TYPE and all your builds with that build directory will be
> release builds.
>
> tyler
>
> > > > -Original Message-
> > > > From: Tyler Roscoe [mailto:ty...@cryptio.net]
> > > > Sent: 18 February 2010 17:09
> > > > To: Chauhan, Vikas
> > > > Cc: Bill Hoffman; cmake@cmake.org
> > > > Subject: Re: [CMake] nmake build with different options at
command
> > > line
> > > >
> > > > On Thu, Feb 18, 2010 at 05:07:37PM -, Chauhan, Vikas wrote:
> > > > > Thanks but is it possible from command line.
> > > >
> > > > cmake -DCMAKE_BUILD_TYPE=release ...
> > > >
> > > > (I'm pretty sure -D args have to come before other arguments to
> > > cmake.)
> > > >
> > > > tyler
> > ___
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

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

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

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

 

___
Powered by www.kitware.com

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

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

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

Re: [CMake] nmake build with different options at command line

2010-02-19 Thread Chauhan, Vikas
My question has been stated in this post before, but I will repeat here
for convenience:
We have a way to build desired configuration using cmake (independent of
what is present as default in cmakecache.txt):
cmd> cmake --build .. --config= Release

I can choose different build config here at build time NOT at build
generation time (and is independent of what is present in
cmakecache.txt).

However, this is with cmake. My question is that how do I do the same
thing with nmake?

Thanks,
Vikas

> -Original Message-
> From: Tyler Roscoe [mailto:ty...@cryptio.net]
> Sent: 19 February 2010 16:09
> To: Chauhan, Vikas
> Cc: cmake@cmake.org; Bill Hoffman
> Subject: Re: [CMake] nmake build with different options at command
line
> 
> On Fri, Feb 19, 2010 at 08:03:59AM -0800, Tyler Roscoe wrote:
> > On Fri, Feb 19, 2010 at 11:19:18AM -, Chauhan, Vikas wrote:
> > > Thanks but what is the option when we use nmake to build?
> >
> > I don't understand your question.
> 
> Ok I'll take a stab.
> 
> Since CMAKE_BUILD_TYPE is a cache variable, you only have to specify
the
> -D flag once, when running cmake and populating your build directory
for
> the first time. Subsequent builds (make) will use this
previously-cached
> CMAKE_BUILD_TYPE and all your builds with that build directory will be
> release builds.
> 
> tyler
> 
> > > > -Original Message-
> > > > From: Tyler Roscoe [mailto:ty...@cryptio.net]
> > > > Sent: 18 February 2010 17:09
> > > > To: Chauhan, Vikas
> > > > Cc: Bill Hoffman; cmake@cmake.org
> > > > Subject: Re: [CMake] nmake build with different options at
command
> > > line
> > > >
> > > > On Thu, Feb 18, 2010 at 05:07:37PM -, Chauhan, Vikas wrote:
> > > > > Thanks but is it possible from command line.
> > > >
> > > > cmake -DCMAKE_BUILD_TYPE=release ...
> > > >
> > > > (I'm pretty sure -D args have to come before other arguments to
> > > cmake.)
> > > >
> > > > tyler
> > ___
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] nmake build with different options at command line

2010-02-19 Thread Chauhan, Vikas
Thanks but what is the option when we use nmake to build?

-Vikas

> -Original Message-
> From: Tyler Roscoe [mailto:ty...@cryptio.net]
> Sent: 18 February 2010 17:09
> To: Chauhan, Vikas
> Cc: Bill Hoffman; cmake@cmake.org
> Subject: Re: [CMake] nmake build with different options at command
line
> 
> On Thu, Feb 18, 2010 at 05:07:37PM -, Chauhan, Vikas wrote:
> > Thanks but is it possible from command line.
> 
> cmake -DCMAKE_BUILD_TYPE=release ...
> 
> (I'm pretty sure -D args have to come before other arguments to
cmake.)
> 
> tyler
___
Powered by www.kitware.com

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

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

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


Re: [CMake] nmake build with different options at command line

2010-02-18 Thread Chauhan, Vikas
Thanks but is it possible from command line. 
For example we already have a similar option when cmake is used to build
i.e 
cmd> cmake --build .. --config= Release

thanks,
Vikas
> -Original Message-
> From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
> Sent: 18 February 2010 13:09
> To: Chauhan, Vikas
> Cc: cmake@cmake.org
> Subject: Re: [CMake] nmake build with different options at command
line
> 
> Chauhan, Vikas wrote:
> > Hi,
> >
> > Is it possible to specify the build options such as release/debug
etc
> > when building the nmake files generated by cmake ?
> >
> 
> Set CMAKE_BUILD_TYPE in the cache.
> 
> -Bill
> 
> --
> Bill Hoffman
> Kitware, Inc.
> 28 Corporate Drive
> Clifton Park, NY 12065
> bill.hoff...@kitware.com
> http://www.kitware.com
> 518 881-4905 (Direct)
> 518 371-3971 x105
> Fax (518) 371-4573
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] nmake build with different options at command line

2010-02-17 Thread Chauhan, Vikas
Hi,

Is it possible to specify the build options such as release/debug etc
when building the nmake files generated by cmake ?

Thanks,
Vikas
___
Powered by www.kitware.com

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

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

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


Re: [CMake] Specifying multiple build threads on windows

2010-01-24 Thread Chauhan, Vikas
Thanks but how do I integrate vcbuild or msbuild with cmake ?

Vikas

> -Original Message-
> From: John Drescher [mailto:dresche...@gmail.com]
> Sent: 24 January 2010 21:52
> To: Chauhan, Vikas
> Cc: cmake@cmake.org
> Subject: Re: [CMake] Specifying multiple build threads on windows
> 
> > Can you please help as how I could specify the number of threads to
be used
> > in the command line builds i.e. something like
> >
> > (For nmake)
> >
> > Cmd > nmake -j5
> >
> > (For Visual Studio 2008)
> >
> > cmd> cmake --build . -j5
> >
> 
> Use vcbuild or msbuild
> 
> 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] Specifying multiple build threads on windows

2010-01-24 Thread Chauhan, Vikas
Hi,

Can you please help as how I could specify the number of threads to be
used in the command line builds i.e. something like
(For nmake)
Cmd > nmake -j5
(For Visual Studio 2008)
cmd> cmake --build . -j5


Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] building source code generated using another project in cmake

2010-01-20 Thread Chauhan, Vikas
Hi,

I have a very interesting problem. It is described below.

I have two projects Proj1 & Proj2 under a top level root directory. 
Now, the build steps are as follows:
1.  Build Proj1 into Proj1.exe
2.  Execute Proj1.exe and it generates source1.cpp as an output (it
is a source file generator).
3.  source1.cpp is now included by Proj2
4.  Build proj2.exe

On the cmake GUI "Configure" works fine however "Generate" fails at the
root directory as Proj2 does not find the source1.cpp. Do you think we
can execute projects during build environment generation process i.e
between Proj1 & Proj2 ? 
I guess that inside cmakelists.txt Proj2 can make sure that Proj1 runs
before Proj2 builds but what if Proj2 requires source files generated by
Proj1. How this can be made possible is the question. 

Thanks,
Vikas

___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 gcc as an alternative compiler on windows

2010-01-20 Thread Chauhan, Vikas
Mike, Eric & John - thanks very much for the help. 
I will work on these ideas.

Regards,
Vikas

> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
Behalf
> Of John Drescher
> Sent: 20 January 2010 18:53
> To: Eric Noulard
> Cc: cmake@cmake.org
> Subject: Re: [CMake] Using gcc as an alternative compiler on windows
> 
> > 2010/1/20 Mike Jackson :
> >> You need to have a valid/correct installation of MinGW or
MSYS+MinGW or
> Cygwin.
> >
> > As a complement to Mike advice you may have a look at
> > Code::Blocks (aka C::B) too, it's a cross-platform IDE working on
Windows
> > and there is downloadable installer which comes bundled with MinGW
> > http://www.codeblocks.org/downloads/5
> >
> > and off course there is a Code::Blocks+MInGW generator supported by
CMake.
> >
> 
> To add an additional option I have successfully used QtCreator (which
> builds using MinGW) on windows with cmake. It supports CMakeLists.txt
> files directly. I would call it work in progress as far as the CMake
> support.
> 
> 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
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 customise filters in cmake generated projects for VS2008

2010-01-20 Thread Chauhan, Vikas
Thanks for the quick reply Mike.

Regards,
Vikas

> -Original Message-
> From: Mike Jackson [mailto:mike.jack...@bluequartz.net]
> Sent: 20 January 2010 17:21
> To: Chauhan, Vikas
> Cc: cmake@cmake.org
> Subject: Re: [CMake] How to customise filters in cmake generated
projects for
> VS2008
> 
> SOURCE_GROUP("ProjectInclude" FILES ${SOME_HEADERS} )
> _
> Mike Jackson  mike.jack...@bluequartz.net
> BlueQuartz Softwarewww.bluequartz.net
> Principal Software Engineer  Dayton, Ohio
> 
> 
> 
> On Wed, Jan 20, 2010 at 12:13 PM, Chauhan, Vikas
>  wrote:
> > Hi,
> >
> > Would you have any ideas on how I could organise the filters that
are
> > present in the Cmake generated vcproj files. At present it just
generates
> > filters "Source Files" & "Header Files" .
> >
> > If I want to include header files from different functional areas
then I how
> > can I create new filters, for eg the following filters are need in
same
> > project for include :
> >
> > Common/Include
> >
> > &
> >
> > Project/Include
> >
> >
> >
> > Thanks,
> >
> > Vikas
> >
> > ___
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
> > http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> >
___
Powered by www.kitware.com

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

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

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


[CMake] Using gcc as an alternative compiler on windows

2010-01-20 Thread Chauhan, Vikas
Hi,

At present I have written my source code for VS2008. I use cmake to
generate VS2008 project files.
If I wanted to switch the compiler to gcc then is it possible to use the
same cmakelists.txt that I have in my source tree & generate the nmake
files or makefiles or vcproj files to use gcc compiler on windows?

Thanks,
Vikas 
___
Powered by www.kitware.com

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

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

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

[CMake] How to customise filters in cmake generated projects for VS2008

2010-01-20 Thread Chauhan, Vikas
Hi,

Would you have any ideas on how I could organise the filters that are
present in the Cmake generated vcproj files. At present it just
generates filters "Source Files" & "Header Files" . 
If I want to include header files from different functional areas then I
how can I create new filters, for eg the following filters are need in
same project for include : 
Common/Include 
&
Project/Include
  
Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-15 Thread Chauhan, Vikas
> 
> Remove this CMakeCache.txt file, and re-run and it should work.
> 
> I would start with a clean build tree and source tree.   If you have
> ever run cmake in-source, clean your source tree so that it has no
> generated stuff in it.   Also, remove the entire build tree, then you
> should be fine.

Great, it worked. Thanks for your help. 
Actually, I was generating the vc project & solution files, but someone
suggested that if I use nmake the I should be able to build targets
selectively from command window. Do you think it is possible?

My actual question is as below, please advise if it is possible ?

For example I have a main project/dir - projectSystem I have three
component/dirs - projectcomponent1, projectcomponent2,
projectcomponent3.

Now on windows command prompt from the directory where the cmake
generated files are present, at present I issue a  command : 
cmake --build PATH_TO_PROJECTSYSTEM
This builds the projectSystem alongwith projectComponent1,
projectComponent2 & projectComponent3.

Now, I want to do two things on windows command window:
1. Query the list of sub-targets(components) available. In this case the
result should be the following list:

projectComponent1
projectComponent2
projectComponent3

2. Now based on the list in 1, optionally build any component. For
example issue a command:

cmake --build projectComponent1

Can we achieve this? Or is it asking for too much :)

___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-15 Thread Chauhan, Vikas
> Can you try this:
> 
> 
> 1. Create a new directory:
> mkdir foo
> 2. Create a CMakeLists.txt file in foo
> project(foo)
> add_library(foo bar.c)
> 
> Create an empty file bar.c.
> 
> 3. Create a build directory under foo:
> mkdir build
> 
> 4. run cmake
> 
> cd build
> cmake -G"NMake Makefiles" ..
> 

Great, it works this time and finds the compiler. However, I do not
understand why it does not work for my project directory?

Following is the output:

C:\cmaketest\foo\build>cmake -G"NMake Makefiles" ..
-- The C compiler identification is MSVC
-- The CXX compiler identification is MSVC
-- Check for CL compiler version
-- Check for CL compiler version - 1500
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - no
-- Check CL platform
-- Check CL platform - 32 bit
-- Check for working C compiler: C:/Program Files/Microsoft Visual
Studio 9.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files/Microsoft Visual
Studio 9.0/VC/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 9.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual
Studio 9.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: C:/cmaketest/foo/build

C:\cmaketest\foo\build>dir
 Volume in drive C has no label.
 Volume Serial Number is 1099-BF1F

 Directory of C:\cmaketest\foo\build

15/01/2010  21:19  .
15/01/2010  21:19  ..
15/01/2010  21:1911,759 CMakeCache.txt
15/01/2010  21:19  CMakeFiles
15/01/2010  21:19 1,450 cmake_install.cmake
15/01/2010  21:19 4,959 Makefile
   3 File(s) 18,168 bytes
   3 Dir(s)  195,137,568,768 bytes free

C:\cmaketest\foo\build>nmake build

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1073: don't know how to make 'build'
Stop.

C:\cmaketest\foo\build>nmake

Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

Scanning dependencies of target foo
[100%] Building C object CMakeFiles/foo.dir/bar.c.obj
bar.c
Linking C static library foo.lib
[100%] Built target foo
> Also, is there a CMakeCache.txt file in
> C:/Work/PCT_LTE/Hercules/CID/MapperGenerator?
> 
> What is in the CMakeCache.txt in
> C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake?
> 

Yes, there is a CMakeCache.txt in this directory. The contents are as
below(Sorry, it is a big file):
# This is the CMakeCache file.
# For build in directory:
c:/Work/PCT_LTE/Hercules/CID/MapperGenerator/build_nmake
# It was generated by CMake: C:/Program Files/CMake 2.8/bin/cmake.exe
# You can edit this file to change values found and used by cmake.
# If you do not want to change any of the values, simply exit the
editor.
# If you do want to change a value, simply edit, save, and exit the
editor.
# The syntax for the file is as follows:
# KEY:TYPE=VALUE
# KEY is the name of a variable in the cache.
# TYPE is a hint to GUI's for the type of VALUE, DO NOT EDIT TYPE!.
# VALUE is the current value for the KEY.


# EXTERNAL cache entries


//Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=CMAKE_MAKE_PROGRAM-NOTFOUND

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=MapperGenerator

//If true, cmake will use relative paths in makefiles and projects.
CMAKE_USE_RELATIVE_PATHS:BOOL=OFF

//Value Computed by CMake
MapperGenerator_BINARY_DIR:STATIC=C:/Work/PCT_LTE/Hercules/CID/MapperGen
erator/build_nmake

//Value Computed by CMake
MapperGenerator_SOURCE_DIR:STATIC=C:/Work/PCT_LTE/Hercules/CID/MapperGen
erator



# INTERNAL cache entries


//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/Work/PCT_LTE/Hercules/CID/MapperGenerato
r/build_nmake
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=2
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=8
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=0
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake 2.8/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake 2.8/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake 2.8/bin/ctest.exe
//Path to cache edit program executable.
CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake 2.8/bin/cmake-gui.exe
//Start directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/Work/PCT_

Re: [CMake] using cmake on windows - query on existing targets

2010-01-15 Thread Chauhan, Vikas
Hi David/Bill,

 

I removed the extra set of "". I am not sure how they came into :-(

But, still the problem persists, following is the output:

C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../
-G"NMake Makefiles" --trace

Running with trace output on.

C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/CMakeLists.txt(1):
cmake_minimum_required(VERSION 2.8 )

C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/CMakeLists.txt(4):
project(MapperGenerator )

C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeNMakeFindMake.cmake(16):
SET(CMAKE_MAKE_PROGRAM nmake CACHE STRING Program used to build from
makefiles. )

C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeNMakeFindMake.cmake(18):
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM )

CMake Error: CMake was unable to find a build program corresponding to
"NMake Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a different build tool.

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.

Missing variable is:

CMAKE_C_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.

Missing variable is:

CMAKE_C_COMPILER

CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/build_nmake/CMakeFiles
/CMakeCCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.

Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.

Missing variable is:

CMAKE_CXX_COMPILER

CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/build_nmake/CMakeFiles
/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage

-- Configuring incomplete, errors occurred!

 

C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>path

PATH=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program
Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft
Visual Studio
9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\M

icrosoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual
Studio 9.0\VC\VCPackages;C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\bin;C:\Program
Files\Ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem

;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program
Files\Intel\DMIX;c:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\GNU\WinCvs 1.2;C:\

PROGRA~1\Tcl\bin;C:\Program Files\Tcl\bin;C:\Program Files\Microsoft
Visual Studio 9.0\VC\bin;C:\Program
Files\xerces-c-bin_3_0_1\bin;C:\cygwin\bin;C:\TTCNToolbox\ttcn\bin;C:\Wo
rk\PCT_LTE\Hercules\bin;C:\Program Files\Microso

ft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT;C:\Program
Files\CMake 2.8\bin;C:\TTCNToolbox\ttcn\bin;C:\Program
Files\Anritsu\Perl\bin;C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE;C:\Program Files\Microsof

t Visual Studio 9.0\Common7\Tools;

 

C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>

 

 



From: David Cole [mailto:david.c...@kitware.com] 
Sent: 14 January 2010 17:58
To: Chauhan, Vikas
Cc: Bill Hoffman; cmake@cmake.org
Subject: Re: [CMake] using cmake on windows - query on existing targets

 

Get rid of the quotes in this part of your PATH:
"C:\Program Files\Microsoft
Visual Studio 9.0\VC\bin"

That's probably what's messing it up But they shouldn't be there if
you're using the "Vistual Studio command prompt" so the question is:
where did they come from?


HTH,
David



___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-14 Thread Chauhan, Vikas


> -Original Message-
> From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
> Sent: 14 January 2010 16:19
> To: Chauhan, Vikas
> Cc: Bill Hoffman; cmake@cmake.org
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> Chauhan, Vikas wrote:
> >
> >> -Original Message-
> >> From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
> >> Sent: 14 January 2010 13:57
> >> To: Chauhan, Vikas
> >> Cc: Bill Hoffman; cmake@cmake.org
> >> Subject: Re: [CMake] using cmake on windows - query on existing
> > targets
> >> Chauhan, Vikas wrote:
> >> -
> >>> ---
> >>> C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../
> > -G
> >>> "NMake Mak
> >>> efiles"
> >>> CMake Error: CMake was unable to find a build program
corresponding
> > to
> >>> "NMake Ma
> >>> kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
> > select a
> >>> differe
> >>> nt build tool.
> >>
> >> Do you have nmake in your PATH?
> >>
> >> -Bill
> >>
> >
> > Yes, it is present. Following the version of nmake:
> > Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
> > Copyright (C) Microsoft Corporation.  All rights reserved.
> >
> 
> Can you try this:
> 
> cmake ../ -G"NMake Makefiles" --trace
> 
> What is the output?
> 
The output is:

--
Running with trace output on.
C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/CMakeLists.txt(1):
cmake_minimum_required(VERSION 2.8 )
C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/CMakeLists.txt(4):
project(MapperGenerator )
C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeNMakeFindMake.cmake(16):
SET(CMAKE_MAKE_PROGRAM nmake CACHE STRING Program used to build from
makefiles. )
C:/Program Files/CMake
2.8/share/cmake-2.8/Modules/CMakeNMakeFindMake.cmake(18):
MARK_AS_ADVANCED(CMAKE_MAKE_PROGRAM )
CMake Error: CMake was unable to find a build program corresponding to
"NMake Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a different build tool.
CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/build_nmake/CMakeFiles
/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/MapperGenerator/build_nmake/CMakeFiles
/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!

--
> For some reason cmake is unable to find nmake in  your PATH.  Perhaps
> your PATH variable has something funny in it.  What is the contents of
> the PATH variable in that shell?
> 
PATH=C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE;C:\Program
Files\Microsoft Visual Studio 9.0\VC\BIN;C:\Program Files\Microsoft
Visual Studio
9.0\Common7\Tools;C:\WINDOWS\Microsoft.NET\Framework\v3.5;C:\WINDOWS\M
icrosoft.NET\Framework\v2.0.50727;C:\Program Files\Microsoft Visual
Studio 9.0\VC\VCPackages;C:\Program Files\\Microsoft
SDKs\Windows\v6.0A\bin;C:\Program
Files\Ruby\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem
;C:\Program Files\Common Files\Roxio Shared\DLLShared\;C:\Program
Files\ATI Technologies\ATI.ACE\Core-Static;C:\Program
Files\Intel\DMIX;c:\Program Files\Microsoft SQL
Server\90\Tools\binn\;C:\Program Files\GNU\WinCvs 1.2;C:\
PROGRA~1\Tcl\bin;C:\Program Files\Tcl\bin;"C:\Program Files\Microsoft
Visual Studio 9.0\VC\bin";C:\Program
Files\xerces-c-bin_3_0_1\bin;C:\cygwin\bin;C:\TTCNToolbox\ttcn\bin;C:\Wo
rk\PCT_LTE\Hercules\bin;C:\Program Files\Micro
soft Visual Studio 9.0\VC\redist\x86\Microsoft.VC90.CRT;C:\Program
Files\CMake 2.8\bin;C:\TTCNToolbox\ttcn\bin;C:\Program
Files\Anritsu\Perl\bin;C:\Program Files\Microsoft Visual Studio
9.0\Common7\IDE;C:\Program Files\Micros
oft Visual Studio 9.0\Common7\Tools;

-Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-14 Thread Chauhan, Vikas


> -Original Message-
> From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
> Sent: 14 January 2010 13:57
> To: Chauhan, Vikas
> Cc: Bill Hoffman; cmake@cmake.org
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> Chauhan, Vikas wrote:
> -
> > ---
> > C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../
-G
> > "NMake Mak
> > efiles"
> > CMake Error: CMake was unable to find a build program corresponding
to
> > "NMake Ma
> > kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a
> > differe
> > nt build tool.
> 
> 
> Do you have nmake in your PATH?
> 
> -Bill
> 

Yes, it is present. Following the version of nmake:
Microsoft (R) Program Maintenance Utility Version 9.00.21022.08
Copyright (C) Microsoft Corporation.  All rights reserved.

Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-14 Thread Chauhan, Vikas
 

 



From: c...@lambda.nu [mailto:c...@lambda.nu] On Behalf Of Chris Hillery
Sent: 13 January 2010 03:00
To: Bill Hoffman
Cc: Chauhan, Vikas; cmake@cmake.org
Subject: Re: [CMake] using cmake on windows - query on existing targets

 

On Tue, Jan 12, 2010 at 2:04 PM, Bill Hoffman 
wrote:


What version of the compiler did you install?  The commercial versions
of the compiler have a VS command prompt under the tools menu that you
can use to create a shell with the correct env to run the compiler.

The same is true for the free Visual Studio Express (which somewhat
confusingly is NOT identified as "the free VC compiler" by CMake, but it
all works fine).

Ceej
aka Chris Hillery

 

I am using Visual Studio 2008 Standard edition. Unfortunately it still
does not work from VS command prompt. I get the following error:


---

C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../ -G
"NMake Makefiles"

CMake Error: CMake was unable to find a build program corresponding to
"NMake Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to
select a different build tool.

CMake Error: Error required internal CMake variable not set, cmake may
be not be  built correctly.

Missing variable is:

CMAKE_C_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may
be not be  built correctly.

Missing variable is:

CMAKE_C_COMPILER

CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
 

rGenerator/build_nmake/CMakeFiles/CMakeCCompiler.cmake

CMake Error: Error required internal CMake variable not set, cmake may
be not be  built correctly.

Missing variable is:

CMAKE_CXX_COMPILER_ENV_VAR

CMake Error: Error required internal CMake variable not set, cmake may
be not be  built correctly.

Missing variable is:

CMAKE_CXX_COMPILER

CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
 

rGenerator/build_nmake/CMakeFiles/CMakeCXXCompiler.cmake

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error:
CMAKE_CXX_COMPILER not set, after EnableLanguage

-- Configuring incomplete, errors occurred!


--

 

___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-13 Thread Chauhan, Vikas


> -Original Message-
> From: Bill Hoffman [mailto:bill.hoff...@kitware.com]
> Sent: 12 January 2010 22:05
> To: Chauhan, Vikas
> Cc: Eric Noulard; cmake@cmake.org
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> 
> >
> > I noticed that it generates the following output:
> > -- Check if this is a free VC compiler - yes
> > I do not think I am using a free VC compiler, something is wrong
here.
> > Is it possible to use nmake with Visual Studio 2008 compiler using
cmake
> > 2.8?
> >
> 
> Are you running cmake from a shell that has the environment setup
> correctly for cl to work?
> 
> 
> foo.cxx
> #include 
> int main() { std::cout << "hello\n";}
> 
> cl foo.cxx
> 
> Does that work for you?
> 
> What version of the compiler did you install?  The commercial versions
> of the compiler have a VS command prompt under the tools menu that you
> can use to create a shell with the correct env to run the compiler.
> 
> -Bill

Hi,

I am still getting the problem from Visual Studio's command prompt. 
Following the compiler detail:

---
C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cl
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]

---
Following are the details of the error:

---
C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cmake ../ -G
"NMake Mak
efiles"
CMake Error: CMake was unable to find a build program corresponding to
"NMake Ma
kefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a
differe
nt build tool.
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_C_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_C_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
rGenerator/build_nmake/CMakeFiles/CMakeCCompiler.cmake
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_CXX_COMPILER_ENV_VAR
CMake Error: Error required internal CMake variable not set, cmake may
be not be
 built correctly.
Missing variable is:
CMAKE_CXX_COMPILER
CMake Error: Could not find cmake module
file:C:/Work/PCT_LTE/Hercules/CID/Mappe
rGenerator/build_nmake/CMakeFiles/CMakeCXXCompiler.cmake
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!


C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmake>cl foo.cpp
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

foo.cpp
C:\Program Files\Microsoft Visual Studio 9.0\VC\INCLUDE\xlocale(342) :
warning C
4530: C++ exception handler used, but unwind semantics are not enabled.
Specify
/EHsc
Microsoft (R) Incremental Linker Version 9.00.21022.08

--
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-12 Thread Chauhan, Vikas


> > Did you try the Nmake generator and call
> >
> > nmake help
> >
> Thanks, I tried using nmake generator i.e. - cmake ../ -G "NMake
Makefiles"-  but
> it does not work in cmake 2.8. It fails to find the compiler. However
the
> command - cmake ../ -G "Visual Studio 9 2008" - works fine. The errors
I get are
> as:
> 
> -- The C compiler identification is unknown
> -- The CXX compiler identification is unknown
> CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not
> found.   Please set CMAKE_RC_COMPILER to a valid compiler path or
name.
> -- Check for CL compiler version
> -- Check for CL compiler version - failed
> -- Check if this is a free VC compiler
> -- Check if this is a free VC compiler - yes
> -- Check CL platform
> -- Check CL platform - 64 bit
> -- Using FREE VC TOOLS, NO DEBUG available
> -- Check for working C compiler: cl
> CMake Error at C:/Program Files/CMake 2.8/share/cmake-
> 2.8/Modules/CMakeRCInformation.cmake:22 (GET_FILENAME_COMPONENT):
>   get_filename_component called with incorrect number of arguments
> Call Stack (most recent call first):
>   C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/Platform/Windows-
> cl.cmake:32 (ENABLE_LANGUAGE)
>   C:/Program Files/CMake 2.8/share/cmake-
> 2.8/Modules/CMakeCInformation.cmake:58 (INCLUDE)
>   CMakeLists.txt:2 (PROJECT)
> 
> 
> CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
> CMake Error: your C compiler: "cl" was not found.   Please set
> CMAKE_C_COMPILER to a valid compiler path or name.
> CMake Error: Internal CMake error, TryCompile configure of cmake
failed
> -- Check for working C compiler: cl -- broken
> CMake Error at C:/Program Files/CMake 2.8/share/cmake-
> 2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
>   The C compiler "cl" is not able to compile a simple test program.
> 
>   It fails with the following output:
> 
> 
>   CMake will not be able to correctly generate this project.
> Call Stack (most recent call first):
>   CMakeLists.txt:4 (project)
> 
> 
> CMake Error: your C compiler: "cl" was not found.   Please set
> CMAKE_C_COMPILER to a valid compiler path or name.
> CMake Error: your CXX compiler: "cl" was not found.   Please set
> CMAKE_CXX_COMPILER to a valid compiler path or name.
> -- Configuring incomplete, errors occurred!
> 

I noticed that it generates the following output:
-- Check if this is a free VC compiler - yes
I do not think I am using a free VC compiler, something is wrong here.
Is it possible to use nmake with Visual Studio 2008 compiler using cmake
2.8?

> > > 2. the user should be able to choose a sub-component to build
without
> > > asking to build the whole component. Also, I do not want to be
> > > generating build files every time I choose to build a different
> > > sub-component.
> >
> > nmake subcomponent
> 
> I will try once I get nmake generation to work.
> >
> > > Is this possible?
> > >
> > > Please note that I am on windows. I guess this is easily possible
on
> > > Linux. As make allows you to query a list of targets & can build
> > > specific targets as well. Please correct me if I am wrong.
> >
> > I bet nmake should support more or less the same set
> > of target than unix make, but since I'm not a experienced Windows
user
> > I may be wrong.
> >
> > If the Nmake generator does not suit your need may be the MSYS
Makefile
> would?
> >
> >
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-11 Thread Chauhan, Vikas

> > I understand what you mean and it is similar to what the macro suggested
> > by Alex does.
> > However, I do not want a developer to have a need to change setting in
> > the cmake GUI for what I need.
> >
> > What I want is that:
> > 1. the user should be able to see a list of components & sub-components,
> > using a command from the cmd window from the location where the cmake
> > GUI has generated the build files.
> 
> Did you try the Nmake generator and call
> 
> nmake help
> 
Thanks, I tried using nmake generator i.e. - cmake ../ -G "NMake Makefiles"-  
but it does not work in cmake 2.8. It fails to find the compiler. However the 
command - cmake ../ -G "Visual Studio 9 2008" - works fine. The errors I get 
are as:

-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
CMake Error: your RC compiler: "CMAKE_RC_COMPILER-NOTFOUND" was not found.   
Please set CMAKE_RC_COMPILER to a valid compiler path or name.
-- Check for CL compiler version
-- Check for CL compiler version - failed
-- Check if this is a free VC compiler
-- Check if this is a free VC compiler - yes
-- Check CL platform
-- Check CL platform - 64 bit
-- Using FREE VC TOOLS, NO DEBUG available
-- Check for working C compiler: cl
CMake Error at C:/Program Files/CMake 
2.8/share/cmake-2.8/Modules/CMakeRCInformation.cmake:22 
(GET_FILENAME_COMPONENT):
  get_filename_component called with incorrect number of arguments
Call Stack (most recent call first):
  C:/Program Files/CMake 
2.8/share/cmake-2.8/Modules/Platform/Windows-cl.cmake:32 (ENABLE_LANGUAGE)
  C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeCInformation.cmake:58 
(INCLUDE)
  CMakeLists.txt:2 (PROJECT)


CMake Error: CMAKE_RC_COMPILER not set, after EnableLanguage
CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER 
to a valid compiler path or name.
CMake Error: Internal CMake error, TryCompile configure of cmake failed
-- Check for working C compiler: cl -- broken
CMake Error at C:/Program Files/CMake 
2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
  The C compiler "cl" is not able to compile a simple test program.

  It fails with the following output:


  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:4 (project)


CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER 
to a valid compiler path or name.
CMake Error: your CXX compiler: "cl" was not found.   Please set 
CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!

> > 2. the user should be able to choose a sub-component to build without
> > asking to build the whole component. Also, I do not want to be
> > generating build files every time I choose to build a different
> > sub-component.
> 
> nmake subcomponent

I will try once I get nmake generation to work.
> 
> > Is this possible?
> >
> > Please note that I am on windows. I guess this is easily possible on
> > Linux. As make allows you to query a list of targets & can build
> > specific targets as well. Please correct me if I am wrong.
> 
> I bet nmake should support more or less the same set
> of target than unix make, but since I'm not a experienced Windows user
> I may be wrong.
> 
> If the Nmake generator does not suit your need may be the MSYS Makefile would?
> 
> 
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org
___
Powered by www.kitware.com

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

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

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


Re: [CMake] using cmake on windows - query on existing targets

2010-01-11 Thread Chauhan, Vikas
> > Actually, when I used the macro I found that though this macro gives
> > a
> > useful functionality it is not exactly what I wanted.
> >
> > What I want to do can be illustrated the following example:
> > I have a main project/dir - projectSystem
> > I have three component/dir - projectcomponent1, projectcomponent2,
> > projectcomponent3.
> >
> > Now on windows from the directory where the cmake generated files
are
> > present, at present I issue a  command :
> > cmake --build PATH_TO_PROJECTSYSTEM
> > This builds the projectSystem alongwith projectComponent1,
> > projectComponent2 & projectComponent3.
> >
> > Now, I want to do two things on command window(from the dir where
> > cmake
> > build files are generated):
> > 1. Query the list of sub-targets(components) available. In this case
> > the
> > result is a list
> > projectComponent1
> > projectComponent2
> > projectComponent3
> > 2. Now based on the list in 1, optionally build any component. For
> > example issue a command:
> >
> > cmake --build projectComponent1
> >
> > Can we achieve this? Or is it asking for too much :)
> >
> > Thanks,
> > Vikas
> 
> I'm new to CMake too, but it looks like you could do what you want
with the
> option() directive.
> 
> So I would have in my CMakeLists.txt something like:
> 
> option(ProjectComponent1 "Builds the first project component" OFF)
> etc.
> 
> And later on:
> if(ProjectComponent1)
>add_subdirectory(${ProjectComponent1_DIR})
> endif(ProjectComponent1)
> etc.
> 
> and then in ccmake set the option to ON when you want to build with
it.  I'd be
> surprised if there wasn't a way to define separate make targets
somewhere
> instead though, so you could do "make projectComponent1", but I'm not
sure
> about how to do that.

I understand what you mean and it is similar to what the macro suggested
by Alex does.
However, I do not want a developer to have a need to change setting in
the cmake GUI for what I need.

What I want is that:
1. the user should be able to see a list of components & sub-components,
using a command from the cmd window from the location where the cmake
GUI has generated the build files. 
2. the user should be able to choose a sub-component to build without
asking to build the whole component. Also, I do not want to be
generating build files every time I choose to build a different
sub-component.

Is this possible?

Please note that I am on windows. I guess this is easily possible on
Linux. As make allows you to query a list of targets & can build
specific targets as well. Please correct me if I am wrong.

Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-10 Thread Chauhan, Vikas


> -Original Message-
> From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
> Sent: 06 January 2010 21:24
> To: cmake@cmake.org
> Cc: Chauhan, Vikas
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> On Wednesday 06 January 2010, Chauhan, Vikas wrote:
> > Hi,
> >
> > I am quite new to using cmake and at the moment I am trying to find
my
> > way through it.
> > I was wondering how we can query different targets on windows when
using
> > cmake.
> > For example: I may have a set of separate directories(each
containing a
> > project) and from the top level root directory, I want to
selectively
> > build a subset of projects.
> 
> in KDE we have the macro
> macro_optional_add_subdirectory()
>
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/MacroOptionalAddSu
> bdirectory.cmake?revision=940658&view=markup
> 
> E.g. if you do
> macro_optional_add_subdirectory(project1)
> 
> the subdir project1/ will be added like with normal
add_subdirectory(), but
> additionally you'll have a cmake option "BUILD_project1", which you
can
> enable and disable, and when disabled, the directory will not be
added.
> 
> > How can I do it on the command line ? Also, can I query the list of
> > targets/projects from the command line?
> 
> E.g. with the approach above, you can use cmake-gui or ccmake to have
a look
> at the available options.
> 
> Does that help ?
> 
> Alex

Actually, when I used the macro I found that though this macro gives a
useful functionality it is not exactly what I wanted.

What I want to do can be illustrated the following example:
I have a main project/dir - projectSystem
I have three component/dir - projectcomponent1, projectcomponent2,
projectcomponent3.

Now on windows from the directory where the cmake generated files are
present, at present I issue a  command : 
cmake --build PATH_TO_PROJECTSYSTEM
This builds the projectSystem alongwith projectComponent1,
projectComponent2 & projectComponent3.

Now, I want to do two things on command window(from the dir where cmake
build files are generated):
1. Query the list of sub-targets(components) available. In this case the
result is a list
projectComponent1
projectComponent2
projectComponent3
2. Now based on the list in 1, optionally build any component. For
example issue a command:

cmake --build projectComponent1

Can we achieve this? Or is it asking for too much :)

Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] FindBoost.cmake to find the boost libraries

2010-01-10 Thread Chauhan, Vikas
> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
Behalf
> Of Andreas Pakulat
> Sent: 10 January 2010 21:39
> To: cmake@cmake.org
> Subject: Re: [CMake] FindBoost.cmake to find the boost libraries
> 
> On 10.01.10 19:55:44, Chauhan, Vikas wrote:
> > However, do you know the use of "Boost_FIND_COMPONENTS" command.
There
> > is no documentation for it at present. Is it a deprecated command?
> 
> There's no such command, never was. But there seems to be a variable
of
> that name used inside FindBoost.cmake. Its however just an internal
> variable as far as I can see (i.e. its not documented)
> 
> Andreas
> 
My bad, I understand it now. Thanks for the info.

Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] FindBoost.cmake to find the boost libraries

2010-01-10 Thread Chauhan, Vikas


> -Original Message-
> From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On
Behalf
> Of Andreas Pakulat
> Sent: 10 January 2010 17:51
> To: cmake@cmake.org
> Subject: Re: [CMake] FindBoost.cmake to find the boost libraries
> 
> On 10.01.10 15:57:23, Chauhan, Vikas wrote:
> > Hi all,
> >
> > I am using the code below in cmakelists.txt to find the boost
libraries
> > using cmake 2.8.
> > After the execution "Boost_LIBRARIES" does not contain anything. Am
I
> > correct in assuming that this variable must be populated with the
list
> > of boost libraries?
> 
> No you're not correct. The problem is that you're using the
> FindBoost.cmake module in the wrong way. You're supposed to use
> 
> find_package(Boost )
> 
> where options include the boost libs you want to use. See the top of
> FindBoost.cmake for an example how to use it.
> 

Thanks, I tried "find_package" and it works now.

I had tried "find_package" earlier and did not work. Probably, because I
had to set the BOOST_LIBRARYDIR correctly as it is a non-standard one in
my environment. So, adding these two commands makes boost work:
set (BOOST_LIBRARYDIR  "C:/Program Files/boost1.35.0/lib_vc90")
find_package( Boost 1.35.0 COMPONENTS system)

However, do you know the use of "Boost_FIND_COMPONENTS" command. There
is no documentation for it at present. Is it a deprecated command?

Vikas

> Andreas
> 
> --
> The whole world is a tuxedo and you are a pair of brown shoes.
>   -- George Gobel
> ___
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
___
Powered by www.kitware.com

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

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

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


[CMake] FindBoost.cmake to find the boost libraries

2010-01-10 Thread Chauhan, Vikas
Hi all,

I am using the code below in cmakelists.txt to find the boost libraries
using cmake 2.8. 
After the execution "Boost_LIBRARIES" does not contain anything. Am I
correct in assuming that this variable must be populated with the list
of boost libraries?
Also, I am not sure how do I get the appropriate debug/release boost
libraries depending on the build configuration.
What are your thoughts on the FindBoost.cmake file located at the link
below (It was discussed in the mailing list in January 2008)?
http://www.cmake.org/pipermail/cmake/2008-January/019245.html

Thanks,
Vikas


---
set(BOOST_ROOT "C:/Program Files/boost1.35.0")
set(Boost_DEBUG TRUE)
#search for BOOST
INCLUDE(${CMAKE_MODULE_PATH}/FindBoost.cmake)

IF (Boost_FOUND)
#compare version strings 
STRING (COMPARE LESS "${Boost_VERSION}" 1.35.0 VersionIncompatible)
IF (VersionIncompatible)
MESSAGE(FATAL_ERROR "Boost ${Boost_VERSION} not supported. 
Only 1.35.0 version is supported.")
ELSE (VersionIncompatible)
MESSAGE (STATUS "Found Boost ${Boost_VERSION} --
${Boost_LIBRARIES}")
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
SET(requiredLibs ${requiredLibs} ${Boost_LIBRARIES})
ENDIF (VersionIncompatible)
ELSE (Boost_FOUND)
MESSAGE (STATUS "Boost NOT FOUND")
ENDIF (Boost_FOUND)


---
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] Coloured output for cmake on windows

2010-01-09 Thread Chauhan, Vikas
Hi,

I guess there is no end to wishes & this is another example of it.

Is it possible to get a coloured output on windows using a build command
like: cmake --build . ?

Currently is it because dos cmd window doesn't support it or there is
some other reason?

Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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 on windows - query on existing targets

2010-01-06 Thread Chauhan, Vikas

> -Original Message-
> From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
> Sent: 06 January 2010 21:24
> To: cmake@cmake.org
> Cc: Chauhan, Vikas
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> On Wednesday 06 January 2010, Chauhan, Vikas wrote:
> > Hi,
> >
> > I am quite new to using cmake and at the moment I am trying to find
my
> > way through it.
> > I was wondering how we can query different targets on windows when
using
> > cmake.
> > For example: I may have a set of separate directories(each
containing a
> > project) and from the top level root directory, I want to
selectively
> > build a subset of projects.
> 
> in KDE we have the macro
> macro_optional_add_subdirectory()
>
http://websvn.kde.org/trunk/KDE/kdelibs/cmake/modules/MacroOptionalAddSu
> bdirectory.cmake?revision=940658&view=markup
> 
> E.g. if you do
> macro_optional_add_subdirectory(project1)
> 
> the subdir project1/ will be added like with normal
add_subdirectory(), but
> additionally you'll have a cmake option "BUILD_project1", which you
can
> enable and disable, and when disabled, the directory will not be
added.
> 
> > How can I do it on the command line ? Also, can I query the list of
> > targets/projects from the command line?
> 
> E.g. with the approach above, you can use cmake-gui or ccmake to have
a look
> at the available options.
> 
> Does that help ?
> 
I think this is what I wanted. I will try and let you know.
Thanks,
Vikas

> Alex
___
Powered by www.kitware.com

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

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

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


Re: [CMake] using cmake on windows - query on existing targets

2010-01-06 Thread Chauhan, Vikas


> -Original Message-
> From: John Drescher [mailto:dresche...@gmail.com]
> Sent: 06 January 2010 19:57
> To: Chauhan, Vikas; CMake mailing list
> Subject: Re: [CMake] using cmake on windows - query on existing
targets
> 
> I am going to only answer 1 part of this.
> 
> > For example: I may have a set of separate directories(each
containing a
> > project) and from the top level root directory, I want to
selectively build
> > a subset of projects.
> >
> > How can I do it on the command line ?
> 
> I do this with a batch file. Each project configures an install.bat.in
> file which generates a install.bat in a Build sudirectory of the
> projects Build tree.
> 
> Here is an example for a project called LungAnalysis
> 
> Here is the install.bat.in
> [x:\]type X:\CMakeBased\Qt\LungAnalysis\install.bat.in
> devenv @project_binary_...@\@project_n...@.sln /build
> @RELEASE_BUILD_NAME@ /project PACKAGE
> 
> Now the install.bat
> [x:\]type X:\32Bit\VC.80\Qt\LungAnalysis\Batch\install.bat
> devenv X:/32Bit/VC.80/Qt/LungAnalysis\LungAnalysis.sln /build
> RelWithDebInfo /project PACKAGE
> 
> So then in a the root folder for the build trees for 32 bit vc2005
> projects folder I have:
> 
> [x:\32bit\vc.80]type install_la.bat
> call Lung\CT_Imaging\Batch\install.bat
> call Lung\BZ_Airway\Batch\install.bat
> call Lung\SCP_LS\Batch\install.bat
> call Lung\JPU_Lobe\Batch\install.bat
> call Qt\QtbasicUtils\Batch\install.bat
> call Qt\LungAnalysis\Batch\install.bat
> 
> This builds all dependencies for the project by calling each projects
> install.bat script.
> 
> I know this probably could be done in a more cross platform way but
> this was pretty easy to implement on the platform I develop the most.
> When I build on linux (not that often) I build each project manually.
> 
> John
> 
> John

Thanks, however I was looking to do it in a path independent way. For
example by just using the directory/vcproj name from top build
directory. Please do correct me if I have not understood correctly.

Thanks,
Vikas
___
Powered by www.kitware.com

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

Please keep messages on-topic and check 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] using cmake on windows - query on existing targets

2010-01-06 Thread Chauhan, Vikas
Hi, 

I am quite new to using cmake and at the moment I am trying to find my
way through it. 
I was wondering how we can query different targets on windows when using
cmake. 
For example: I may have a set of separate directories(each containing a
project) and from the top level root directory, I want to selectively
build a subset of projects.

How can I do it on the command line ? Also, can I query the list of
targets/projects from the command line?

Regards,
Vikas  

___
Powered by www.kitware.com

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

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

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