The following issue has been SUBMITTED. ====================================================================== http://public.kitware.com/Bug/view.php?id=12410 ====================================================================== Reported By: Roland Assigned To: ====================================================================== Project: CMake Issue ID: 12410 Category: CMake Reproducibility: random Severity: major Priority: normal Status: new ====================================================================== Date Submitted: 2011-08-18 04:27 EDT Last Modified: 2011-08-18 04:27 EDT ====================================================================== Summary: CMake randomly fails to detect Visual Studio 2010 C/CXX compiler since CMake 2.8.5. rc3 Description: When building a tutorial C++ example (attached) on my computer using CMake 2.8.5 and Visual Studio 2010 Express Edition, I experience one of the following behaviours:
1. Everything works as expected, i.e. CMake's output is D:\temp\CMakeTutorial\build-win32-vc10>cmake -G "Visual Studio 10" .. -- Check for working C compiler using: Visual Studio 10 -- Check for working C compiler using: Visual Studio 10 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 10 -- Check for working CXX compiler using: Visual Studio 10 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Configuring done -- Generating done -- Build files have been written to: D:/temp/CMakeTutorial/build-win32-vc10 2. CMake fails to detect the C compiler, i.e. its output is D:\temp\CMakeTutorial\build-win32-vc10>cmake -G "Visual Studio 10" .. -- Check for working C compiler using: Visual Studio 10 -- Check for working C compiler using: Visual Studio 10 -- broken -- Configuring incomplete, errors occurred! 3. CMake detects the C compiler, but fails to detect the CXX compiler, i.e. D:\temp\CMakeTutorial\build-win32-vc10>cmake -G "Visual Studio 10" .. -- Check for working C compiler using: Visual Studio 10 -- Check for working C compiler using: Visual Studio 10 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler using: Visual Studio 10 -- Check for working CXX compiler using: Visual Studio 10 -- broken -- Configuring incomplete, errors occurred! 4. CMake both detects the C and CXX compiler, but fails to detect ABI infos: D:\temp\CMakeTutorial\build-win32-vc10>cmake -G "Visual Studio 10" .. -- Check for working C compiler using: Visual Studio 10 -- Check for working C compiler using: Visual Studio 10 -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - failed -- Check for working CXX compiler using: Visual Studio 10 -- Check for working CXX compiler using: Visual Studio 10 -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Configuring done -- Generating done -- Build files have been written to: D:/temp/CMakeTutorial/build-win32-vc10 In cases 2 and 3 (i.e. if either C or CXX compiler was not detected), a plethora of of Visual Studio 2010 output is dumped to stderr, starting with -- Check for working CXX compiler using: Visual Studio 10 -- broken CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCXXCompiler.cmake:45 (MESSAGE): The C++ compiler "cl" is not able to compile a simple test program. It fails with the following output: Change Dir: D:/temp/CMakeTutorial/build-win32-vc10/CMakeFiles/CMakeTmp Run Build Command:C:\PROGRA~2\MICROS~1.0\Common7\IDE\VCExpress.exe CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec Microsoft (R) Visual C++ 2010 Express Version 10.0.30319.1. Copyright (C) Microsoft Corp. All rights reserved. 1>------ Build started: Project: cmTryCompileExec, Configuration: Debug Win32 ------ 1>Build started Do 18.Aug.11 09:18:28. Additional Information: Using the attached script, I tested this behaviour both with CMake 2.8.5 rc2 and rc3. Whereas rc2 always works as expected, rc3 shows one of the aforementioned behaviours in a random pattern. So, obviously, this behaviour was introduced between CMake 2.8.5 rc2 and rc3; perhaps, due to the modifications mentioned in http://thread.gmane.org/gmane.comp.programming.tools.cmake.user/37124/focus=37138 ====================================================================== Issue History Date Modified Username Field Change ====================================================================== 2011-07-29 15:01 Utkarsh AyachitChangeset attached => VTK master 0e19dd3d 2011-07-29 15:01 Utkarsh AyachitChangeset attached => VTK master bb9fd605 2011-07-29 15:01 Utkarsh AyachitChangeset attached => VTK master 8ebe8f0c 2011-08-18 04:27 Roland New Issue 2011-08-18 04:27 Roland File Added: CMakeTutorial.zip ====================================================================== _______________________________________________ cmake-developers mailing list [email protected] http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
