Skip to content

Commit

Permalink
Do not run try_compile if OSQP_IS_V1 is already defined (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Aug 1, 2023
1 parent 957f92e commit 4471dbd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmake/OsqpEigenDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ include(OsqpEigenFindOptionalDependencies)
## Required Dependencies
find_package(Eigen3 3.2.92 REQUIRED)
find_package(osqp REQUIRED)
try_compile(OSQP_IS_V1 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/try-osqp.cpp LINK_LIBRARIES osqp::osqp)
if(NOT DEFINED OSQP_IS_V1)
try_compile(OSQP_IS_V1 ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_LIST_DIR}/try-osqp.cpp LINK_LIBRARIES osqp::osqp)
endif()

#---------------------------------------------
## Optional Dependencies
Expand Down

0 comments on commit 4471dbd

Please sign in to comment.