ccache support

This commit is contained in:
2020-06-03 19:35:56 +02:00
parent abc5c4209d
commit 528d0dd06f
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,10 @@
project(advanced_C_standard_library)
cmake_minimum_required(VERSION 3.0)
project(advanced_C_standard_library C)
set_property(GLOBAL PROPERTY C_STANDARD 99)
cmake_minimum_required(VERSION 3.9)
include_directories(src)
file(GLOB SOURCES "src/*.c")
add_executable(test.out ${SOURCES})
install(TARGETS DESTINATION ${CMAKE_SOURCE_DIR})
find_program(CCACHE_PROGRAM ccache)
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()

View File

@ -1,4 +1,4 @@
#include <stdio.h>
int main() {
printf("%s", "baum\n");
printf("baum\n");
}