diff options
author | Joel Rosdahl <joel@rosdahl.net> | 2021-01-03 15:43:50 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2021-01-03 15:55:08 +0100 |
commit | 930e44d9561e76a90ec77ccb84a85985b1c23ef6 (patch) | |
tree | e676363ad00815cca704bfc668e5087096140d3d /src/CMakeLists.txt | |
parent | ea3216e43342a0577f8d7c29f06576d66b10c249 (diff) | |
download | ccache-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.txt | 3 |
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") |