Skip to content

Commit

Permalink
i#58 MacOS: binary compatibility
Browse files Browse the repository at this point in the history
Instruct clang to build binaries that will run on 10.7+.  Otherwise, when
buildong on 10.9 executables use LC_MAIN which the 10.7 loader does not
support, leading to crashes.

SVN-Revision: 2557
  • Loading branch information
derekbruening committed Feb 24, 2014
1 parent 9963afb commit 2db1527
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Expand Up @@ -590,6 +590,10 @@ if (UNIX)
endif ()
set(LD_FLAGS "-melf_i386")
endif (X64)
if (APPLE AND CMAKE_COMPILER_IS_CLANG)
# Ensure our binaries can run on older OSX
set(BASE_CFLAGS "${BASE_CFLAGS} -mmacosx-version-min=10.7")
endif ()
# there's no cmake warning control so we hardcode it
set(WARN "-Wall -Werror -Wwrite-strings")
if (NOT CMAKE_COMPILER_IS_CLANG)
Expand Down

0 comments on commit 2db1527

Please sign in to comment.