Skip to content

Commit

Permalink
Vulkan Spirit - initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DTolm committed Aug 7, 2020
1 parent d51873b commit a1c3fbd
Show file tree
Hide file tree
Showing 1,249 changed files with 452,154 additions and 41,085 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ environment:
configuration: Release
QTDIR: "C:\\Qt\\5.10.1\\msvc2017_64"
PYTHON: "C:\\Python36-x64"
CMAKE_OPTIONS: "-DUI_CXX_USE_QT=OFF -DSPIRIT_ENABLE_PINNING=ON -DSPIRIT_ENABLE_DEFECTS=ON"
CMAKE_OPTIONS: "-DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_ENABLE_PINNING=ON -DSPIRIT_ENABLE_DEFECTS=ON"
EXCLUDETESTS:
PYPI:

Expand Down
7 changes: 4 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ input_*

### Executables and Libraries ###
/spirit
spirit.js
spirit.js.mem
spirit.wasm
libSpirit.js
libSpirit.js.mem
libSpirit.wasm
libSpirit.wast

### Generated Files
core/python/LICENSE.txt
Expand Down
79 changes: 43 additions & 36 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: required
dist: trusty
dist: bionic
language: cpp


Expand All @@ -25,99 +25,105 @@ matrix:
env: CMAKE_OPTIONS="-DUSER_PATH_QT=~/usr/local/Cellar/qt/5.11.0" PYPI=true
# Linux, GCC 6
- os: linux
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DUSER_PATH_QT=~/opt/qt57" PYPI=true
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DUSER_PATH_QT=~/opt/qt511" PYPI=true
compiler: g++
addons:
apt:
packages:
- g++-6
- qt57base
- qt57charts-no-lgpl
- qt511base
- qt511charts-no-lgpl
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'
# Linux, GCC 5
- os: linux
env: COMPILER_C=gcc-5 COMPILER_CXX=g++-5 CMAKE_OPTIONS="-DUSER_PATH_QT=~/opt/qt57" PYPI=false
env: COMPILER_C=gcc-5 COMPILER_CXX=g++-5 CMAKE_OPTIONS="-DUSER_PATH_QT=~/opt/qt511" PYPI=false
compiler: g++
addons:
apt:
packages:
- g++-5
- qt57base
- qt57charts-no-lgpl
- qt511base
- qt511charts-no-lgpl
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'
# Linux, GCC 6 CUDA build
- os: linux
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 RUNTESTS=false USE_CUDA=true CMAKE_OPTIONS="-DUI_CXX_USE_QT=OFF -DSPIRIT_USE_CUDA=ON -DSPIRIT_CUDA_ARCH=sm_70" PYPI=false
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 RUNTESTS=false USE_CUDA=true CMAKE_OPTIONS="-DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_USE_CUDA=ON -DSPIRIT_CUDA_ARCH=sm_70" PYPI=false
compiler: g++
addons:
apt:
packages:
- g++-6
- qt57base
- qt57charts-no-lgpl
- qt511base
- qt511charts-no-lgpl
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'
# Linux, GCC 6 OpenMP build
- os: linux
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 OMP_NUM_THREADS=4 CMAKE_OPTIONS="-DUI_CXX_USE_QT=OFF -DSPIRIT_USE_OPENMP=ON" PYPI=false
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 OMP_NUM_THREADS=4 CMAKE_OPTIONS="-DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_USE_OPENMP=ON" PYPI=false
compiler: g++
addons:
apt:
packages:
- g++-6
- qt57base
- qt57charts-no-lgpl
- qt511base
- qt511charts-no-lgpl
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'
# Linux, GCC 6 pinning and defects build
- os: linux
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DUI_CXX_USE_QT=OFF -DSPIRIT_ENABLE_PINNING=ON -DSPIRIT_ENABLE_DEFECTS=ON" PYPI=false
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_ENABLE_PINNING=ON -DSPIRIT_ENABLE_DEFECTS=ON" PYPI=false
compiler: g++
addons:
apt:
packages:
- g++-6
- qt57base
- qt511base
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'
# Linux, GCC 6 coverage build
- os: linux
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DUI_CXX_USE_QT=OFF -DSPIRIT_TEST_COVERAGE=ON" PYPI=false COVERAGE=true RUNTESTS=false
env: COMPILER_C=gcc-6 COMPILER_CXX=g++-6 CMAKE_OPTIONS="-DSPIRIT_UI_CXX_USE_QT=OFF -DSPIRIT_TEST_COVERAGE=ON" PYPI=false COVERAGE=true RUNTESTS=false
compiler: g++
addons:
apt:
packages:
- g++-6
- lcov
- qt57base
- qt511base
- ca-certificates
- python2.7
- mesa-common-dev
sources:
- sourceline: 'ppa:ubuntu-toolchain-r/test'
- sourceline: 'ppa:beineri/opt-qt571-trusty'
- sourceline: 'ppa:jonathonf/python-2.7'
- sourceline: 'ppa:beineri/opt-qt-5.11.1-bionic'
# - sourceline: 'ppa:jonathonf/python-2.7'

