Skip to content

Commit

Permalink
Use next(iter()) to evaluate casadi search paths
Browse files Browse the repository at this point in the history
Co-authored-by: Saransh Chopra <[email protected]>
  • Loading branch information
2 people authored and js1tr3 committed Aug 12, 2024
1 parent 2701a33 commit 00497c3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ endif()
# to find the path for the build-time dependency, not the run-time dependency.
execute_process(
COMMAND "${PYTHON_EXECUTABLE}" -c
"import importlib.util; print(importlib.util.find_spec('casadi').submodule_search_locations[0])"
"import importlib.util; print(next(iter(importlib.util.find_spec('casadi').submodule_search_locations)))"
OUTPUT_VARIABLE CASADI_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)

Expand Down

0 comments on commit 00497c3

Please sign in to comment.