Skip to content

UT: Do not add -g flag if CMAKE_BUILD_TYPE is set to "Release"#3562

Closed
pcrosemurgy wants to merge 1 commit intonasa:develfrom
pcrosemurgy:pcrosemurgy-wip
Closed

UT: Do not add -g flag if CMAKE_BUILD_TYPE is set to "Release"#3562
pcrosemurgy wants to merge 1 commit intonasa:develfrom
pcrosemurgy:pcrosemurgy-wip

Conversation

@pcrosemurgy
Copy link
Copy Markdown
Contributor

@pcrosemurgy pcrosemurgy commented May 6, 2025

Related Issue(s)
Has Unit Tests (y/n)
Documentation Included (y/n)

Change Description

By default when CMake testing is enabled CMAKE_BUILD_TYPE is set to "Debug". This PR will not break any backwards compatibility.

If, in a deployment's top-level CMakeLists.txt, CMAKE_BUILD_TYPE is explicitly set to "Release" this should be respected and the debug flag should be omitted

Rationale

This is needed in order to work around compile times for AC files with very long toString() impls (for example, AC array data types with thousands of args). When -g is used, the UT builds fail to complete (that is, fail to complete within any human/reasonable time).

Copy link
Copy Markdown
Collaborator

@LeStarch LeStarch left a comment

Choose a reason for hiding this comment

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

This looks right, although I wonder if the -g is needed at all. CMake Debug should add that for us.

@pcrosemurgy
Copy link
Copy Markdown
Contributor Author

Closed, nasa/fpp#689 will fix our underlying issue.

@pcrosemurgy pcrosemurgy closed this May 6, 2025
@pcrosemurgy pcrosemurgy deleted the pcrosemurgy-wip branch May 6, 2025 21:02
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