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

Fix CMake tests handling. BUILD_TESTS + add_subdirectory -> cm_add_test_subdirectory #146

Open
x-mass opened this issue Feb 13, 2024 · 2 comments

Comments

@x-mass
Copy link
Member

x-mass commented Feb 13, 2024

Currently entire project uses CMTest not as is has to. All around CMake files you could meet sth like:

if(BUILD_TESTS)
  add_subdirectory(tests)
endif()

But if we read documentation for CMTest, it turns out BUILD_TESTS should be used to either include tests to all target or not.
At the same time, test dirs should be added as cm_add_test_subdirectory(test_subdir) and enabled with CMAKE_ENABLE_TESTS.

Ran into this issue while trying to install crypto3 with make install. Now it installs tests as well, which is not expected. Not sure if this change will affect install target though

@x-mass
Copy link
Member Author

x-mass commented Feb 20, 2024

In addition, submodules do not propagate their tests to crypto3, thus we can't run make test.
Will be fixed with BoostCMake/cmake_modules#23

@AndreyMlashkin
Copy link
Contributor

seems to be fixed

AndreyMlashkin pushed a commit that referenced this issue Aug 15, 2024
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

No branches or pull requests

2 participants