Merge pull request #924 from VorpalBlade/feature/boost-timer-optional

Implement issue #923: Make boost timer optional
This commit is contained in:
Takatoshi Kondo
2020-10-19 19:36:17 +09:00
committed by GitHub
3 changed files with 8 additions and 6 deletions

View File

@@ -83,7 +83,7 @@ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples." ON)
SET (Boost_USE_MULTITHREADED ON)
SET (Boost_USE_STATIC_RUNTIME OFF)
FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono system timer)
FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono system OPTIONAL_COMPONENTS timer)
INCLUDE_DIRECTORIES (
${Boost_INCLUDE_DIRS}

View File

@@ -48,7 +48,7 @@ build_script:
cd ..
cd ..
if ($env:msvc -ne '"Visual Studio 14 2015"') {
((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono system timer", "") | Set-Content -Path CMakeLists.txt
((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono system OPTIONAL_COMPONENTS timer", "") | Set-Content -Path CMakeLists.txt
}
md build
cd build

View File

@@ -22,10 +22,12 @@ IF (NOT MSVC)
)
ENDIF ()
LIST (APPEND with_boost_lib_PROGRAMS
speed_test.cpp
speed_test_nested_array.cpp
)
if (Boost_TIMER_LIBRARY)
LIST (APPEND with_boost_lib_PROGRAMS
speed_test.cpp
speed_test_nested_array.cpp
)
endif()
FOREACH (source_file ${exec_PROGRAMS})
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)