diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..c78c2b2f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,29 @@ +language: cpp + +branches: + only: + - dev + +before_script: + - cmake --version + - sudo add-apt-repository --yes ppa:dcthomp/smtk + - sudo apt-get update -qq + - sudo dpkg -r cmake cmake-data + - sudo apt-get install cmake # update cmake to 3.x + - cmake --version + - sudo add-apt-repository 'deb http://us.archive.ubuntu.com/ubuntu/ utopic main restricted universe multiverse' + - sudo add-apt-repository 'deb http://us.archive.ubuntu.com/ubuntu/ utopic-updates main restricted universe multiverse' + - sudo apt-get update -qq + - sudo apt-get install freeglut3-dev + - sudo apt-get install libxxf86vm-dev + - sudo apt-get install libglew-dev + - sudo apt-get install libglfw3-dev + - sudo apt-get install xvfb # for GLtests... not working though. + +script: + - cmake --version + - mkdir build && cd build + - cmake -DNO_TBB=1 -DNO_OMP=1 -DNO_CUDA=1 -DNO_OPENCL=1 -DNO_MAYA=1 -DNO_PTEX=1 -DNO_GLTESTS=1 -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ .. + - make + - make test + diff --git a/CMakeLists.txt b/CMakeLists.txt index feff4d55..8f5413a6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -311,6 +311,8 @@ option(NO_OPENCL "Disable OpenCL backend" OFF) option(NO_CLEW "Disable CLEW wrapper library" OFF) option(NO_OPENGL "Disable OpenGL support") option(NO_DX "Disable DirectX support") +option(NO_TESTS "Disable all tests") +option(NO_GLTESTS "Disable GL tests") # Check for dependencies if(NOT NO_OMP) @@ -682,7 +684,7 @@ endmacro() #------------------------------------------------------------------------------- # Build targets -if (NOT NO_TEST) +if (NOT NO_TESTS) enable_testing() endif() diff --git a/examples/glImaging/CMakeLists.txt b/examples/glImaging/CMakeLists.txt index d49ab8a3..81002ef5 100644 --- a/examples/glImaging/CMakeLists.txt +++ b/examples/glImaging/CMakeLists.txt @@ -74,4 +74,7 @@ target_link_libraries(glImaging install(TARGETS glImaging DESTINATION "${CMAKE_BINDIR_BASE}") -add_test(glImaging ${EXECUTABLE_OUTPUT_PATH}/glImaging -w test -l 3 -s 256 256 -a) +if (NOT NO_GLTESTS) + add_test(glImaging ${EXECUTABLE_OUTPUT_PATH}/glImaging -w test -l 3 -s 256 256 -a) +endif() + diff --git a/regression/osd_regression/CMakeLists.txt b/regression/osd_regression/CMakeLists.txt index e6555326..fb372eb6 100644 --- a/regression/osd_regression/CMakeLists.txt +++ b/regression/osd_regression/CMakeLists.txt @@ -63,4 +63,7 @@ target_link_libraries(osd_regression install(TARGETS osd_regression DESTINATION "${CMAKE_BINDIR_BASE}") -add_test(osd_regression ${EXECUTABLE_OUTPUT_PATH}/osd_regression) + +if (NOT NO_GLTESTS) + add_test(osd_regression ${EXECUTABLE_OUTPUT_PATH}/osd_regression) +endif()