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

improve: change cmake to link static CanaryLib only for tests #3028

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dudantas
Copy link
Contributor

Description

Removed the static linking of "canary_lib" in non-test builds to improve build performance. This change ensures that "canary_lib" is only linked when running unit and integration tests, reducing unnecessary linking in standard builds.

Behaviour

Actual

The "canary_lib" library is linked in all builds, regardless of whether tests are run or not, leading to longer build times.

Expected

"canary_lib" is only linked in test builds (integration and unit tests), improving build performance for non-test configurations.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

Ensured that:

  • Standard builds do not link with "canary_lib" statically, reducing build time.
  • Test builds successfully link "canary_lib" and run all unit and integration tests as expected.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I checked the PR checks reports
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

@dudantas dudantas changed the title improve: change cmake to link CanaryLib only for tests improve: change cmake to link static CanaryLib only for tests Oct 29, 2024
@dudantas dudantas force-pushed the dudantas/improve-canary-lib-tests branch from 23ccf00 to 7a6305d Compare October 29, 2024 21:39
Copy link

sonarcloud bot commented Oct 29, 2024

Please retry analysis of this Pull-Request directly on SonarCloud

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.

2 participants