Skip to content

Change testing framework to CMake #90

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Feb 24, 2023
Merged

Change testing framework to CMake #90

merged 6 commits into from
Feb 24, 2023

Conversation

JellevanKraaij
Copy link
Contributor

Attempt to change the unit tests to CMake, let me know what you think of it.

Please note that CMake includes a testing feature named ctest (confusing names...)
Changed the framework from ctest to Google Test, as I worked with it before, and it integrates nicely with ctest(CMake ctest)

to build the test and mlx42:
cmake -DCMAKE_BUILD_TYPE=Test -B build && cmake --build build
run the tests:
ctest --output-on-failure --test-dir build

@W2Wizard W2Wizard added the Improvement Adds an implementation or improves on something label Feb 22, 2023
instead use BUILD_TESTS variable for it
@JellevanKraaij
Copy link
Contributor Author

Changed variable used to enable tests from CMAKE_BUILD_TYPE=Test to BUILD_TESTS, to avoid later issues with different build types like release and debug.
updated command to compile tests:
cmake -DBUILD_TESTS=YES -B build && cmake --build build

`sprintf` is deprecated due to security concerns
@W2Wizard W2Wizard changed the title change testing to cmake Change testing framework to CMake Feb 23, 2023
Copy link
Collaborator

@W2Wizard W2Wizard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, works wonderfully! Thanks 🤠

@W2Wizard W2Wizard merged commit a7a87f5 into codam-coding-college:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Improvement Adds an implementation or improves on something
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants