Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/UG4/ugcore
Browse files Browse the repository at this point in the history
  • Loading branch information
LogashenkoDL committed Sep 25, 2020
2 parents 3a9a87d + f6ba58d commit c4a70a0
Show file tree
Hide file tree
Showing 6 changed files with 612 additions and 359 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ before_install:
# installing ccache and freetype packages via homebrew
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install ccache; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXXFLAGS="-stdlib=libc++"; fi
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export CXXFLAGS="-stdlib=libc++"; fi

# prepare compilation
before_script:
Expand Down
50 changes: 27 additions & 23 deletions cmake/ug/cpp11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -31,29 +31,33 @@
# included from ug_includes.cmake
########################################
# C++11
IF(CXX11)
IF(${CMAKE_CXX_COMPILER_ID} MATCHES GNU|Clang|Intel)
# Check for the compilers's C++11 capabilities
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_CXX0X)
# since GCC4.7 (c++0x will be removed in future versions of GCC)
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_CXX11)
# Add appropriate compiler flags
IF(HAVE_CXX11)
SET(CXX11_FLAG "-std=c++11")
ELSEIF(HAVE_CXX0X)
SET(CXX11_FLAG "-std=c++0x")
ENDIF()

IF(CXX11_FLAG)
ADD_DEFINITIONS(-DUG_CXX11)
add_cpp_flag(${CXX11_FLAG})
MESSAGE(STATUS "Info: C++11 enabled. (flag: ${CXX11_FLAG})")
ELSE()
SET(CXX11 OFF)
MESSAGE(STATUS "Info: Compiler does not support C++11 standard.")
ENDIF()
IF ("${CMAKE_VERSION}" VERSION_LESS 3.1)

IF(${CMAKE_CXX_COMPILER_ID} MATCHES GNU|Clang|Intel|PGI)
# Check for the compilers's C++11 capabilities
INCLUDE(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG(-std=c++0x HAVE_CXX0X)
CHECK_CXX_COMPILER_FLAG(-std=c++11 HAVE_CXX11)
# Add appropriate compiler flags
IF(HAVE_CXX11)
SET(CXX11_FLAG "-std=c++11")
ELSEIF(HAVE_CXX0X)
SET(CXX11_FLAG "-std=c++0x")
ENDIF()
IF(CXX11_FLAG)
add_cpp_flag(${CXX11_FLAG})
MESSAGE(STATUS "Info: C++11 enabled. (flag: ${CXX11_FLAG})")
ELSE()
MESSAGE(STATUS "Info: Enabling C++11 is currently only supported with GCC, Clang, or Intel")
MESSAGE(FATAL_ERROR "Error: Compiler does not support the C++11 standard.")
ENDIF()
ENDIF(CXX11)
ELSE()
MESSAGE(STATUS "Info: Enabling C++11 is currently only supported with GCC, Clang, Intel,")
MESSAGE(STATUS "Info: and PGI. Continuing with the assumption that the compiler accepts")
MESSAGE(STATUS "Info: C++11 anyway.")
ENDIF()

ELSE("${CMAKE_VERSION}" VERSION_LESS 3.1)
set(CMAKE_CXX_STANDARD 11)
MESSAGE(STATUS "Info: Trying to activate 'CMAKE_CXX_STANDARD 11'")
ENDIF("${CMAKE_VERSION}" VERSION_LESS 3.1)
1 change: 0 additions & 1 deletion cmake/ug_includes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ option(BUILTIN_BLAS "BLAS is built into compiler" OFF)
option(BUILTIN_LAPACK "LAPACK is built into compiler" OFF)
option(BUILTIN_MPI "MPI is built into compiler" OFF)
option(OPENMP "Enables use of OpenMP. Valid options are ON, OFF" OFF)
option(CXX11 "Enables compilation with C++11 standard. Valid options are ON, OFF" ON)
option(EMBEDDED_PLUGINS "Plugin sources are directly included in libug4. No dynamic loading required. Valid options are ON, OFF " OFF)
option(COMPILE_INFO "Embeds information on compile revision and date. Requires relinking of all involved libraries. Valid options are ON, OFF " ${buildCompileInfo})
option(POSIX "If enabled and available, some additional functionality may be available. Valid options are ON, OFF " ${posixDefault})
Expand Down
1 change: 0 additions & 1 deletion scripts/shell/ugcomplete
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ None Shiny Scalasca Vampir \
-DCOMPILE_INFO= \
-DCPU= \
-DCUDA= \
-DCXX11= \
-DDEBUG= \
-DDEBUG_FORMAT= \
-DDEBUG_LOGS= \
Expand Down
Loading

0 comments on commit c4a70a0

Please sign in to comment.