mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-28 07:47:03 -05:00
build: Allow ccache to properly cache msvc builds
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
|
||||
# Options
|
||||
option(IMHEX_PLUGINS_IN_SHARE "Put the plugins in share/imhex/plugins instead of lib[..]/imhex/plugins (Linux only)" OFF)
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
|
||||
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0063 NEW)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0141 NEW)
|
||||
|
||||
if (POLICY CMP0177)
|
||||
set(CMAKE_POLICY_DEFAULT_CMP0177 OLD)
|
||||
@@ -429,6 +430,10 @@ macro(configureCMake)
|
||||
|
||||
set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "Enable position independent code for all targets" FORCE)
|
||||
|
||||
if (MSVC)
|
||||
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
|
||||
endif()
|
||||
|
||||
# Configure use of recommended build tools
|
||||
if (IMHEX_USE_DEFAULT_BUILD_SETTINGS)
|
||||
message(STATUS "Configuring CMake to use recommended build tools...")
|
||||
|
||||
@@ -2737,11 +2737,11 @@ namespace hex::plugin::builtin {
|
||||
if (!std::filesystem::exists(fileInfo.path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return std::filesystem::last_write_time(fileInfo.path) != fileInfo.lastModified;
|
||||
} catch (const std::filesystem::filesystem_error &) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t ViewPatternEditor::calculateContentHash(const std::string &content) const {
|
||||
|
||||
Reference in New Issue
Block a user