LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-29-2008, 01:30 PM   #1
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Rep: Reputation: 49
cmake or make: debug output, show command


I am using cmake to build my project and it seems it breaks when linking. Everything seems fine in the CMakeLists.txt so I was wondering if there is any way I can see the exact command that is issued when trying to link.

I looked at running "cmake --debug-output" and then "make -d" but although it showed me tons of information there was nothing about the actual command.

The result I would like to see is what you usually see when running make:
"g++ ..."

But how? cmake makes that information disappear. :(
 
Old 02-29-2008, 03:57 PM   #2
ta0kira
Senior Member
 
Registered: Sep 2004
Distribution: FreeBSD 9.1, Kubuntu 12.10
Posts: 3,078

Rep: Reputation: Disabled
Did you write the file yourself? Can you find the lines in the makefile with g++ and add the -v option? That will break down even the individual g++ calls into C++ compilation, C compilation, assembler, and linking commands.
ta0kira
 
Old 02-29-2008, 05:04 PM   #3
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by ta0kira View Post
Did you write the file yourself? Can you find the lines in the makefile with g++ and add the -v option? That will break down even the individual g++ calls into C++ compilation, C compilation, assembler, and linking commands.
ta0kira
I went through the Makefiles (there are a lot when using cmake :D) and finally found the problem. :)

Although it would've been easier if I could've seen the g++ command that Makefile was running. :P
 
Old 02-29-2008, 05:30 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by Ephracis View Post
Although it would've been easier if I could've seen the g++ command that Makefile was running. :P
You can if you pass the VERBOSE environment variable (or Makefile variable, it makes no difference) to make running a cmake Makefile. E.g.,
Code:
$ cmake .
$ make VERBOSE=1
Or
Code:
$ cmake .
$ VERBOSE=1 make
 
Old 03-01-2008, 03:28 AM   #5
Ephracis
Senior Member
 
Registered: Sep 2004
Location: Sweden
Distribution: Ubuntu, Debian
Posts: 1,109

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by osor View Post
You can if you pass the VERBOSE environment variable (or Makefile variable, it makes no difference) to make running a cmake Makefile. E.g.,
Code:
$ cmake .
$ make VERBOSE=1
Or
Code:
$ cmake .
$ VERBOSE=1 make
Cool, thanks!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I page the output of the show tech command on my cisco 2950? abefroman Linux - Networking 1 12-17-2007 06:59 PM
ISO C++ make errors and CMake generated Makefile xpromisex Programming 2 04-15-2007 06:48 PM
about `make` and debug source code naihe2010 Programming 9 12-13-2005 05:03 AM
wpasupplicant + prism54 - can anyone debug this output? 66gdub Linux - Wireless Networking 1 11-30-2005 12:08 PM
Whats the output given by make -p command? cranium2004 Programming 2 03-11-2005 06:11 AM


All times are GMT -5. The time now is 05:04 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration