forked from ccache/ccache
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Move Windows config and cache to LOCALAPPDATA
Throw a fatal error if a cache is detected in APPDATA. Fix-up default cmake install directories and set system-wide config to C:\ProgramData\ccache\ccache.conf . Update manual. Fix ccache#1023 Fix ccache#946 Signed-off-by: Rafael Kitover <rkitover@gmail.com>
- Loading branch information
Showing
6 changed files
with
117 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
if(WIN32) | ||
set(programfiles "$ENV{ProgramFiles}") | ||
|
||
# For 32 bit builds. | ||
if(CMAKE_C_SIZEOF_DATA_PTR EQUAL 4 AND ENV{ProgramFiles\(x86\)}) | ||
set(programfiles "$ENV{ProgramFiles\(x86\)}") | ||
endif() | ||
|
||
string(REPLACE "\\" "\\\\" programfiles "${programfiles}") | ||
|
||
set(CMAKE_INSTALL_PREFIX "${programfiles}\\\\ccache" CACHE STRING "System-wide installation location" FORCE) | ||
|
||
if(NOT CMAKE_INSTALL_SYSCONFDIR) | ||
string(REPLACE "\\" "\\\\" programdata "$ENV{ALLUSERSPROFILE}") | ||
if(NOT programdata) | ||
set(programdata "C:\\\\ProgramData") | ||
endif() | ||
|
||
set(CMAKE_INSTALL_SYSCONFDIR "${programdata}\\\\ccache" CACHE STRING "Systemwide configuration location" FORCE) | ||
endif() | ||
|
||
set(CMAKE_INSTALL_BINDIR "" CACHE PATH "" FORCE) | ||
set(CMAKE_INSTALL_LIBEXECDIR "" CACHE PATH "" FORCE) | ||
set(CMAKE_INSTALL_SBINDIR "" CACHE PATH "" FORCE) | ||
endif() | ||
|
||
include(GNUInstallDirs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters