moh_hassan

Cmake test case

Dec 6th, 2016
117
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //tutorial.cpp
  2. // A simple program that computes the square root of a number
  3. #include <stdio.h>
  4. #include <stdlib.h>
  5. #include <math.h>
  6. int main (int argc, char *argv[])
  7. {
  8.   if (argc < 2)
  9.     {
  10.     fprintf(stdout,"Usage: %s number\n",argv[0]);
  11.     return 1;
  12.     }
  13.   double inputValue = atof(argv[1]);
  14.   double outputValue = sqrt(inputValue);
  15.   fprintf(stdout,"The square root of %g is %g\n",
  16.           inputValue, outputValue);
  17.   return 0;
  18. }
  19.  
  20. ------------------------------------------------------
  21. #CMakeLists.txt
  22. cmake_minimum_required (VERSION 2.6)
  23. project (Tutorial)
  24. add_executable(Tutorial tutorial.cpp)
  25.  
  26. ------------------------------
  27. Environment:
  28. Windows 7 64 bit
  29. Windows SDK 7 is installed
  30. N.B.: No visual studio 2010 is installed
  31.  
  32. Commad line:
  33. Run the following command from the shortcut "Windows SDK 7.1 Command Prompt"
  34.  
  35. cmake -G "Visual Studio 10 Win64" .
  36. ------------------------------------------------------------------------------------
  37. result when using cmake version: cmake-3.7.1-win64-x64  , FAIL
  38.  
  39. -- The C compiler identification is unknown
  40. -- The CXX compiler identification is unknown
  41. CMake Error at CMakeLists.txt:2 (project):
  42.   No CMAKE_C_COMPILER could be found.
  43.  
  44.  
  45.  
  46. CMake Error at CMakeLists.txt:2 (project):
  47.   No CMAKE_CXX_COMPILER could be found.
  48.  
  49.  
  50.  
  51. -- Configuring incomplete, errors occurred!
  52. See also "C:/tutor/lab1/CMakeFiles/CMakeOutput.log".
  53. See also "C:/tutor/lab1/CMakeFiles/CMakeError.log".
  54.  
  55. ----------------------------------
  56. result when using cmake: cmake-3.6.3-win64-x64  , SUCESS
  57.  
  58. -- The C compiler identification is MSVC 16.0.30319.1
  59. -- The CXX compiler identification is MSVC 16.0.30319.1
  60. -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
  61. -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe -- works
  62. -- Detecting C compiler ABI info
  63. -- Detecting C compiler ABI info - done
  64. -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe
  65. -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/cl.exe -- works
  66. -- Detecting CXX compiler ABI info
  67. -- Detecting CXX compiler ABI info - done
  68. -- Detecting CXX compile features
  69. -- Detecting CXX compile features - done
  70. -- Configuring done
  71. -- Generating done
  72. -- Build files have been written to: C:/tutor/lab1
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×