summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorJoel Rosdahl <joel@rosdahl.net>2021-01-03 15:43:50 +0100
committerJoel Rosdahl <joel@rosdahl.net>2021-01-03 15:55:08 +0100
commit930e44d9561e76a90ec77ccb84a85985b1c23ef6 (patch)
treee676363ad00815cca704bfc668e5087096140d3d /src/CMakeLists.txt
parentea3216e43342a0577f8d7c29f06576d66b10c249 (diff)
downloadccache-930e44d9561e76a90ec77ccb84a85985b1c23ef6.tar.gz
Configure nonstd::string_view to don’t fall back to std::string_view
This makes the code base use nonstd::string regardless of the C++ target version, which avoids some compatibilty issues. This decision can be revisited in the future when C++17 is the lower bar. Closes #749.
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r--src/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index a88efc98..30a2f92c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -52,6 +52,9 @@ if(WIN32)
endif()
add_library(ccache_lib STATIC ${source_files})
+target_compile_definitions(
+ ccache_lib PUBLIC -Dnssv_CONFIG_SELECT_STRING_VIEW=nssv_STRING_VIEW_NONSTD
+)
if(WIN32)
target_link_libraries(ccache_lib PRIVATE ws2_32 "psapi")