We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3261

Summary: CMAKE: fixed cflags check for build type
Product: SDL Reporter: Martin Gerhardy <martin.gerhardy>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: ASSIGNED --- QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.4   
Hardware: All   
OS: All   
Attachments: the patch

Description Martin Gerhardy 2016-02-17 18:08:09 UTC
Created attachment 2378 [details]
the patch

If there is a variable named test, then cmake does variable-value comparison:
   if (test STREQUAL "")
is equivalent to:
   if ("${test}" STREQUAL "")

If there is no variable named test, then cmake does string literal comparison:
   if (test STREQUAL "")
is equivalent to:
   if ("test" STREQUAL "")

That means basically - the current stuff works - but is not how it should be done.