-
Notifications
You must be signed in to change notification settings - Fork 476
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
Use modern CMake syntax #1494
Comments
So I don't mind, though I haven't had any trouble with our current build sequence. The first two commands work fine for me, but |
Yes, it'll replace ninja, and is completely platform-independent. I'll look into the test suite...
|
I like the platform-independence aspect (particularly looking at oqs-provider for Windows right now). What makes me wonder, though, is how this will impact build+test/CI runtime: |
I did |
@dstebila Thanks, that's good to know, I didn't know we can use the flag without a number |
…make & ctest. Upon reading issue #1494 This PR aims to remove the need for ninja, and make tests platform agnostic. The new build process will work as follows: ``` cmake -B build cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ``` Unfortunately, cmake does not have the nice pytest --ignore feature. So to ensure test_kat_all doesn't run by default, the `OQS_ENABLE_LONG_TESTS` variableis introduced. If you would like to run the long tests (currently only `test_kat_all`) you would do the following: ``` cmake -B build -DOQS_ENABLE_LONG_TESTS=on cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ```
… ctest. Upon reading issue #1494 I figured I'd give this a go. This PR aims to remove the need for ninja, and make tests platform agnostic. The new build process will work as follows: ``` cmake -B build cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ``` Since the `run_tests` rule was removed, and cmake doesn't have a way to skip tests by default, the `OQS_ENABLE_LONG_TESTS` variable is introduced. If you would like to run the long tests (currently only `test_kat_all`) you would do the following: ``` cmake -B build -DOQS_ENABLE_LONG_TESTS=on cmake --build build --parallel ctest --test-dir build/tests --output-on-failure ```
@Martyrshot took an initial stab at this in #1700. That PR would be a good jumping-off point for anyone who would like to take this up in the future. |
Instead of depending on
make/msbuild etc
, we should use only moderncmake
andctest
, such asThis is platform-independent and saves a lot of headaches, and completely removes
make
andmsbuild
explicit dependencies. See https://github.com/open-quantum-safe/liboqs-cpp/blob/main/.github/workflows/cmake.yml for an example.The text was updated successfully, but these errors were encountered: