diff options
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/build-scripts/build-uscxml-ios.sh | 35 | ||||
-rw-r--r-- | contrib/cmake/CrossCompile-iOS-Sim.cmake | 18 | ||||
-rw-r--r-- | contrib/cmake/CrossCompile-iOS.cmake | 31 | ||||
-rw-r--r-- | contrib/ctest/hosts/default.nmake.ctest | 8 | ||||
-rw-r--r-- | contrib/ctest/tests/ecma.ctest | 2 | ||||
-rw-r--r-- | contrib/ctest/tests/general.ctest | 2 | ||||
-rw-r--r-- | contrib/ctest/tests/plugins-ecma.ctest | 2 | ||||
-rw-r--r-- | contrib/ctest/tests/xpath.ctest | 2 |
8 files changed, 62 insertions, 38 deletions
diff --git a/contrib/build-scripts/build-uscxml-ios.sh b/contrib/build-scripts/build-uscxml-ios.sh index fccea19..f2fbee7 100755 --- a/contrib/build-scripts/build-uscxml-ios.sh +++ b/contrib/build-scripts/build-uscxml-ios.sh @@ -8,14 +8,20 @@ unset MACOSX_DEPLOYMENT_TARGET # be ridiculously conservative with regard to ios features -export IPHONEOS_DEPLOYMENT_TARGET="1.0" + +if [ -z "${IPHONEOS_DEPLOYMENT_TARGET+xxx}" ]; then + export IPHONEOS_DEPLOYMENT_TARGET="1.0" +fi + +if [ -z "${IOS_SDK_VERSION+xxx}" ]; then + export IOS_SDK_VERSION=7.1 +fi # exit on error set -e ME=`basename $0` DIR="$( cd "$( dirname "$0" )" && pwd )" -SDK_VER="6.1" CWD=`pwd` BUILD_DIR="/tmp/build-uscxml-ios" @@ -24,22 +30,21 @@ BUILD_DIR="/tmp/build-uscxml-ios" # # Build device with older SDK for old architectures # -export IOS_SDK_VERSION=5.1 - -mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug &> /dev/null -cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug -make -j4 - -mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release &> /dev/null -cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release -cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release -make -j4 +# export IOS_SDK_VERSION=5.1 +# +# mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug &> /dev/null +# cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug +# cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Debug +# make -j4 +# +# mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release &> /dev/null +# cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-release +# cmake ${DIR}/../../ -DCMAKE_TOOLCHAIN_FILE=${DIR}/../cmake/CrossCompile-iOS.cmake -DDIST_PREPARE=ON -DCMAKE_BUILD_TYPE=Release +# make -j4 # -# Build device with current SDK +# Build device and sim with current SDK # -export IOS_SDK_VERSION=6.1 mkdir -p ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug &> /dev/null cd ${BUILD_DIR}/device-${IOS_SDK_VERSION}-debug diff --git a/contrib/cmake/CrossCompile-iOS-Sim.cmake b/contrib/cmake/CrossCompile-iOS-Sim.cmake index 5a11761..7ed22fb 100644 --- a/contrib/cmake/CrossCompile-iOS-Sim.cmake +++ b/contrib/cmake/CrossCompile-iOS-Sim.cmake @@ -2,9 +2,7 @@ # build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cmake/CrossCompile-iOS-Sim.cmake SET(CMAKE_SYSTEM_NAME Generic) -if ("$ENV{IOS_SDK_VERSION}" STREQUAL "") - SET(CMAKE_SYSTEM_VERSION 6.1) -else() +if (NOT "$ENV{IOS_SDK_VERSION}" STREQUAL "") SET(CMAKE_SYSTEM_VERSION $ENV{IOS_SDK_VERSION}) endif() SET(CMAKE_SYSTEM_PROCESSOR i386) @@ -12,6 +10,7 @@ SET(CMAKE_SYSTEM_PROCESSOR i386) SET(ARCHS "-arch i386") SET(CMAKE_CROSSCOMPILING_TARGET IOS) SET(CMAKE_OSX_ARCHITECTURES "i386") +SET(IOS_MINPHONE_OS "4.3") SET(IOS ON) SET(IOSSIM ON) SET(UNIX ON) @@ -44,6 +43,10 @@ if (IOS6_OR_LATER) # we have to use clang - llvm will choke on those __has_feature macros? SET (CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") SET (CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") + SET (CMAKE_AR "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar" CACHE FILEPATH "" FORCE) + SET (CMAKE_LINKER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" CACHE FILEPATH "" FORCE) + SET (CMAKE_NM "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm" CACHE FILEPATH "" FORCE) + SET (CMAKE_STRIP "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" CACHE FILEPATH "" FORCE) if ($ENV{MACOSX_DEPLOYMENT_TARGET}) message(FATAL_ERROR "llvm will croak with MACOSX_DEPLOYMENT_TARGET environment variable set when building for ios - unset MACOSX_DEPLOYMENT_TARGET") @@ -68,15 +71,16 @@ set(CMAKE_SYSTEM_FRAMEWORK_PATH /System/Library/Frameworks) # force compiler and linker flags -SET(CMAKE_C_LINK_FLAGS ${ARCHS}) -SET(CMAKE_CXX_LINK_FLAGS ${ARCHS}) -SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") -SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") +SET(CMAKE_C_LINK_FLAGS "${ARCHS} --sysroot=${SDKROOT} -miphoneos-version-min=${IOS_MINPHONE_OS}") +SET(CMAKE_CXX_LINK_FLAGS "${ARCHS} --sysroot=${SDKROOT} -miphoneos-version-min=${IOS_MINPHONE_OS}") +# SET(CMAKE_C_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") +# SET(CMAKE_CXX_LINK_FLAGS "${CMAKE_C_LINK_FLAGS} --sysroot=${SDKROOT}") # SET(CMAKE_C_FLAGS ${ARCHS}) # C_FLAGS wont stick, use ADD_DEFINITIONS instead # SET(CMAKE_CXX_FLAGS ${ARCHS}) ADD_DEFINITIONS(${ARCHS}) ADD_DEFINITIONS("--sysroot=${SDKROOT}") +ADD_DEFINITIONS("-miphoneos-version-min=${IOS_MINPHONE_OS}") # ios headers INCLUDE_DIRECTORIES(SYSTEM "${SDKROOT}/usr/include") diff --git a/contrib/cmake/CrossCompile-iOS.cmake b/contrib/cmake/CrossCompile-iOS.cmake index 6d8bf7d..3e67c79 100644 --- a/contrib/cmake/CrossCompile-iOS.cmake +++ b/contrib/cmake/CrossCompile-iOS.cmake @@ -2,9 +2,7 @@ # build$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../contrib/cmake/CrossCompile-iOS.cmake SET(CMAKE_SYSTEM_NAME Generic) -if ("$ENV{IOS_SDK_VERSION}" STREQUAL "") - SET(CMAKE_SYSTEM_VERSION 6.1) -else() +if (NOT "$ENV{IOS_SDK_VERSION}" STREQUAL "") SET(CMAKE_SYSTEM_VERSION $ENV{IOS_SDK_VERSION}) endif() SET(CMAKE_SYSTEM_PROCESSOR arm) @@ -31,29 +29,42 @@ else() SET(DEVROOT "/Developer/Platforms/iPhoneOS.platform/Developer") endif() +set(IOS6_OR_LATER OFF) +if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "5.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "5.0") + SET(CMAKE_OSX_ARCHITECTURES armv6 armv7) + SET(ARCHS "-arch armv6 -arch armv7") +endif() + if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "6.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "6.0") set(IOS6_OR_LATER ON) -else() - set(IOS6_OR_LATER OFF) + SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s) + SET(ARCHS "-arch armv7 -arch armv7s") endif() -if (IOS6_OR_LATER) - # no armv6 support in ios6 - armv7s was added, but we did no compile our dependencies for it +if (${CMAKE_SYSTEM_VERSION} VERSION_EQUAL "7.0" OR ${CMAKE_SYSTEM_VERSION} VERSION_GREATER "7.0") + set(IOS6_OR_LATER ON) SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s) SET(ARCHS "-arch armv7 -arch armv7s") + # SET(CMAKE_OSX_ARCHITECTURES armv7 armv7s arm64) + # SET(ARCHS "-arch armv7 -arch armv7s -arch arm64") +endif() + +if (IOS6_OR_LATER) + # no armv6 support in ios6 - armv7s was added, but we did no compile our dependencies for it # we have to use clang - llvm will choke on those __has_feature macros? SET (CMAKE_C_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang") SET (CMAKE_CXX_COMPILER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++") + SET (CMAKE_AR "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar" CACHE FILEPATH "" FORCE) + SET (CMAKE_LINKER "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" CACHE FILEPATH "" FORCE) + SET (CMAKE_NM "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm" CACHE FILEPATH "" FORCE) + SET (CMAKE_STRIP "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip" CACHE FILEPATH "" FORCE) if ($ENV{MACOSX_DEPLOYMENT_TARGET}) message(FATAL_ERROR "llvm will croak with MACOSX_DEPLOYMENT_TARGET environment variable set when building for ios - unset MACOSX_DEPLOYMENT_TARGET") endif() else() - SET(CMAKE_OSX_ARCHITECTURES armv6 armv7) - SET(ARCHS "-arch armv6 -arch armv7") - SET (CMAKE_C_COMPILER "${DEVROOT}/usr/bin/gcc") SET (CMAKE_CXX_COMPILER "${DEVROOT}/usr/bin/g++") diff --git a/contrib/ctest/hosts/default.nmake.ctest b/contrib/ctest/hosts/default.nmake.ctest index a9ea76d..eac99b9 100644 --- a/contrib/ctest/hosts/default.nmake.ctest +++ b/contrib/ctest/hosts/default.nmake.ctest @@ -8,13 +8,17 @@ set(CTEST_BUILD_CONFIGURATION "Debug") set(CTEST_BUILD_NAME "${CMAKE_SYSTEM}") set(RETAIN_BUILD_DIR OFF) +include("tests/general.ctest") +include("common.ctest.inc") + +set(RETAIN_BUILD_DIR ON) include("tests/ecma.ctest") include("common.ctest.inc") -set(RETAIN_BUILD_DIR OFF) +set(RETAIN_BUILD_DIR ON) include("tests/xpath.ctest") include("common.ctest.inc") set(RETAIN_BUILD_DIR OFF) -include("tests/plugins.ctest") +include("tests/plugins-ecma.ctest") include("common.ctest.inc") diff --git a/contrib/ctest/tests/ecma.ctest b/contrib/ctest/tests/ecma.ctest index 61a8da3..8659120 100644 --- a/contrib/ctest/tests/ecma.ctest +++ b/contrib/ctest/tests/ecma.ctest @@ -1,4 +1,4 @@ set(CTEST_BUILD_OPTIONS "-DRUN_W3C_ECMA_TESTS:BOOL=ON -DENABLE_GCOV:BOOL=ON") -set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} - ecma") +set(CTEST_BUILD_NAME "${CMAKE_SYSTEM} - ecma") set(USCXML_INCLUDE_LABEL_REGEX ".*ecma.*") set(USCXML_EXCLUDE_LABEL_REGEX "")
\ No newline at end of file diff --git a/contrib/ctest/tests/general.ctest b/contrib/ctest/tests/general.ctest index 701cc70..fd120fa 100644 --- a/contrib/ctest/tests/general.ctest +++ b/contrib/ctest/tests/general.ctest @@ -1,4 +1,4 @@ set(CTEST_BUILD_OPTIONS "-DENABLE_GCOV:BOOL=ON") -set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} - general") +set(CTEST_BUILD_NAME "${CMAKE_SYSTEM} - general") set(USCXML_INCLUDE__LABEL_REGEX "") set(USCXML_EXCLUDE_LABEL_REGEX ".*[ecma|xpath].*") diff --git a/contrib/ctest/tests/plugins-ecma.ctest b/contrib/ctest/tests/plugins-ecma.ctest index e9c2566..288aac0 100644 --- a/contrib/ctest/tests/plugins-ecma.ctest +++ b/contrib/ctest/tests/plugins-ecma.ctest @@ -1,4 +1,4 @@ set(CTEST_BUILD_OPTIONS "-DBUILD_AS_PLUGINS=ON -DENABLE_GCOV:BOOL=ON") -set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} - plugins") +set(CTEST_BUILD_NAME "${CMAKE_SYSTEM} - plugins") set(USCXML_INCLUDE_LABEL_REGEX ".*ecma.*") set(USCXML_EXCLUDE_LABEL_REGEX "") diff --git a/contrib/ctest/tests/xpath.ctest b/contrib/ctest/tests/xpath.ctest index 5e0e1dc..ca43fbe 100644 --- a/contrib/ctest/tests/xpath.ctest +++ b/contrib/ctest/tests/xpath.ctest @@ -1,4 +1,4 @@ set(CTEST_BUILD_OPTIONS "-DRUN_W3C_XPATH_TESTS:BOOL=ON -DENABLE_GCOV:BOOL=ON") -set(CTEST_BUILD_NAME "${CTEST_BUILD_NAME} - xpath") +set(CTEST_BUILD_NAME "${CMAKE_SYSTEM} - xpath") set(USCXML_INCLUDE_LABEL_REGEX ".*xpath.*") set(USCXML_EXCLUDE_LABEL_REGEX "") |