Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/frontend/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,6 @@ add_executable(cxx ${SOURCES})

target_link_libraries(cxx PRIVATE cxx-parser cxx-lsp)

target_compile_definitions(cxx PRIVATE
CXX_VERSION="${CMAKE_PROJECT_VERSION}"
)

# if cmake founds the Threads package, link with it
if(Threads_FOUND)
target_link_libraries(cxx PRIVATE Threads::Threads)
else()
target_compile_definitions(cxx PRIVATE CXX_NO_THREADS)
endif()

if(EMSCRIPTEN)
target_link_options(cxx PRIVATE
"SHELL:-s EXIT_RUNTIME=1"
Expand Down
5 changes: 1 addition & 4 deletions src/frontend/cxx/cli.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,13 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#include "cli.h"

#include <cxx/cli.h>
#include <cxx/private/path.h>

#include <algorithm>
#include <array>
#include <format>
#include <iostream>
#include <sstream>
#include <tuple>
#include <utility>
#include <vector>

Expand Down
4 changes: 2 additions & 2 deletions src/frontend/cxx/frontend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@

#include <cxx/ast.h>
#include <cxx/ast_visitor.h>
#include <cxx/cli.h>
#include <cxx/control.h>
#include <cxx/gcc_linux_toolchain.h>
#include <cxx/lexer.h>
#include <cxx/lsp/lsp_server.h>
#include <cxx/macos_toolchain.h>
#include <cxx/preprocessor.h>
#include <cxx/private/path.h>
Expand All @@ -42,8 +44,6 @@
#include <string>

#include "ast_printer.h"
#include "cli.h"
#include "lsp_server.h"
#include "verify_diagnostics_client.h"

namespace {
Expand Down
9 changes: 9 additions & 0 deletions src/lsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ add_library(cxx-lsp
${CXX_LSP_INCLUDE_HEADER_FILES}
)

target_link_libraries(cxx-lsp PUBLIC cxx-parser)

# if cmake founds the Threads package, link with it
if(Threads_FOUND)
target_link_libraries(cxx-lsp PUBLIC Threads::Threads)
else()
target_compile_definitions(cxx-lsp PUBLIC CXX_NO_THREADS)
endif()

target_include_directories(cxx-lsp
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,13 @@

#pragma once

#include <cxx/cli.h>
#include <cxx/lsp/fwd.h>
#include <cxx/translation_unit.h>

#include <optional>
#include <string>

#include "cli.h"

namespace cxx::lsp {

class CxxDocument {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
#include <unordered_map>
#endif

#include <cxx/cli.h>

#include <vector>

#include "cli.h"
#include "sync_queue.h"

namespace cxx::lsp {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 4 additions & 0 deletions src/parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ add_library(cxx-parser ${SOURCES}
pp_keywords-priv.h
)

target_compile_definitions(cxx-parser PUBLIC
CXX_VERSION="${CMAKE_PROJECT_VERSION}"
)

target_include_directories(cxx-parser
PRIVATE ${CMAKE_CURRENT_BINARY_DIR}
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
Expand Down
Loading