Skip to content

Commit 6b6a05e

Browse files
authored
Merge pull request #924 from VorpalBlade/feature/boost-timer-optional
Implement issue #923: Make boost timer optional
2 parents 44aa90e + 6c8ec25 commit 6b6a05e

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ OPTION (MSGPACK_BUILD_EXAMPLES "Build msgpack examples." ON)
8383

8484
SET (Boost_USE_MULTITHREADED ON)
8585
SET (Boost_USE_STATIC_RUNTIME OFF)
86-
FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono system timer)
86+
FIND_PACKAGE (Boost REQUIRED COMPONENTS chrono system OPTIONAL_COMPONENTS timer)
8787

8888
INCLUDE_DIRECTORIES (
8989
${Boost_INCLUDE_DIRS}

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ build_script:
4848
cd ..
4949
cd ..
5050
if ($env:msvc -ne '"Visual Studio 14 2015"') {
51-
((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono system timer", "") | Set-Content -Path CMakeLists.txt
51+
((Get-Content CMakeLists.txt) -replace "COMPONENTS chrono system OPTIONAL_COMPONENTS timer", "") | Set-Content -Path CMakeLists.txt
5252
}
5353
md build
5454
cd build

example/cpp03/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,12 @@ IF (NOT MSVC)
2222
)
2323
ENDIF ()
2424

25-
LIST (APPEND with_boost_lib_PROGRAMS
26-
speed_test.cpp
27-
speed_test_nested_array.cpp
28-
)
25+
if (Boost_TIMER_LIBRARY)
26+
LIST (APPEND with_boost_lib_PROGRAMS
27+
speed_test.cpp
28+
speed_test_nested_array.cpp
29+
)
30+
endif()
2931

3032
FOREACH (source_file ${exec_PROGRAMS})
3133
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)

0 commit comments

Comments
 (0)