Skip to content

Commit 2712ae6

Browse files
committed
Fix CMake CMP0167 Warning
When I was building the source code of msgpack-c, I encountered a CMP0167 warning. Although it did not affect the code building process, it was a minor flaw. I believed that adding CONFIG to `find_package(Boost REQUIRED)` could solve the issue. Therefore, I organized the code repository and fixed this minor issue.
1 parent a0b2ec0 commit 2712ae6

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ IF (MSGPACK_USE_BOOST)
7979
SET (Boost_USE_STATIC_LIBS FALSE)
8080
ENDIF ()
8181

82-
FIND_PACKAGE (Boost REQUIRED)
82+
FIND_PACKAGE (Boost REQUIRED CONFIG)
8383
ELSE ()
8484
TARGET_COMPILE_DEFINITIONS(msgpack-cxx INTERFACE MSGPACK_NO_BOOST)
8585
ENDIF ()

example/boost/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FIND_PACKAGE (Boost REQUIRED)
1+
FIND_PACKAGE (Boost REQUIRED CONFIG)
22
FIND_PACKAGE (Threads REQUIRED)
33
FIND_PACKAGE (ZLIB REQUIRED)
44

example/cpp03/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FIND_PACKAGE (Threads REQUIRED)
22

3-
FIND_PACKAGE (Boost COMPONENTS timer)
3+
FIND_PACKAGE (Boost COMPONENTS timer CONFIG)
44

55
LIST (APPEND exec_PROGRAMS
66
class_intrusive.cpp

example/x3/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
IF (MSGPACK_USE_X3_PARSE AND MSGPACK_DEFAULT_API_VERSION VERSION_GREATER 1)
2-
FIND_PACKAGE (Boost REQUIRED COMPONENTS context)
2+
FIND_PACKAGE (Boost REQUIRED COMPONENTS context CONFIG)
33
FIND_PACKAGE (Threads REQUIRED)
44

55
LIST (APPEND exec_PROGRAMS

fuzz/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
FIND_PACKAGE (Threads REQUIRED)
2-
FIND_PACKAGE (Boost REQUIRED COMPONENTS filesystem unit_test_framework)
2+
FIND_PACKAGE (Boost REQUIRED COMPONENTS filesystem unit_test_framework CONFIG)
33

44
LIST (APPEND check_PROGRAMS
55
regression_runner.cpp

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FIND_PACKAGE (Threads REQUIRED)
22
FIND_PACKAGE (ZLIB)
3-
FIND_PACKAGE (Boost REQUIRED COMPONENTS unit_test_framework)
3+
FIND_PACKAGE (Boost REQUIRED COMPONENTS unit_test_framework CONFIG)
44

55
LIST (APPEND check_PROGRAMS
66
array_ref.cpp

0 commit comments

Comments
 (0)