Skip to content

Conversation

@BSVogler
Copy link
Contributor

@BSVogler BSVogler commented Jan 10, 2025

For the headless build the Wxwidget was only needed for parsing of the CLI arguments. I made the parsing now work with C++ standard code and added a flag to disable the GUI.
implements #116

Benefits

  • Allows compilations without wxwidget library dependency
  • Removes need to use ubuntu base image thereby reducing docker image size to from 644MB to 171MB
  • Smaller bin size (now 1.7MB)
  • Faster compile time as less code is compiled and linked.

This makes compilation also easier for compilation for target WASM (#145)

Update .gitignore

test: Add basic test function and enable testing in CMake

build: Add C flag for stripping release build

chore: Remove unused testing configuration in CMakeLists.txt

add basic testing

docs: Add comments to cmake/Testing.cmake

fix: Explicitly build test executables before running them

fix: Correctly configure CMake to run tests automatically

fix: Correct add_test command in Testing.cmake

refactor: Consolidate tests into a single executable

fix: Link gtest library to molovol_test executable

fix: Add find_package(gtest REQUIRED) to CMakeLists.txt

refactor: Improve CMake testing best practices

fix: Explicitly set gtest include directory in CMake

refactor: Improve CMake's Google Test include handling

fix: Correct Google Test package name in CMakeLists.txt

refactor: Make Google Test dependency optional for tests

build: Move custom test target definition to Testing.cmake

feat: Ensure tests run during main build process

refactor: Separate test execution using ctest

fix: Ensure molovol_test is built when MOLOVOL_BUILD_TESTING is ON

fix: Include Testing.cmake when building tests

fix test

build: Add Google Benchmark library to CMakeLists.txt

fix test

remove compiler warnings
compiles faster as there are no redundant compilation steps for each target
it should be in the global settings instead
@jmaglic
Copy link
Member

jmaglic commented Aug 14, 2025

I'm now reviewing this PR in an effort to fix #156.

@jmaglic
Copy link
Member

jmaglic commented Aug 14, 2025

I now realised that this PR removes the command line interface from the standalone application entirely. It's by design that the application can be used both via GUI and via CLI. This needs to be reworked before I can merge.

The solution is to separate the headless entry point from the command line code and use the command line code both for the standalone and the headless application. I'll attempt to do this within the next few days.

It is also important that the syntax for using the CLI is backwards compatible with the old wxWidgets CLI. I haven't gotten around to testing this yet. Let me know if you already know that the syntax is different.

Fixes two main issues:
 - target_link_library cannot handle mixing keyword and plain
   signatures. Added changes to use keyword signatures only.
 - Removed the broken call to evalCmdLine from OnInit().

Due to the changes in this branch the CLI no longer works for the GUI
application. Until this is fixed and the CLI works the same as before
this branch cannot be merged into master.
@BSVogler
Copy link
Contributor Author

BSVogler commented Aug 15, 2025

I now realised that this PR removes the command line interface from the standalone application entirely. It's by design that the application can be used both via GUI and via CLI. This needs to be reworked before I can merge.

The solution is to separate the headless entry point from the command line code and use the command line code both for the standalone and the headless application. I'll attempt to do this within the next few days.

It is also important that the syntax for using the CLI is backwards compatible with the old wxWidgets CLI. I haven't gotten around to testing this yet. Let me know if you already know that the syntax is different.

I agree. This change should migrate the wxWidget CLI interface with a standalone, backwards compatible CLI. Will you create a separate PR just for this migration? Maybe we should sync up.
Meanwhile I will clean up migration conflicts and address the other issues you found.

@BSVogler
Copy link
Contributor Author

I included now the CLI parsing in the wxwidget build.

@BSVogler BSVogler changed the title No gui compilation No-GUI compilation Aug 16, 2025
@jmaglic
Copy link
Member

jmaglic commented Aug 16, 2025

Thanks for addressing the comments, I'll review the PR ASAP.

jmaglic and others added 4 commits August 19, 2025 23:38
Previously, the ABS_PATH flag was not set for the library leading to a
broken build.

This change also reorganises the CMake code to condense if/else blocks
and renames the code library.
Resolved conflict by combining both approaches:
- Keep GUI disable and CLI mode from no-gui-compilation branch
- Add Windows-specific console attachment from upstream for proper output
- Use conditional compilation (#ifdef _WIN32) to apply Windows fixes only on Windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants