ccache support
This commit is contained in:
@ -1,6 +1,10 @@
|
|||||||
project(advanced_C_standard_library)
|
project(advanced_C_standard_library C)
|
||||||
cmake_minimum_required(VERSION 3.0)
|
set_property(GLOBAL PROPERTY C_STANDARD 99)
|
||||||
|
cmake_minimum_required(VERSION 3.9)
|
||||||
include_directories(src)
|
include_directories(src)
|
||||||
file(GLOB SOURCES "src/*.c")
|
file(GLOB SOURCES "src/*.c")
|
||||||
add_executable(test.out ${SOURCES})
|
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()
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
int main() {
|
int main() {
|
||||||
printf("%s", "baum\n");
|
printf("baum\n");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user