File tree Expand file tree Collapse file tree 3 files changed +11
-19
lines changed
Expand file tree Collapse file tree 3 files changed +11
-19
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
1515OPTION (LIBTINS_BUILD_EXAMPLES "Build examples" ON )
1616OPTION (LIBTINS_BUILD_TESTS "Build tests" ON )
1717
18+
1819# Compile in release mode by default
1920IF (NOT CMAKE_BUILD_TYPE )
2021 MESSAGE (STATUS "Setting build type to 'RelWithDebInfo' as none was specified." )
@@ -28,6 +29,10 @@ project(
2829 LANGUAGES CXX
2930)
3031
32+ if (DEFINED ENV{VERBOSE})
33+ set (CMAKE_VERBOSE_MAKEFILE ON )
34+ endif ()
35+
3136# Check the thread library info early as setting compiler flags seems to
3237# interfere with the detection and causes CMAKE_THREAD_LIBS_INIT to not
3338# include -lpthread when it should.
@@ -76,9 +81,10 @@ SET(TINS_VERSION_MINOR 6)
7681SET (TINS_VERSION_PATCH 0)
7782SET (LIBTINS_VERSION "${TINS_VERSION_MAJOR} .${TINS_VERSION_MINOR} " )
7883
79- set (CMAKE_CXX_STANDARD 14 )
84+ set (CMAKE_CXX_STANDARD 11 )
8085set (CMAKE_CXX_STANDARD_REQUIRED ON )
81- set (CMAKE_CXX_EXTENSIONS ON )
86+ set (CMAKE_CXX_EXTENSIONS OFF )
87+ MESSAGE (STATUS "Using C++ STD version '${CMAKE_CXX_STANDARD} '" )
8288
8389if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)
8490 set (CLANG_DEFAULT_CXX_STDLIB libc++)
Original file line number Diff line number Diff line change @@ -52,20 +52,6 @@ endif ()
5252
5353#cmake_minimum_required(VERSION 2.8.3)
5454
55- #
56- ### Check for needed compiler flags
57- #
58- include (CheckCXXCompilerFlag )
59- check_cxx_compiler_flag ("-std=c++11" _HAS_CXX11_FLAG )
60- if (NOT _HAS_CXX11_FLAG)
61- check_cxx_compiler_flag ("-std=c++0x" _HAS_CXX0X_FLAG )
62- endif ()
63-
64- if (_HAS_CXX11_FLAG)
65- set (CXX11_COMPILER_FLAGS "-std=c++11" )
66- elseif (_HAS_CXX0X_FLAG)
67- set (CXX11_COMPILER_FLAGS "-std=c++0x" )
68- endif ()
6955
7056function (cxx11_check_feature FEATURE_NAME RESULT_VAR )
7157 if (NOT DEFINED ${RESULT_VAR} )
Original file line number Diff line number Diff line change @@ -10,9 +10,8 @@ install_command = pip install {opts} {packages}
1010
1111[testenv:tools]
1212setenv =
13- CFLAGS = -march =native -O2 -g -DNDEBUG
14- CXXFLAGS = {env:CFLAGS:-march =native -O2 -g -DNDEBUG}
15- LDFLAGS = {env:CFLAGS:-march =native -O2 -g -DNDEBUG} -Wl,-O1 -Wl,--as-needed
13+ CC = {env:CC:gcc}
14+ CXX = {env:CXX:g++}
1615 PREFIX = {env:PREFIX:{envdir}}
1716
1817passenv =
@@ -28,6 +27,7 @@ passenv =
2827 HOME
2928 USERNAME
3029 USER
30+ VERBOSE
3131 CI
3232 XDG_*
3333 GITHUB*
You can’t perform that action at this time.
0 commit comments