CMake: extract data sources into static library, add Catch2 unit tests and CTest integration#23
Closed
ifilot wants to merge 1 commit into
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
FetchContentand enableCTesttest discovery to run tests in CI.Description
ATOM_ARCHITECT_DATA_SOURCESand create a new static targetatom-architect-datathat contains data sources andresources.qrcand links toQt5::Core,Qt5::Widgets,Qt5::Charts,Eigen3::Eigen, andglm::glm.atom-architectexecutable list and linkatom-architectagainstatom-architect-datainstead, preserving platform-specific link rules and resource handling.include(CTest)and aBUILD_TESTINGblock that fetchesCatch2(v3.7.1), definesatom-architect-testsand wirescatch_discover_testsfor test discovery.tests/data_unit_tests.cppcoveringAtomselection cycling,Bondconstruction and special-axis handling,Structureeigenmode validation and selection/freeze behavior,StructureOperatorz-alignment, andNebCalculationLoadererror reporting.Testing
-DBUILD_TESTING=ON.atom-architect-testsis added and linked againstCatch2::Catch2WithMainandatom-architect-datafor unit execution.cmake -S . -B build -DBUILD_TESTING=ON && cmake --build build && ctest --test-dir build -V.Codex Task