Skip to content

Instantly share code, notes, and snippets.

@pokusew
Created October 3, 2019 20:57
Show Gist options
  • Save pokusew/f2fcf0c3a53aa367838d4350fc014705 to your computer and use it in GitHub Desktop.
Save pokusew/f2fcf0c3a53aa367838d4350fc014705 to your computer and use it in GitHub Desktop.
simple CMake config to make CLion usable (advanced syntax highlighting and code analysis) with Makefile based projects
cmake_minimum_required(VERSION 3.12)
project(fel_prp C)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -std=c99 -O3")
# no need to uncomment unless you need libs from that directory
# include_directories(/usr/local/include)
# build executable for hw01
add_executable(hw01
src/hw01/main.c
src/hw02/utils.h src/hw01/utils.c)
# CMake is proweful tool and its config its much more readable and maintainable than Makefile(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment