Thanks for your help, Bill. It's working now.
A previous version of Visual Studio did exist in the PATH (2005). I removed this, but this change alone did not make a difference. Even with the PATH change, the C compiler was getting picked up from the VS 2005 directory. The good news was the C++ compiler was getting picked up from the right location: the VS 2008 directory. What did work was invoking cmake at the command-line, while specifying the generator: "Visual Studio 9 2008". cmake -G "Visual Studio 9 2008" source-dir Best Regards, Joe -----Original Message----- From: Bill Hoffman [mailto:bill.hoff...@kitware.com] Sent: 2009, October, 30 2:15 PM To: Sarbak, Joseph Cc: cmake@cmake.org Subject: Re: [CMake] Does CMake 2.6-patch 4 support MS Visual Studio 2008? Sarbak, Joseph wrote: > Hello Bill and Shane, > > Thanks for offering your help. Below is a listing of my directory > where I have the compilers installed, my PATH=, and also two of the > cached variables Bill asked about. I don't know how to get two > (MAKECOMMAND, and CMAKE_BUILD_TOOL) of those variables. > > I appreciate your help. > > Joe > > > CMAKE_MAKE_PROGRAM=C:/PROGRA~1/MICROS~1.0/Common7/IDE/devenv.com > CMAKE_BUILD_TOOL=C:/PROGRA~1/MICROS~1.0/Common7/IDE/devenv.com > > MAKECOMMAND:STRING=? > CMAKE_BUILD_TOOL:INTERNAL=? > > Here are the first elements in my PATH=. Notice VisStudio 2008 is > listed prior to any other compiler. > > H:\dev\esp\trunk\main\models\build\..\..\..\..\third-party\cmake\cmake > -2 .6.4-win32-x86\bin;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\T > ools;c:\WINNT\Microsoft.NET\Framework\v3.5;c:\WINNT\Microsoft.NET\Fram > ew ork\v2.0.50727;c:\Program Files\Microsoft V isual Studio > 9.0\VC\VCPackages;C:\Program Files\Microsoft > SDKs\Windows\v6.0A\bin;H:\dev\esp\third-party\python\win_ > ... Looks like it is picking up the VS 8 instead of 9 for some reason... Do you have 8 in your PATH? The find does this: Modules/CMakeVS9FindMake.cmake: FIND_PROGRAM(CMAKE_MAKE_PROGRAM NAMES ${_CMAKE_MAKE_PROGRAM_NAMES} HINTS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup\\VS;E nvironmentDirectory] [HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\9.0\\Setup;Dbghe lp_path] "$ENV{ProgramFiles}/Microsoft Visual Studio 9.0/Common7/IDE" "$ENV{ProgramFiles}/Microsoft Visual Studio9.0/Common7/IDE" "$ENV{ProgramFiles}/Microsoft Visual Studio 9/Common7/IDE" "$ENV{ProgramFiles}/Microsoft Visual Studio9/Common7/IDE" "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9.0/Common7/IDE" "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9.0/Common7/IDE" "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio 9/Common7/IDE" "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio9/Common7/IDE" "/Program Files/Microsoft Visual Studio 9.0/Common7/IDE/" "/Program Files/Microsoft Visual Studio 9/Common7/IDE/" PATHS "$ENV{ProgramFiles} (x86)/Microsoft Visual Studio .NET/Common7/IDE" "$ENV{ProgramFiles}/Microsoft Visual Studio .NET/Common7/IDE" ) Do you have different registry entries? If you hack the above file in your CMake to point directly at the right dir for your install does it work? Note, you will have to start with a new build directory to test changes with this file. -Bill ________________________________________ This E-Mail (including any attachments) may contain privileged or confidential information. It is intended only for the addressee(s) indicated above. The sender does not waive any of its rights, privileges or other protections respecting this information. Any distribution, copying or other use of this E-Mail or the information it contains, by other than an intended recipient, is not sanctioned and is prohibited. If you received this E-Mail in error, please delete it and advise the sender (by return E-Mail or otherwise) immediately. This E-Mail (including any attachments) has been scanned for viruses. It is believed to be free of any virus or other defect that might affect any computer system into which it is received and opened. However, it is the responsibility of the recipient to ensure that it is virus free. The sender accepts no responsibility for any loss or damage arising in any way from its use. E-Mail received by or sent from RBC Capital Markets is subject to review by Supervisory personnel. Such communications are retained and may be produced to regulatory authorities or others with legal rights to the information. IRS CIRCULAR 230 NOTICE: TO COMPLY WITH U.S. TREASURY REGULATIONS, WE ADVISE YOU THAT ANY U.S. FEDERAL TAX ADVISE INCLUDED IN THIS COMMUNICATION IS NOT INTENDED OR WRITTEN TO BE USED, AND CANNOT BE USED, TO AVOID ANY U.S. FEDERAL TAX PENALTIES OR TO PROMOTE, MARKET, OR RECOMMEND TO ANOTHER PARTY ANY TRANSACTION OR MATTER. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake