Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
baijumeswani committed May 3, 2024
1 parent ba3054d commit 9271751
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ message("Building onnxruntime-genai for version ${VERSION_INFO}")
# Checking if CUDA is supported
include(CheckLanguage)
add_compile_definitions(BUILDING_ORT_GENAI_C)
# TODO(baijumeswani): Move to std::filesystem and remove this add_compile_definitions
add_compile_definitions(_SILENCE_EXPERIMENTAL_FILESYSTEM_DEPRECATION_WARNING)

if(USE_CUDA)
check_language(CUDA)
if(CMAKE_CUDA_COMPILER)
Expand Down
2 changes: 2 additions & 0 deletions src/generators.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
#include <assert.h>
#include <cmath>
#include <cstring>
// TODO(baijumeswani): Remove experimental when packaging pipeline can use GCC > 8
#include <experimental/filesystem>
#include <functional>
#include <iostream>
#include "span.h"
#include <memory>
#include <numeric>
Expand Down
2 changes: 1 addition & 1 deletion src/logging.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ void SetLogString(std::string_view name, std::string_view value) {
if (value.empty())
gp_logfile.reset();
else {
std::experimental::filesystem::path filename{value};
std::experimental::filesystem::path filename{std::string(value)};
gp_logfile = std::make_unique<std::ofstream>(filename);
}

Expand Down

0 comments on commit 9271751

Please sign in to comment.