From 1f4c8acc5175af3ef7a348547ffdb18e334ce515 Mon Sep 17 00:00:00 2001 From: Johannes Löthberg Date: Wed, 5 Nov 2014 07:47:25 +0100 Subject: CMakeLists.txt: Use clang, -Weverything and c11 The ADD_DEFINITIONS part should be dropped whene cmake 3.1 is released since it will have support for CMAKE_C_STANDARD --- CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ee94531..55620e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,13 @@ configure_file( ${CMAKE_SOURCE_DIR}/src/config.h ) +set(CMAKE_C_COMPILER "/usr/bin/clang") +set(CMAKE_C_FLAGS "-Weverything") +set(CMAKE_C_STANDARD 11) +add_definitions( + -std=c11 +) + set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) add_subdirectory("src") -- cgit v1.2.3-70-g09d2