# - compiler: clang
# addons:
Expand All @@ -143,7 +149,7 @@ before_install:
- python --version
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then sudo pip uninstall -y six chardet pyOpenSSL; fi
- sudo pip install --upgrade pip six pyOpenSSL
- sudo pip install wheel numpy urllib3==1.23 twine coveralls
- sudo pip install wheel numpy urllib3==1.23 twine coveralls chardet
# Run homebrew on osx
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
# Setup default versions and override compiler if needed
Expand All @@ -157,7 +163,7 @@ before_install:
mkdir cmake && travis_retry wget --no-check-certificate --quiet -O - ${CMAKE_URL} | tar --strip-components=1 -xz -C cmake
export PATH=${DEPS_DIR}/cmake/bin:${PATH}
export CC=${COMPILER_C} CXX=${COMPILER_CXX}
source /opt/qt57/bin/qt57-env.sh
source /opt/qt511/bin/qt511-env.sh
else
if ! brew ls --version cmake &>/dev/null; then brew install cmake; fi
brew install cppcheck qt
Expand All @@ -168,9 +174,10 @@ before_install:
- |
if [[ "$USE_CUDA" == "true" ]]; then
export CUDA=10.1.105-1
# get cuda-repo-ubuntu1404
travis_retry wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_${CUDA}_amd64.deb
travis_retry sudo dpkg -i cuda-repo-ubuntu1404_${CUDA}_amd64.deb
# get cuda-repo-ubuntu1804
travis_retry wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_${CUDA}_amd64.deb
travis_retry sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
travis_retry sudo dpkg -i cuda-repo-ubuntu1804_${CUDA}_amd64.deb
# install
travis_retry sudo apt-get update -qq
export CUDA_APT=${CUDA:0:4}
Expand Down Expand Up @@ -200,7 +207,7 @@ install:
before_script:
# Test everything
# Do not run this section if flag was set to false
- if [ "$RUNTESTS" != "false" ]; then ./ctest.sh; fi
- if [ "$RUNTESTS" != "false" ]; then travis_wait ./ctest.sh; fi


