Skip to content

Commit

Permalink
Cxxparser (#3365)
Browse files Browse the repository at this point in the history
* - Remove generated files for CxxParser
- Use CxxParser as library, and remove (generated/copied) files of CxxParser from Codelite
- Use `%option never-interactive` for CxxParser/cpp.l and CxxParser/expr_lexer.l
- Fix mixin EOL in several files (to unix EOL)
- Replace '**' by '*' '*' in cpp_variables_grammar.y
- Fix prototype of `yyerror` (for `const char*`)
- Add missing declarations of some functions in yacc files.
- Remove (unneeded) `#include <windows>` from CxxParser/main.cpp

* Clean up msys2.yml

* Remove old codelite workspace/project CxxParser and sed.exe
  • Loading branch information
Jarod42 authored May 24, 2024
1 parent 918a43f commit 43431e3
Show file tree
Hide file tree
Showing 34 changed files with 163 additions and 22,924 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Codelite's dependencies
run: |
# brew update && brew upgrade # fails somehow
brew install git cmake libssh hunspell flex
brew install git cmake libssh hunspell bison flex
# WxWidgets
- name: Checkout
Expand Down
35 changes: 21 additions & 14 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,21 @@ jobs:

steps:
- uses: msys2/setup-msys2@v2

# pre-requires
- name: Install dependencies
shell: msys2 {0}
run: |
# pacman -Syu --noconfirm # Fail, requires to close this process
pacman -S --noconfirm mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-make mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-clang-tools-extra
pacman -S --noconfirm mingw-w64-clang-x86_64-zlib mingw-w64-clang-x86_64-libssh mingw-w64-clang-x86_64-hunspell mingw-w64-clang-x86_64-openssl mingw-w64-clang-x86_64-sqlite3 flex
with:
msystem: clang64
update: true
install: >-
mingw-w64-clang-x86_64-cmake
mingw-w64-clang-x86_64-make
mingw-w64-clang-x86_64-clang
mingw-w64-clang-x86_64-clang-tools-extra
mingw-w64-clang-x86_64-zlib
mingw-w64-clang-x86_64-libssh
mingw-w64-clang-x86_64-hunspell
mingw-w64-clang-x86_64-openssl
mingw-w64-clang-x86_64-sqlite3
bison
flex
# WxWidgets
- name: Checkout
Expand All @@ -34,8 +41,8 @@ jobs:
run: |
mkdir wxWidgets/build-release
cd wxWidgets/build-release
PATH="/clang64/bin:$PATH" cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/root" -DwxBUILD_DEBUG_LEVEL=0 -DwxBUILD_MONOLITHIC=1 -DwxBUILD_SAMPLES=SOME -DwxUSE_STL=1
PATH="/clang64/bin:$PATH" mingw32-make -j$(nproc) && PATH="/clang64/bin:$PATH" mingw32-make install
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/root" -DwxBUILD_DEBUG_LEVEL=0 -DwxBUILD_MONOLITHIC=1 -DwxBUILD_SAMPLES=SOME -DwxUSE_STL=1
mingw32-make -j$(nproc) && PATH="/clang64/bin:$PATH" mingw32-make install
# wx-config-msys2
- name: Checkout
Expand All @@ -49,8 +56,8 @@ jobs:
run: |
mkdir wx-config-msys2/build-release
cd wx-config-msys2/build-release
PATH="/clang64/bin:$PATH" cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$HOME/root
PATH="/clang64/bin:$PATH" mingw32-make -j$(nproc) install
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$HOME/root"
mingw32-make -j$(nproc) install
#add $HOME/root/bin to PATH
# Codelite
Expand All @@ -64,8 +71,8 @@ jobs:
run: |
mkdir build-release
cd build-release
MSYS2_BASE=/d/a/_temp/msys64 PATH="/clang64/bin:$HOME/root/bin:$PATH" cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DWXWIN="$HOME/root" -Wno-dev
PATH="/clang64/bin:$HOME/root/bin:$PATH" mingw32-make -j$(nproc) install
MSYS2_BASE=/d/a/_temp/msys64 PATH="$HOME/root/bin:$PATH" cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DWXWIN="$HOME/root" -Wno-dev
PATH="$HOME/root/bin:$PATH" mingw32-make -j$(nproc) install
# Upload artefact
- name: artifact
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
# Codelite
- name: install Codelite's dependencies
run: sudo apt-get install build-essential cmake git libpcre2-dev libsqlite3-dev libssh-dev flex
run: sudo apt-get install build-essential cmake git libpcre2-dev libsqlite3-dev libssh-dev bison flex

- name: Checkout Codelite
uses: actions/checkout@v4
Expand Down
18 changes: 18 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,23 @@ if(NOT SQLite3_FOUND)
endif()
endif()

find_package(BISON REQUIRED)

if(NOT BISON_FOUND)
if(UNIX)
message(FATAL_ERROR " **** Could not find flex. Please install bison package")
elseif(APPLE)
message(FATAL_ERROR " **** Could not find flex. Please install bison via brew")
elseif(MINGW)
message(
FATAL_ERROR
" **** Could not find flex. Please install bison package: pacman -S bison"
)
else()
message(FATAL_ERROR " **** Could not find bison. Please install bison package")
endif()
endif()

find_package(FLEX REQUIRED)

if(NOT FLEX_FOUND)
Expand Down Expand Up @@ -892,6 +909,7 @@ add_subdirectory(sdk/wxsqlite3)
add_subdirectory(sdk/wxshapeframework)
add_subdirectory(sdk/databaselayer)
add_subdirectory(yaml-cpp)
add_subdirectory(CxxParser)
add_subdirectory(CodeLite)
add_subdirectory(Plugin)
add_subdirectory(PCH)
Expand Down
1 change: 1 addition & 0 deletions CodeLite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ target_link_libraries(
${wxWidgets_LIBRARIES}
-L"${CL_LIBPATH}"
${SQLite3_LIBRARIES}
libCxxParser
wxsqlite3
${LIBSSH_LIB}
${GTK_LIBS}
Expand Down
Loading

0 comments on commit 43431e3

Please sign in to comment.