Mike Davies |
09-30-2016 01:57 PM |
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. ?
|