Handle darwin compiler optimizations where they belong, in cmake not the bash script

Cinders 2013-10-16 15:32:56 -06:00
parent 8e69338c2b
commit 7320729d7f
2 changed files with 6 additions and 5 deletions

View File

@ -263,6 +263,11 @@ if (DARWIN)
else (XCODE_VERSION GREATER 4.9)
error("Darwin AVX Optimizations only available on Xcode5 with Clang, silly person!")
endif (XCODE_VERSION GREATER 4.9)
else (USE_AVX_OPTIMIZATION)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_X86_VECTOR_INSTRUCTIONS SSE3)
set(CMAKE_XCODE_ATTRIBUTE_GCC_OPTIMIZATION_LEVEL -O3)
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_C_FLAGS_RELEASE "-O3 -msse3 ${CMAKE_C_FLAGS_RELEASE}")
endif (USE_AVX_OPTIMIZATION)
if (XCODE_VERSION GREATER 4.2)
set(ENABLE_SIGNING TRUE)

View File

@ -408,11 +408,7 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then
else
JOBS="-jobs $JOBS"
fi
if [ $OSTYPE == darwin10 ] ; then
xcodebuild -configuration $BTYPE -project Firestorm.xcodeproj GCC_VERSION=4.2 GCC_OPTIMIZATION_LEVEL=3 GCC_ENABLE_SSE3_EXTENSIONS=YES 2>&1 | tee -a $LOG
else
xcodebuild -configuration $BTYPE -project Firestorm.xcodeproj $JOBS GCC_OPTIMIZATION_LEVEL=3 GCC_ENABLE_SSE3_EXTENSIONS=YES 2>&1 | tee -a $LOG
fi
xcodebuild -configuration $BTYPE -project Firestorm.xcodeproj $JOBS 2>&1 | tee -a $LOG
elif [ $PLATFORM == "linux32" -o $PLATFORM == "linux64" ] ; then
if [ $JOBS == "0" ] ; then
JOBS=`cat /proc/cpuinfo | grep processor | wc -l`