Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 330978e

Browse files
committed
[cmake] treat eigen and caffe2 includes as system
Eigen and Caffe2 are treating signedness loosely, which leads to numerous warnings coming from their headers when compiling with "-Wall". Mark includes from both Eigen and Caffe2 as SYSTEM in cmake to silence the warnings triggered by those files as we are not in charge of fixing them.
1 parent b93d260 commit 330978e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -315,8 +315,8 @@ if (WITH_CAFFE2 AND WITH_CUDA)
315315
message(STATUS "Found, CAFFE2_INCLUDE_DIR: " ${CAFFE2_INCLUDE_DIR})
316316

317317
add_definitions(-DCAFFE2_USE_GOOGLE_GLOG)
318-
include_directories(AFTER ${EIGEN_INCLUDE_DIR})
319-
include_directories(AFTER ${CAFFE2_INCLUDE_DIR})
318+
include_directories(AFTER SYSTEM ${EIGEN_INCLUDE_DIR})
319+
include_directories(AFTER SYSTEM ${CAFFE2_INCLUDE_DIR})
320320
add_subdirectory(tc/c2)
321321
add_subdirectory(tc/benchmarks)
322322
add_subdirectory(test/caffe2)

0 commit comments

Comments
 (0)