GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — #380: Update CMake config. by luca-schlecker · Pull Request #384 · CrowCpp/Crow

Conversation

@luca-schlecker

@luca-schlecker luca-schlecker commented Apr 3, 2022 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

This is the follow-up of and partially fixes #380.

Crow's features (ssl and compression) can now be enabled through CROW_FEATURES instead of their own CMake variables.
The default features are the ones Crow was installed with but can be overridden by setting CROW_FEATURES before the find_package call.

cmake_minimum_required(VERSION 3.17)
project(CrowTest)

add_executable(test main.cpp)

# Some examples:
# set(CROW_FEATURES "")
# set(CROW_FEATURES "ssl;compression")
# set(CROW_FEATURES ssl compression)
# set(CROW_FEATURES ssl)
find_package(Crow REQUIRED)
target_link_libraries(test Crow::Crow)

Using the CMake CLI features are given as a semicolon-separated list:

cmake .. -DCROW_FEATURES="ssl;compression"

Documentation needs an update to align with the changes made in this PR.

Signed-off-by: Luca Schlecker [email protected]

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@luca-schlecker
luca-schlecker requested a review from The-EDev April 3, 2022 22:00
@luca-schlecker
luca-schlecker force-pushed the crow-features branch from 3a2bf01 to 347abab Compare April 3, 2022 22:53
The-EDev
The-EDev reviewed Apr 4, 2022
View reviewed changes

@The-EDev The-EDev left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Aside from documentation, this should probably be removed.

And just to make sure, the definitions inside the code (things like #ifdef CROW_ENABLE_SSL) will still work, right?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@luca-schlecker
luca-schlecker force-pushed the crow-features branch from 347abab to 169a3d3 Compare April 4, 2022 17:46
@luca-schlecker

luca-schlecker commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator Author

Yes, the definitions inside the code stayed the same, it's just the CMake variable that changed, and the default features are now the ones Crow was installed with. For example, crow_all.h is not influenced by this change.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@luca-schlecker
luca-schlecker force-pushed the crow-features branch from 169a3d3 to 92882f6 Compare April 4, 2022 17:50
@luca-schlecker
luca-schlecker requested a review from The-EDev April 4, 2022 17:51
The-EDev
The-EDev reviewed Apr 4, 2022
View reviewed changes
Comment thread CMakeLists.txt Resolved

Uh oh!

There was an error while loading. Please reload this page.

The-EDev
The-EDev previously approved these changes Apr 4, 2022
View reviewed changes

@The-EDev The-EDev left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Everything seems good, I just wanted to know how do I set the default values during installation (So I can update the packages)?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
luca-schlecker added 2 commits April 4, 2022 20:36
@luca-schlecker
Crow's current features (ssl and compression) can now be enabled thro…
44f51f4
…ugh 'CROW_FEATURES' instead of their own CMake variables.

The default features are the ones Crow was installed with but can be overridden by setting 'CROW_FEATURES' before the 'find_package' call.

Signed-off-by: Luca Schlecker <[email protected]>
@luca-schlecker
update CI scripts to align with the introuction of 'CROW_FEATURES'.
23f2cbb
Signed-off-by: Luca Schlecker <[email protected]>
@luca-schlecker
luca-schlecker dismissed The-EDev’s stale review via 23f2cbb April 4, 2022 18:37
@luca-schlecker
luca-schlecker force-pushed the crow-features branch from 92882f6 to 23f2cbb Compare April 4, 2022 18:37
@luca-schlecker

luca-schlecker commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator Author

Configuring with

cmake .. -DCROW_FEATURES="ssl;compression"

enables both features and if installed with that configuration, these will be the defaults. I had a look at release.sh and the default was for both features to be disabled, just like in the CMakeLists.txt.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@The-EDev

The-EDev commented Apr 4, 2022

Copy link
Copy Markdown
Member

Hmmm, I understand.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@The-EDev
Merge branch 'master' into crow-features
6ffaf23
@The-EDev

The-EDev commented Apr 4, 2022

Copy link
Copy Markdown
Member

Sorry about all the branch merges by the way

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

The-EDev
The-EDev approved these changes Apr 4, 2022
View reviewed changes
@luca-schlecker

luca-schlecker commented Apr 4, 2022

Copy link
Copy Markdown
Collaborator Author

All good, but that's the reason I rebase and force push instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@The-EDev
The-EDev merged commit 2b45f02 into master Apr 4, 2022
@The-EDev
The-EDev deleted the crow-features branch April 5, 2022 06:35
@The-EDev The-EDev mentioned this pull request Apr 7, 2022
documented CROW_FEATURES #392
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@The-EDev The-EDev The-EDev approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

About setting features after Crow is installed

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@luca-schlecker @The-EDev
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.