From b530ced61eabef73729caecea1e7021432211148 Mon Sep 17 00:00:00 2001 From: Kunal Tyagi Date: Tue, 8 Oct 2019 10:20:30 +0900 Subject: [PATCH] Removed unneded files, unneeded variable->str and msvc/clcache references --- .ci/azure-pipelines/build-windows.yml | 4 ++-- cmake/Modules/UseCompilerCache.cmake | 9 ++++----- cmake/launch-c.in | 10 ---------- cmake/launch-cxx.in | 10 ---------- cmake/pcl_options.cmake | 2 +- 5 files changed, 7 insertions(+), 28 deletions(-) delete mode 100644 cmake/launch-c.in delete mode 100644 cmake/launch-cxx.in diff --git a/.ci/azure-pipelines/build-windows.yml b/.ci/azure-pipelines/build-windows.yml index c6b256f9b38..c4451ab665c 100644 --- a/.ci/azure-pipelines/build-windows.yml +++ b/.ci/azure-pipelines/build-windows.yml @@ -42,8 +42,8 @@ jobs: - script: clcache -z displayName: 'Zero ccache statistics' - script: | - echo ##vso[task.setvariable variable=CXX]clcache.exe - echo ##vso[task.setvariable variable=C]clcache.exe + setx CXX clcache.exe + setx C clcache.exe displayName: 'Set clcache as the compiler' - script: | rmdir %VCPKG_ROOT%\downloads /S /Q diff --git a/cmake/Modules/UseCompilerCache.cmake b/cmake/Modules/UseCompilerCache.cmake index 7546812adf3..4c2b0743b86 100644 --- a/cmake/Modules/UseCompilerCache.cmake +++ b/cmake/Modules/UseCompilerCache.cmake @@ -57,8 +57,8 @@ function(UseCompilerCache) return() endif() - if(CCACHE_PROGRAM MATCHES "clcache") - message(FATAL_ERROR "clcache can't be configured as a compiler. Please use environment variables CXX and C to set the compiler as clcache.") + if(CMAKE_GENERATOR MATCHES "Visual") + message(FATAL_ERROR "MSVC isn't compatible with current solutions. Please rename compiler cache to cl.exe and prepend its location in env PATH variable") return() endif() @@ -68,7 +68,6 @@ function(UseCompilerCache) foreach(line ${output}) string(TOLOWER ${line} line) string(REGEX REPLACE "^ccache version ([\\.0-9]+)$" "\\1" version "${line}") - #if(version AND NOT "x${line}" STREQUAL "x${version}") if(version) set(COMPILER_CACHE_VERSION ${version} PARENT_SCOPE) break() @@ -80,11 +79,11 @@ function(UseCompilerCache) endif() set(xcode_compat FALSE) - if(${CMAKE_GENERATOR} STREQUAL Xcode) + if(CMAKE_GENERATOR STREQUAL Xcode) set(xcode_compat TRUE) endif() set(ccache_compat FALSE) - if((${ARGS_CCACHE} STREQUAL ccache) AND (${version} VERSION_LESS 3.3.0)) + if((ARGS_CCACHE STREQUAL ccache) AND (version VERSION_LESS 3.3.0)) set(ccache_compat TRUE) endif() diff --git a/cmake/launch-c.in b/cmake/launch-c.in deleted file mode 100644 index 72978341f17..00000000000 --- a/cmake/launch-c.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Xcode generator doesn't include the compiler as the -# first argument, Ninja and Makefiles do. Handle both cases. -if [ "$1" = "${CMAKE_C_COMPILER}" ] ; then - shift -fi - -export CCACHE_CPP2=true -exec "${C_LAUNCHER}" "${CMAKE_C_COMPILER}" "$@" diff --git a/cmake/launch-cxx.in b/cmake/launch-cxx.in deleted file mode 100644 index 42821681095..00000000000 --- a/cmake/launch-cxx.in +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -# Xcode generator doesn't include the compiler as the -# first argument, Ninja and Makefiles do. Handle both cases. -if [ "$1" = "${CMAKE_CXX_COMPILER}" ] ; then - shift -fi - -export CCACHE_CPP2=true -exec "${CXX_LAUNCHER}" "${CMAKE_CXX_COMPILER}" "$@" diff --git a/cmake/pcl_options.cmake b/cmake/pcl_options.cmake index 736dc6bbb46..2ed09435670 100644 --- a/cmake/pcl_options.cmake +++ b/cmake/pcl_options.cmake @@ -43,7 +43,7 @@ option(PCL_ENABLE_SSE "Enable or Disable SSE optimizations." ON) mark_as_advanced(PCL_ENABLE_SSE) # Allow the user to disable ccache if ccache is available -option(PCL_ENABLE_CCACHE "Enable using ccache (or clcache for MSVC) for compilation" OFF) +option(PCL_ENABLE_CCACHE "Enable using compiler cache for compilation" OFF) mark_as_advanced(PCL_ENABLE_CCACHE) # Display timing information for each compiler instance on screen