Skip to content

Commit 6f29a1c

Browse files
committed
chore: Update CXX_VERSION in LSP server initialization
Signed-off-by: Roberto Raggi <[email protected]>
1 parent 3e47ab9 commit 6f29a1c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/frontend/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ add_executable(cxx ${SOURCES})
2323

2424
target_link_libraries(cxx cxx-parser cxx-lsp)
2525

26+
target_compile_definitions(cxx PRIVATE
27+
CXX_VERSION="${CMAKE_PROJECT_VERSION}"
28+
)
29+
2630
if(EMSCRIPTEN)
2731
target_link_options(cxx PUBLIC
2832
"SHELL:-s EXIT_RUNTIME=1"

src/frontend/cxx/lsp_server.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ class Server {
372372

373373
withUnsafeJson([&](json storage) {
374374
InitializeResult result(storage);
375-
result.serverInfo<ServerInfo>().name("cxx-lsp").version("0.0.1");
375+
result.serverInfo<ServerInfo>().name("cxx-lsp").version(CXX_VERSION);
376376
result.capabilities().textDocumentSync(TextDocumentSyncKind::kFull);
377377

378378
sendToClient(result, request.id());

0 commit comments

Comments
 (0)