| Summary: | Wrong flags in CHECK_OBJC_SOURCE_COMPILES | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Ivan Vashchaev <vivkin> |
| Component: | build | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | triage-2.0.4 |
| Version: | HG 2.1 | ||
| Hardware: | x86 | ||
| OS: | Mac OS X 10.8 | ||
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! 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. |
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()