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 2392 - Wrong flags in CHECK_OBJC_SOURCE_COMPILES
Summary: Wrong flags in CHECK_OBJC_SOURCE_COMPILES
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: HG 2.1
Hardware: x86 Mac OS X 10.8
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords: triage-2.0.4
Depends on:
Blocks:
 
Reported: 2014-02-11 19:49 UTC by Ivan Vashchaev
Modified: 2015-04-08 00:06 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Vashchaev 2014-02-11 19:49:59 UTC
When generating XCode project files or using GCC, instead of Clang, CHECK_OBJC_SOURCE_COMPILES always fail

Fix:
diff -r e749005cfd72 cmake/macros.cmake
--- a/cmake/macros.cmake	Mon Feb 10 13:40:02 2014 -0800
+++ b/cmake/macros.cmake	Tue Feb 11 23:28:14 2014 +0400
@@ -66,7 +66,7 @@
 
 macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
   set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
-  set(CMAKE_REQUIRED_DEFINITIONS "-ObjC ${PREV_REQUIRED_DEFS}")
+  set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
   CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
   set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
 endmacro()
Comment 1 Ryan C. Gordon 2015-02-19 05:22:16 UTC
Marking a large number of bugs with the "triage-2.0.4" keyword at once. Sorry if you got a lot of email from this. This is to help me sort through some bugs in regards to a 2.0.4 release. We may or may not fix this bug for 2.0.4, though!
Comment 2 Ryan C. Gordon 2015-04-08 00:06:25 UTC
We're not actually using this macro anymore, but I'll put the fix in, in case this gets used again in the future.

This patch is now https://hg.libsdl.org/SDL/rev/bf1da29c9509, thanks!

--ryan.