Skip to content

Commit 9b98273

Browse files
committed
Upgrading toolchain in travis and c++ dialect to 17 in build scripts
1 parent b1983b5 commit 9b98273

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ matrix:
2626
- export PATH=/tmp/b2/bin:${PATH}
2727
- cd /tmp/boost && b2 toolset=gcc cxxflags="-std=c++14 ${CXXFLAGS}"
2828
- os: osx
29-
osx_image: xcode9.2
29+
osx_image: xcode9.4
3030
env:
3131
before_install:
3232
- brew upgrade boost cmake

CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ set (Cadmium_VERSION_PATCH 3)
77

88
include(CheckCXXCompilerFlag)
99

10+
set(Boost_USE_MULTITHREADED OFF)
1011
find_package(Boost COMPONENTS unit_test_framework REQUIRED)
1112

1213
add_library(Cadmium INTERFACE)
@@ -16,18 +17,23 @@ include_directories(include ${Boost_INCLUDE_DIRS})
1617
# Check for standard to use
1718
check_cxx_compiler_flag(-std=c++17 HAVE_FLAG_STD_CXX17)
1819
if(HAVE_FLAG_STD_CXX17)
20+
message(STATUS "Using C++17 flag")
1921
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic --std=c++17")
2022
else()
23+
message(STATUS "Using C++1z flag")
2124
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic --std=c++1z")
2225
endif()
2326

27+
28+
#link_libraries(${Boost_EXCEPTION})
29+
2430
enable_testing()
2531
# Unit tests
2632
FILE(GLOB TestSources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} test/*_test.cpp)
2733
foreach(testSrc ${TestSources})
2834
get_filename_component(testName ${testSrc} NAME_WE)
2935
add_executable(${testName} test/main-test.cpp ${testSrc})
30-
target_link_libraries(${testName} ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
36+
target_link_libraries(${testName} PUBLIC ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
3137
add_test(${testName} ${testName})
3238
endforeach(testSrc)
3339

Jamroot.jam

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ project cadmium
1111
<include>$(BOOST_ROOT)
1212
<include>include
1313
<cxxflags>-pedantic
14-
<cxxflags>-std=c++1z
14+
<cxxflags>-std=c++17
1515
: build-dir ./build
1616
;
1717

0 commit comments

Comments
 (0)