LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-30-2016, 01:57 PM   #1
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144

Rep: Reputation: 15
cmake


I HATE cmake. I have never liked it in the 20 odd years I've been mucking about with Linux, and try to avoid it like the plague. I can NEVER make it do anything I want.

Simply, my problem today is how can I make it generate the Makefile again ?

The story so far.

I have downloaded a source from github, but that source assumes my compile is /bin/gcc. So I feed the cmake with a define to give it the proper compiler, and I get output like ...
Code:
-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc
-- Check for working C compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabihf-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++
-- Check for working CXX compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /bin/gcc
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-gcc
CMAKE_CXX_COMPILER= /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-g++

-- The C compiler identification is GNU 4.9.3
-- The CXX compiler identification is GNU 4.9.3
-- Check for working C compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-gcc
-- Check for working C compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-g++
-- Check for working CXX compiler: /home/mike/work/pi/buildroot/output/host/usr/bin/arm-linux-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- The ASM compiler identification is GNU
-- Found assembler: /bin/gcc
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:
You will notice it has picked up my compiler OK instead of /bin/gcc, but then some nonsense somewhere in what I have downloaded from github overwrites that compiler choice with /bin/gcc

So I find this nonsense in a file called CMakeLists.txt and comment it out, removing all references to /bin/gcc.

How then do I generate the Makefile again ??

If I simply say
[mike@ceri motion-mmal-mmal-test]$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mike/work/pi/buildroot/output/build/motion-mmal-mmal-test
[mike@ceri motion-mmal-mmal-test]$

and it has not done anything useful like creating a new Makefile with the proper compiler.

What have I got to do to make cmake generate a Makefile from scratch again. ?
 
Old 09-30-2016, 02:03 PM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
I'm sorry but I'm chuckling.

I've never used cmake, suggest you stop that!

Qt has qmake and that works for when you have a Qt project.

I've always just used make and I create my own Makefiles drawing from my own examples over the years.

Oddly enough, now that I think of it, the two things I've kept over 25-30 years of involvement with Unix/Linux are:
  1. My .emacs file
  2. Scripts and Makefiles that were big deals for me to get done, so I keep them as examples.
 
Old 10-01-2016, 05:49 AM   #3
Mike Davies
Member
 
Registered: Jul 2004
Distribution: Custom Linux, Buildroot, Busybox, Fedora, Raspberry Pi
Posts: 144

Original Poster
Rep: Reputation: 15
Hmmm, well about the only thing I have kept from the "old days" is a password I used to use on a George 4 MOP terminal.

But none of this reminiscing is helping with my problems with cmake.

I'm giving up and will do what I normally do and write my own Makefile
 
  


Reply



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
Slackware-current: /usr/share/cmake and /usr/share/cmake-3.3 directories igor29768 Slackware 1 11-07-2015 12:37 AM
cmake../ ? Mikibelavista Linux - Software 3 08-05-2015 08:39 PM
CMake Strange "Install" behaviour with home-grown software [Linux x86_64, CMake 2.8] ajschaeffer Programming 0 10-24-2011 03:21 AM
How to tell cmake where stuff is ? Mike Davies Linux - Software 3 05-20-2011 08:49 AM
cmake: Using find_package(Boost) when FindBoost.cmake is not in the default location damien_d Programming 3 10-27-2010 03:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:25 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration