Skip to content

build: don't set global compiler flags#54

Merged
alandefreitas merged 1 commit intoalandefreitas:developfrom
tearfur:patch-2
May 4, 2025
Merged

build: don't set global compiler flags#54
alandefreitas merged 1 commit intoalandefreitas:developfrom
tearfur:patch-2

Conversation

@tearfur
Copy link
Copy Markdown
Contributor

@tearfur tearfur commented Apr 14, 2025

P.S. Maybe this macro can be removed altogether? Not sure what it is for in the first place.

@alandefreitas
Copy link
Copy Markdown
Owner

Wouldn't

if (SMALL_MASTER_PROJECT)
    set_optimization_flags()
endif()

at the calling site be a shorter diff with better separation of concerns?

@tearfur tearfur force-pushed the patch-2 branch 2 times, most recently from eb39f38 to f759d52 Compare April 18, 2025 10:07
@tearfur
Copy link
Copy Markdown
Contributor Author

tearfur commented Apr 18, 2025

Changed per your suggestion and provided a fallback if people wanted the old behaviour.

@alandefreitas
Copy link
Copy Markdown
Owner

Sorry. Just had another look at this whole thing. The correct approach would be for none of that to even exist, let alone different behaviors for MASTER/ROOT and subdirs. If user is responsible for choosing the build type and the build type already sets the flags. So that's it. This function shouldn't exist and we should never call it.

@tearfur tearfur changed the title build: set global compiler flags in master project only build: don't set global compiler flags May 4, 2025
@alandefreitas alandefreitas merged commit d5e268f into alandefreitas:develop May 4, 2025
0 of 5 checks passed
@tearfur tearfur deleted the patch-2 branch May 4, 2025 04:48
@alandefreitas
Copy link
Copy Markdown
Owner

LGTM! Thanks!

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