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

Add support for CMake Presets #348

Merged
merged 75 commits into from
Jun 15, 2024

Conversation

prince-chrismc
Copy link
Collaborator

The intention is to move some of the setup and configuration variables from the CI scripts to the build configurations to make it easier to run them locally. This is most evident when it comes to the sanitizers and fuzzers but also for the examples.

The second benefit is also from #344 is to make the cross platform tests the same. The intention will be to have all the three OS just run the exact same steps.

As a bonus, I've added a few recommended extensions for VS Code so anyone who might want to contribute will be off on the right foot (hopefully)

windows ran in debug, which means the multi config needs more help
https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170

"You can set C and C++ compilers by using cacheVariables.CMAKE_C_COMPILER and cacheVariables.CMAKE_CXX_COMPILER in a Configure Preset. It's equivalent to passing -D CMAKE_C_COMPILER=<value> and -D CMAKE_CXX_COMPILER=<value> to CMake from the command line."
more quotes for inputs
Copy link
Owner

@Thalhammer Thalhammer left a comment

Choose a reason for hiding this comment

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

Just some minor comments, otherwise good to merge from my side.

mkdir build
cd build
cmake .. -DJWT_BUILD_EXAMPLES=ON -DJWT_BUILD_TESTS=ON
sudo make install
Copy link
Owner

Choose a reason for hiding this comment

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

Is there a reason for the explicit make vs a cmake --build . --target install ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

most of the are make install but there's no reason... it should really be cmake --install . for the ones not using presets

.github/workflows/lint.yml Outdated Show resolved Hide resolved
@prince-chrismc prince-chrismc linked an issue Jun 6, 2024 that may be closed by this pull request
@prince-chrismc prince-chrismc merged commit a6927cb into Thalhammer:master Jun 15, 2024
59 checks passed
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

Successfully merging this pull request may close these issues.

Exception is thrown with the exmple private-claims.cpp
2 participants