summaryrefslogtreecommitdiff
path: root/support/misc
diff options
context:
space:
mode:
authorArnout Vandecappelle <arnout@mind.be>2015-10-04 13:28:53 +0100
committerPeter Korsgaard <peter@korsgaard.com>2015-10-04 18:22:20 +0200
commite31ad0e809ca2cc75d16ac8f6c4ae3c850e828a6 (patch)
treeb09f42e5b292ad1dc423d39aee7cdf17df65ac81 /support/misc
parent4b5714f7ac86750857baa30f14e52a728f40d5f2 (diff)
package-cmake: remove now-redundant target ccache support
All the complexity with the different ways that CMAKE_C_COMPILER and CMAKE_C_COMPILER_ARG1 can be set are no longer needed, it's all handled by the toolchain wrapper now. Note that it is still necessary to handle this for the host build. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Reviewed-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/toolchainfile.cmake.in32
1 files changed, 2 insertions, 30 deletions
diff --git a/support/misc/toolchainfile.cmake.in b/support/misc/toolchainfile.cmake.in
index cd412542e..5cf381e96 100644
--- a/support/misc/toolchainfile.cmake.in
+++ b/support/misc/toolchainfile.cmake.in
@@ -27,33 +27,5 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(ENV{PKG_CONFIG_SYSROOT_DIR} "${RELOCATED_HOST_DIR}/@@STAGING_SUBDIR@@")
# This toolchain file can be used both inside and outside Buildroot.
-# * When used inside Buildroot, ccache support is explicitly driven using the
-# USE_CCACHE variable.
-# * When used outside Buildroot (i.e. when USE_CCACHE is not defined), ccache
-# support is automatically enabled if the ccache program is available.
-if(DEFINED USE_CCACHE)
- if(USE_CCACHE)
- set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache")
- set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/usr/bin/ccache")
- set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
- else()
- set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
- endif()
-else()
- find_program(CCACHE ccache HINTS "${RELOCATED_HOST_DIR}/usr/bin")
- if(CCACHE)
- set(CMAKE_ASM_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_C_COMPILER "${CCACHE}")
- set(CMAKE_CXX_COMPILER "${CCACHE}")
- set(CMAKE_C_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_CXX_COMPILER_ARG1 "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
- message(STATUS "ccache program has been found and will be used for the build.")
- message(STATUS " To disable ccache, add -DUSE_CCACHE=OFF on the cmake command line.")
- else()
- set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC_NOCCACHE@@")
- set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX_NOCCACHE@@")
- endif()
-endif()
+set(CMAKE_C_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CC@@")
+set(CMAKE_CXX_COMPILER "${RELOCATED_HOST_DIR}/@@TARGET_CXX@@")