Skip to content
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

Few fixes #9

Merged
merged 3 commits into from
Apr 26, 2024
Merged
Changes from 1 commit
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
Next Next commit
Use armadillo-based test only if there is the armadillo in the system
  • Loading branch information
ruthenium96 committed Aug 14, 2023
commit deae28c3b0d92579a193517970e59fa78d9cde9c
10 changes: 6 additions & 4 deletions tests/CMakeLists.txt
Copy link
Owner

Choose a reason for hiding this comment

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

Could you make the add_directory(tests) in the main CMakeLists.txt conditional on BUILD_TESTING being true instead? That way, we wouldn't skip tests when we actually want to test them, and armadillo becomes a dev dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the requested changes in the last commit. Thank you for this suggestion!

Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ target_link_libraries(gh-issue-2 ${PROJECT_NAME})
add_test(NAME gh-issue-2 COMMAND gh-issue-2)

find_package(Armadillo)
include_directories(${ARMADILLO_INCLUDE_DIRS})
add_executable(testWigner testWigner.cpp)
target_link_libraries(testWigner ${PROJECT_NAME} ${ARMADILLO_LIBRARIES})
add_test(NAME testWigner COMMAND testWigner 10)
if (ARMADILLO_FOUND)
include_directories(${ARMADILLO_INCLUDE_DIRS})
add_executable(testWigner testWigner.cpp)
target_link_libraries(testWigner ${PROJECT_NAME} ${ARMADILLO_LIBRARIES})
add_test(NAME testWigner COMMAND testWigner 10)
endif()