https://cmake.org/Wiki/CMake_Useful_Variables http://www.vtk.org/Wiki/CMake_Cross_Compiling#Setting_up_the_system_and_toolchain
set(CMAKE_VERBOSE_MAKEFILE ON)
make VERBOSE=1
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON $path_to_project_source
Use 2 space indentation
message(STATUS "This is a very long message spanning on several lines ")
cmake_minimum_required(VERSION 2.8) file(GLOB helloworld_SRC "*.h" "*.cpp" ) add_executable(helloworld ${helloworld_SRC})
Check:
set (CMAKE_EXE_LINKER_FLAGS "-Wl,--unresolved-symbols=ignore-in-object-files")
mkdir Debug cd Debug cmake -DCMAKE_BUILD_TYPE=Debug .. make
mkdir Release cd Release cmake -DCMAKE_BUILD_TYPE=Release .. make
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
add_executable(ws2812 ${COMMON_SOURCES} ${TARGET_SOURCES}) target_link_libraries(ws2812 rpi_ws281x) set(RPI_WS281X_SOURCES mailbox.c ws2811.c pwm.c dma.c rpihw.c ) add_library(rpi_ws281x STATIC ${RPI_WS281X_SOURCES})