Travis full matrix
authormayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 16:21:25 +0000 (18:21 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 16:21:25 +0000 (18:21 +0200)
.travis.yml
tools/ctest_scripts/toolchain-mingw32.cmake [new file with mode: 0644]
tools/ctest_scripts/travis-ci.cmake

index ebcbd7a32d32caece598b9e7f9d10849087b602c..8e29a64a16634745022d3d53308b13d83bd73bb3 100644 (file)
@@ -1,10 +1,10 @@
 language: c
 os:
   - linux
-#  - osx
+  - osx
 compiler:
-#  - gcc
-#  - clang
+  - gcc
+  - clang
   - x86_64-w64-mingw32-gcc
 env:
   - OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
@@ -19,6 +19,9 @@ matrix:
       compiler: x86_64-w64-mingw32-gcc
     - compiler: clang
       env: OPJ_CI_ARCH=i386 OPJ_CI_BUILD_CONFIGURATION=Release
+    - os: linux
+      compiler: clang
+      env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Release
     - compiler: gcc
       env: OPJ_CI_ARCH=x86_64 OPJ_CI_BUILD_CONFIGURATION=Debug OPJ_CI_ASAN=1
     - compiler: x86_64-w64-mingw32-gcc
diff --git a/tools/ctest_scripts/toolchain-mingw32.cmake b/tools/ctest_scripts/toolchain-mingw32.cmake
new file mode 100644 (file)
index 0000000..1728f9e
--- /dev/null
@@ -0,0 +1,26 @@
+# http://www.cmake.org/Wiki/CmakeMingw
+#
+#  Copyright (c) 2006-2014 Mathieu Malaterre <mathieu.malaterre@voxxl.com>
+#
+#  Redistribution and use is allowed according to the terms of the New
+#  BSD license.
+#  For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+#
+
+# the name of the target operating system
+set(CMAKE_SYSTEM_NAME Windows)
+
+# which compilers to use for C and C++
+set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
+set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
+set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
+
+# here is the target environment located
+set(CMAKE_FIND_ROOT_PATH  /usr/i686-w64-mingw32)
+
+# adjust the default behaviour of the FIND_XXX() commands:
+# search headers and libraries in the target environment, search
+# programs in the host environment
+set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
+set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
+set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
index 371235a41b224d106a65fe667fbd942e5ea73695..fafc54ee5bb2689a4497858425af818696c39c7f 100644 (file)
@@ -48,7 +48,11 @@ endif()
 
 if("$ENV{CC}" MATCHES ".*mingw.*")
        # We are trying to use mingw
-       set(CTEST_CONFIGURE_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${CTEST_SCRIPT_DIRECTORY}/toolchain-mingw64.cmake")
+       if ("$ENV{OPJ_CI_ARCH}" MATCHES "^i[3-6]86$")
+               set(CTEST_CONFIGURE_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${CTEST_SCRIPT_DIRECTORY}/toolchain-mingw32.cmake")
+       else()
+               set(CTEST_CONFIGURE_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${CTEST_SCRIPT_DIRECTORY}/toolchain-mingw64.cmake")
+       endif()
 endif()
 
 if(NOT "$ENV{OPJ_CI_SKIP_TESTS}" STREQUAL "1")
@@ -126,4 +130,4 @@ endif()
 if ("$ENV{OPJ_DO_SUBMIT}" STREQUAL "1")
        ctest_submit()
 endif()
-#ctest_empty_binary_directory( "${CTEST_BINARY_DIRECTORY}" )
+ctest_empty_binary_directory( "${CTEST_BINARY_DIRECTORY}" )