sudo apt-get install ccmake
sudo apt-get install cmake
sudo apt-get install cmake-gui
Example: Log captured while cross compiling OpenCV for ARM
fsl-community-bsp/adasYocto/tmp/sysroots/x86_64-linux/usr/bin/cortexa9hf-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
-march=armv7-a -mthumb-interwork
-mfloat-abi=hard
-mfpu=neon
-mtune=cortex-a9
-I/home/ivizon/Yocto/freescale/fsl-community-bsp/adasYocto/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/opencv/2.4.6+gitAUTOINC+c5afaa4e8d-r0/git/include
--sysroot=/home/ivizon/Yocto/freescale/fsl-community-bsp/adasYocto/tmp/sysroots/imx6qsabreauto
-O2
-pipe
-g
-feliminate-unused-debug-types
-fpermissive
-fvisibility
-inlines-hidden
-fpermissive
-fsigned-char
-W
-Wall
-Werror=return-type
-Werror=address
-Werror=sequence-point
-Wformat
-Werror=format-security
-Wmissing-declarations
-Wundef
-Winit-self
-Wpointer-arith
-Wshadow
-Wsign-promo
-Wno-narrowing
-Wno-delete-non-virtual-dtor
-fdiagnostics-show-option
-Wno-long-long
-pthread
-fomit-frame
-pointer
-ffunction-sections
-O2
-pipe
-g
-feliminate-unused-debug-types
-O2
-pipe
-g
-feliminate-unused-debug-types
-fpermissive
-fvisibility-inlines-hidden
-DNDEBUG -DNDEBUG
-isystem /home/ivizon/Yocto/freescale/fsl-community-bsp/adasYocto/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/opencv/2.4.6+gitAUTOINC+c5afaa4e8d-r0/build-arm
CFLAGS and CXXFLAGS are environment variables that are used to tell the GNU Compiler Collection, GCC , what kinds of switches to use when compiling source code. CFLAGS are for code written in C, while CXXFLAGS are for code written in C++.
They can be used to decrease the amount of debug messages for a program, increase error warning levels, and, of course, to optimize the code produced.
CFLAGS and CXXFLAGS are environment variables that are used to tell the GNU Compiler Collection, GCC , what kinds of switches to use when compiling source code. CFLAGS are for code written in C, while CXXFLAGS are for code written in C++.
They can be used to decrease the amount of debug messages for a program, increase error warning levels, and, of course, to optimize the code produced.
For which architecture the binary needs to be compiled.
-O1 performs only optimisations that don't effect the compile time much.
-O2 performs optimisations without trading space for speed
-O3 performs maximal speed optimisation
-Os tries to make the executable as small as possible
A common flag is -pipe . This flag actually has no effect on the generated code, but it makes the compilation process faster. It tells the compiler to use pipes instead of temporary files during the different stages of compilation, which uses more memory. On systems with low memory, GCC might get killed. In that case, do not use this flag.