From cc4e3fbcb952dcd456d41b24d0e978b0ec27623f Mon Sep 17 00:00:00 2001 From: matta adrien <matta@lpccaen.in2p3.fr> Date: Tue, 11 Oct 2016 11:10:54 +0200 Subject: [PATCH] * Fixing cmake error on NPA --- .travis.yml | 19 +++++-------------- .../CMake/NPTool_CMake_Preamble.cmake | 2 ++ 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9fefada7f..42abf3d89 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,14 +10,8 @@ compiler: before_install: # Linux -# - if [ ["$TRAVIS_OS_NAME" == "linux"] && ["$CXX" == "g++"] ]; then export CXX="g++-4.8" CC="gcc-4.8"; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"; fi -# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install software-properties-common; fi -# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y ppa:george-edison55/cmake-3.x; fi -# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi -# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install --only-upgrade cmake -qq; fi - - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install root-system -qq; fi -# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get clean; fi +# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"; fi +# - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get -qq install root-system; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then cd && wget https://www.dropbox.com/s/8hxjkd6twdsv5fi/geant4_install_new.tar.gz; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then tar -xf geant4_install_new.tar.gz; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then source ~/geant4_install/share/Geant4-10.1.2/geant4make/geant4make.sh; fi @@ -47,14 +41,11 @@ branches: addons: apt: - sources: - - ubuntu-toolchain-r-test +# sources: +# - ubuntu-toolchain-r-test packages: -# - gcc-4.8 -# - g++-4.8 -# - libexpat1-dev -# - libexpat1 - ninja-build + - root-system #notifications: # email: diff --git a/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake b/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake index fc88e16f7..991233317 100644 --- a/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake +++ b/NPLib/ressources/CMake/NPTool_CMake_Preamble.cmake @@ -49,6 +49,8 @@ elseif(${CMAKE_CXX_FLAGS} MATCHES ".*std=.*0x") set(NOCPPFLAGS false) endif() +include(CheckCXXCompilerFlag) + if(NOCPPFLAGS) CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11) if(COMPILER_SUPPORTS_CXX11 AND NOT nocpp11) -- GitLab