mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 07:41:36 +08:00
cmake optionally find and use ccache
This commit is contained in:
committed by
Lorenz Meier
parent
dcddcdd28e
commit
899e406005
+11
-1
@@ -1,6 +1,6 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 PX4 Development Team. All rights reserved.
|
# Copyright (c) 2017 PX4 Development Team. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions
|
# modification, are permitted provided that the following conditions
|
||||||
@@ -240,6 +240,16 @@ endif()
|
|||||||
# force static lib build
|
# force static lib build
|
||||||
set(BUILD_SHARED_LIBS OFF)
|
set(BUILD_SHARED_LIBS OFF)
|
||||||
|
|
||||||
|
#=============================================================================
|
||||||
|
# ccache
|
||||||
|
#
|
||||||
|
option(CCACHE "Use ccache if available" OFF)
|
||||||
|
find_program(CCACHE_PROGRAM ccache)
|
||||||
|
if(CCACHE AND CCACHE_PROGRAM)
|
||||||
|
message(STATUS "Enabled ccache: ${CCACHE_PROGRAM}")
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||||
|
endif()
|
||||||
|
|
||||||
#=============================================================================
|
#=============================================================================
|
||||||
# project definition
|
# project definition
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user