Talk:CMake FAQ

From KitwarePublic
Jump to: navigation, search

Hello cmake users.

I choose cmake to build a big project. This project contains Fortran 77 (the most numerous), C, and C++ source files, and only one executable built from all source files.

It works well with gnu g77 compiler. But with Absoft compiler, the option -fPIC is used at linking without i ask it. So I get an error : ERROR: Unrecognized arguments: -fPIC I do not find this option in Absoft compiler documentation. I would like to remove -fPIC in linking option but i do not know how.

Any idea ? Thanks in advance for any answer.

best regards Christophe

How can I install VTK using CMake, Microsoft Visual C++ 2008 in Windows XP

I am new in VTK and CMake. Ihave already install Microsoft Visual C++ 2008 and CMake 2.8 and I have VTK 5.6.1.

Now when I want to install VTK, I run CMake and give the source and build location and specify MS visual studio 9.0 and click configure buton. Then I saw the following error message:

Kaspersky Anti-virus show the following message:

C:\...\CMAKE 2.8\BIN\CMAKE-GUI.EXE (PID:1776); Behavior similar to PDM.RootShell.Allowed.


Then CMake gave the following error:


Check for working C compiler using: Visual Studio 9 2008 Check for working C compiler using: Visual Studio 9 2008 -- broken CMake Error at C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):

 The C compiler "cl" is not able to compile a simple test program.
 It fails with the following output:
  Change Dir: C:/VTK/Binary/CMakeFiles/CMakeTmp


 Run Build Command:C:\PROGRA~1\MICROS~1.0\Common7\IDE\VCExpress.exe
 CMAKE_TRY_COMPILE.sln /build Debug /project cmTryCompileExec


 Microsoft (R) Visual C++ Express Edition Version 9.0.30729.1.
 Copyright (C) Microsoft Corp 2007.  All rights reserved.
 1>------ Build started: Project: cmTryCompileExec, Configuration: Debug
 Win32 ------
 1>Compiling...
 1>Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for
 80x86
 1>Copyright (C) Microsoft Corporation.  All rights reserved.
 1>cl /Od /D "WIN32" /D "_WINDOWS" /D "_DEBUG" /D "CMAKE_INTDIR=\"Debug\""
 /D "_MBCS" /FD /RTC1 /MDd /Fo"cmTryCompileExec.dir\Debug\\"
 /Fd"C:\VTK\Binary\CMakeFiles\CMakeTmp\Debug/cmTryCompileExec.pdb" /W3 /c
 /Zi /TC /Zm1000
 1> .\testCCompiler.c
 1>testCCompiler.c
 1>Compiling manifest to resources...
 1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
 1>Copyright (C) Microsoft Corporation.  All rights reserved.
 1>Linking...
 1>Embedding manifest...
 1>Project : error PRJ0003 : Error spawning 'cmd.exe'.
 1>Build log was saved at
 "file://c:\VTK\Binary\CMakeFiles\CMakeTmp\cmTryCompileExec.dir\Debug\BuildLog.htm"


 1>cmTryCompileExec - 1 error(s), 0 warning(s)
 ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped
 ==========



 CMake will not be able to correctly generate this project.

Call Stack (most recent call first):

 CMakeLists.txt:9 (PROJECT)


Configuring incomplete, errors occurred!


Please help me.

Salena

new user

I am intended to be CMake use but I can't make even "Hello World" program with my bcc32 and gcc compilers under Windows XP. That's the message I getting from CMake:

The C compiler identification is Borland The CXX compiler identification is Borland Check for working C compiler: C:/Borland/BCC55/Bin/bcc32.exe Check for working C compiler: C:/Borland/BCC55/Bin/bcc32.exe -- broken CMake Error at C:/CMake2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):

 The C compiler "C:/Borland/BCC55/Bin/bcc32.exe" is not able to compile a
 simple test program.
 It fails with the following output:
  Change Dir: C:/X/CMakeFiles/CMakeTmp

Pleace help me before I loose my nerves :) ():)

please reorg the FAQ

It should be in two sections.

  1. Questions relevant to the current version (3.1)
  2. Questions relevant only to older versions.

This will save users from unneeded complexity and from wasted time.
Daveyost (talk) 18:25, 17 January 2015 (EST)