diff --git a/CMakeLists.txt b/CMakeLists.txt index c94d2ca4..da167854 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,9 +8,6 @@ set(CMAKE_WARN_UNUSED_CLI YES) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED true) -if(MSVC) - add_compile_options(/permissive- /Zc:__cplusplus) -endif() set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_INCLUDES 0) set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_LIBRARIES 0) set(CMAKE_CUDA_USE_RESPONSE_FILE_FOR_OBJECTS 0) diff --git a/examples/server/CMakeLists.txt b/examples/server/CMakeLists.txt index 7497f011..28b78aec 100644 --- a/examples/server/CMakeLists.txt +++ b/examples/server/CMakeLists.txt @@ -96,11 +96,5 @@ endif() if (WIN32) TARGET_LINK_LIBRARIES(${TARGET} PRIVATE ws2_32) endif() -if(MSVC) - set_target_properties(${TARGET} PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED ON -) -endif() target_compile_features(${TARGET} PRIVATE cxx_std_17) diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 54719061..48e7f92e 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -47,6 +47,7 @@ struct DatabaseHandle { #endif using json = nlohmann::ordered_json; +namespace fs = std::filesystem; bool server_verbose = false; bool server_log_json = true; @@ -1310,7 +1311,6 @@ int main(int argc, char ** argv) { const auto list_saved_prompts = [&ctx_server, ¶ms](const httplib::Request& req, httplib::Response& res) { json response = json::array(); - namespace fs = std::filesystem; try { for (const auto& entry : fs::directory_iterator(params.slot_save_path)) { diff --git a/ggml/src/CMakeLists.txt b/ggml/src/CMakeLists.txt index c00c2f23..06119455 100644 --- a/ggml/src/CMakeLists.txt +++ b/ggml/src/CMakeLists.txt @@ -1540,6 +1540,12 @@ target_compile_definitions(ggml PRIVATE $<$:NDEBUG>) target_include_directories(ggml PUBLIC ../include) target_include_directories(ggml PRIVATE . ${GGML_EXTRA_INCLUDES}) target_link_directories(ggml PRIVATE ${GGML_EXTRA_LIBDIRS}) +if(MSVC) + set_target_properties(ggml PROPERTIES + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON +) +endif() target_compile_features (ggml PRIVATE c_std_11) # don't bump target_link_libraries(ggml PRIVATE Threads::Threads ${GGML_EXTRA_LIBS}) diff --git a/src/llama.cpp b/src/llama.cpp index 6faad496..449d41a7 100644 --- a/src/llama.cpp +++ b/src/llama.cpp @@ -78,12 +78,12 @@ #include #endif -#if __cplusplus >= 202000L - #define LU8(x) (const char*)(u8##x) -#else - #define LU8(x) u8##x -#endif - +//#if __cplusplus >= 202000L +// #define LU8(x) (const char*)(u8##x) +//#else +// #define LU8(x) u8##x +//#endif +#define LU8(x) (const char*)(u8##x) #include #include #include