File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -7,10 +7,22 @@ set(CMAKE_CXX_EXTENSIONS OFF)
77
88include (FetchContent)
99
10+ set (TOKENIZERS_CPP_MSVC_RUNTIME_LIBRARY "" CACHE STRING "MSVC runtime library setting (One of MT or MD)" )
11+
1012# update to contain more rust flags
1113set (TOKENIZERS_CPP_RUST_FLAGS "" )
1214set (TOKENIZERS_CPP_CARGO_TARGET "" )
1315
16+ if (MSVC )
17+ if (TOKENIZERS_CPP_MSVC_RUNTIME_LIBRARY STREQUAL "MT" )
18+ list (APPEND TOKENIZERS_CPP_RUST_FLAGS -Ctarget-feature=+crt-static )
19+ elseif (TOKENIZERS_CPP_MSVC_RUNTIME_LIBRARY STREQUAL "MD" )
20+ list (APPEND TOKENIZERS_CPP_RUST_FLAGS -Ctarget-feature=-crt-static )
21+ elseif (TOKENIZERS_CPP_MSVC_RUNTIME_LIBRARY)
22+ message (WARNING "Invalid value for TOKENIZERS_CPP_MSVC_RUNTIME_LIBRARY. Ignoring." )
23+ endif ()
24+ endif ()
25+
1426# extra link libraries
1527set (TOKENIZERS_CPP_LINK_LIBS "" )
1628set (TOKENIZERS_C_LINK_LIBS "" )
You can’t perform that action at this time.
0 commit comments