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 - CMAKE: fixed cflags check for build type
Summary: CMAKE: fixed cflags check for build type
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 2.0.4
Hardware: All All
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-17 18:08 UTC by Martin Gerhardy
Modified: 2017-08-12 04:43 UTC (History)
0 users

See Also:


Attachments
the patch (353 bytes, patch)
2016-02-17 18:08 UTC, Martin Gerhardy
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.