Re: [CMake] using cmake on windows - query on existing targets
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_nmakecmake ../ -GNMake 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_nmakepath 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
Chauhan, Vikas wrote: Hi David/Bill, I removed the extra set of “”. I am not sure how they came into L 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 -GNMake Makefiles .. 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? -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
Re: [CMake] using cmake on windows - query on existing targets
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 -GNMake 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\buildcmake -GNMake 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\builddir Volume in drive C has no label. Volume Serial Number is 1099-BF1F Directory of C:\cmaketest\foo\build 15/01/2010 21:19DIR . 15/01/2010 21:19DIR .. 15/01/2010 21:1911,759 CMakeCache.txt 15/01/2010 21:19DIR 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\buildnmake 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\buildnmake 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
Re: [CMake] using cmake on windows - query on existing targets
Chauhan, Vikas wrote: 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 -GNMake 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\buildcmake -GNMake 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\builddir Volume in drive C has no label. Volume Serial Number is 1099-BF1F Directory of C:\cmaketest\foo\build 15/01/2010 21:19DIR . 15/01/2010 21:19DIR .. 15/01/2010 21:1911,759 CMakeCache.txt 15/01/2010 21:19DIR 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\buildnmake 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. This is normal. There is not target named build. C:\cmaketest\foo\buildnmake 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 Works great. 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. CMAKE_MAKE_PROGRAM:FILEPATH=CMAKE_MAKE_PROGRAM-NOTFOUND 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. -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] using cmake on windows - query on existing targets
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
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 bill.hoff...@kitware.com 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_nmakecmake ../ -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 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 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
Chauhan, Vikas wrote: - --- C:\Work\PCT_LTE\Hercules\CID\MapperGenerator\build_nmakecmake ../ -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 -- 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
Re: [CMake] using cmake on windows - query on existing targets
-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_nmakecmake ../ -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
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_nmakecmake ../ -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 ../ -GNMake Makefiles --trace What is the output? 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? -Bill ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] 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 On Thu, Jan 14, 2010 at 12:23 PM, Chauhan, Vikas vikas.chau...@anritsu.comwrote: -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_nmakecmake ../ -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 ../ -GNMake 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
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? I just tested this on my build box and similar errors that you had about not finding the compiler. Then I ran cmake-gui from the Visual Studio 2008 Command Prompt and all was well. John ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] using cmake on windows - query on existing targets
On Tue, Jan 12, 2010 at 2:04 PM, Bill Hoffman bill.hoff...@kitware.comwrote: 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 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check 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
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
On Mon, Jan 11, 2010 at 3:51 PM, Chauhan, Vikas vikas.chau...@anritsu.com wrote: 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. The options method probably solves this the best. 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 on windows - query on existing targets
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
- Vikas Chauhan vikas.chau...@anritsu.com wrote: -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=940658view=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 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. ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check 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
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
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 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check 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
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/MacroOptionalAddSubdirectory.cmake?revision=940658view=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 ___ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check 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
-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
Re: [CMake] using cmake on windows - query on existing targets
-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=940658view=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
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. With that method there are no hardcoded paths in the batch files. The paths were generated by CMake In my CMakeLists.txt for each project I have configure_file ( ${PROJECT_SOURCE_DIR}/install.bat.in ${PROJECT_BINARY_DIR}/Batch/install.bat ) Either way I would try the other method first.. My method is not crossplatform compatible and also requires more work to setup... 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