Skip to content

Commit 6d1da52

Browse files
authored
Only add GCC Clang warnings options in GCC/Clang
1 parent c606b7b commit 6d1da52

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

CMakeLists.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,11 @@ set(${PROJECT_NAME}_HEADERS
9090
include/${PROJECT_NAME}/eiquadprog-utils.hxx)
9191

9292
add_library(${PROJECT_NAME} src/eiquadprog-fast.cpp src/eiquadprog.cpp)
93-
target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-sign-conversion"
94-
)# We have a lot of implicit size_t to Eigen::Index conversions
93+
94+
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
95+
# We have a lot of implicit size_t to Eigen::Index conversions
96+
target_compile_options(${PROJECT_NAME} PRIVATE "-Wno-sign-conversion")
97+
endif()
9598

9699
if(TRACE_SOLVER)
97100
target_compile_definitions(${PROJECT_NAME} PRIVATE EIQGUADPROG_TRACE_SOLVER)

0 commit comments

Comments
 (0)