script:
Expand Down Expand Up @@ -244,7 +251,7 @@ script:
# Run C++ coverage report generation and upload to codecov
- cd ../../build
- if [ "$COVERAGE" == "true" ]; then lcov -c -i --no-external --directory . --base-directory ../core -o baseline.info; fi
- if [ "$COVERAGE" == "true" ]; then make test; fi
- if [ "$COVERAGE" == "true" ]; then travis_wait make test; fi
- if [ "$COVERAGE" == "true" ]; then lcov -c --no-external --directory . --base-directory ../core -o after_test.info; fi
- if [ "$COVERAGE" == "true" ]; then lcov -a baseline.info -a after_test.info -o total_test.info; fi
- if [ "$COVERAGE" == "true" ]; then lcov -r total_test.info \*thirdparty\* \*/test/\* \*Collection\* \*DLL_\* -o coverage.info; fi
Expand Down
42 changes: 21 additions & 21 deletions CMake/ChooseCompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,31 @@ MESSAGE( STATUS ">> ------------------------------------------------------------
MESSAGE( STATUS ">> --------------------- ChooseCompiler.cmake ------------------------- <<" )
######## UI Web - this means we need emcc ###########################
if (SPIRIT_BUILD_FOR_JS)
###
MESSAGE( STATUS ">> Choosing compiler: emcc" )
### Set the path to emscripten
SET(EMSCRIPTEN_ROOT_PATH "/usr/local/emsdk_portable/emscripten/1.35.0/")
### Use the Emscripten toolchain file
SET(CMAKE_TOOLCHAIN_FILE Emscripten)
###
MESSAGE( STATUS ">> Choosing compiler: emcc" )
### Set the path to emscripten
SET(EMSCRIPTEN_ROOT_PATH "/usr/local/emsdk/emscripten/1.38.29/")
### Use the Emscripten toolchain file
SET(CMAKE_TOOLCHAIN_FILE Emscripten)
######################################################################


######## Otherwise we can choose freely ##############################
else()
if ( USER_COMPILER_C AND USER_COMPILER_CXX AND USER_PATH_COMPILER )
MESSAGE( STATUS ">> User C compiler: " ${USER_COMPILER_C} )
MESSAGE( STATUS ">> User CXX compiler: " ${USER_COMPILER_CXX} )
MESSAGE( STATUS ">> User compiler path: " ${USER_PATH_COMPILER} )
if (APPLE OR UNIX)
set(CMAKE_C_COMPILER ${USER_PATH_COMPILER}/${USER_COMPILER_C})
set(CMAKE_CXX_COMPILER ${USER_PATH_COMPILER}/${USER_COMPILER_CXX})
elseif (WIN32)
### By default we use VS
MESSAGE( STATUS ">> User compiler: MSVC" )
MESSAGE( STATUS ">> Choosing a different compiler is not yet implemented for Windows" )
endif()
MESSAGE( STATUS ">> Letting CMake choose the compilers..." )
endif()
if ( USER_COMPILER_C AND USER_COMPILER_CXX AND USER_PATH_COMPILER )
MESSAGE( STATUS ">> User C compiler: " ${USER_COMPILER_C} )
MESSAGE( STATUS ">> User CXX compiler: " ${USER_COMPILER_CXX} )
MESSAGE( STATUS ">> User compiler path: " ${USER_PATH_COMPILER} )
if (APPLE OR UNIX)
set(CMAKE_C_COMPILER ${USER_PATH_COMPILER}/${USER_COMPILER_C})
set(CMAKE_CXX_COMPILER ${USER_PATH_COMPILER}/${USER_COMPILER_CXX})
elseif (WIN32)
### By default we use VS
MESSAGE( STATUS ">> User compiler: MSVC" )
MESSAGE( STATUS ">> Choosing a different compiler is not yet implemented for Windows" )
endif()
MESSAGE( STATUS ">> Letting CMake choose the compilers..." )
endif()
######################################################################

######## The End #####################################################
Expand All @@ -35,4 +35,4 @@ endif()
MESSAGE( STATUS ">> CMAKE_C_COMPILER: " ${CMAKE_C_COMPILER} )
MESSAGE( STATUS ">> CMAKE_CXX_COMPILER: " ${CMAKE_CXX_COMPILER} )
MESSAGE( STATUS ">> --------------------- ChooseCompiler.cmake done -------------------- <<" )
MESSAGE( STATUS ">> -------------------------------------------------------------------- <<" )
MESSAGE( STATUS ">> -------------------------------------------------------------------- <<" )
90 changes: 0 additions & 90 deletions CMake/CompilerFlags.cmake

This file was deleted.

Loading

0 comments on commit a1c3fbd

Please sign in to comment.