Skip to content

Commit

Permalink
CMake: Fix choosing SWIG via env variable (#2100)
Browse files Browse the repository at this point in the history
Only changing SWIG_EXECUTABLE will lead to inconsistent settings.
Need to unset version and directory, so FindSWIG will try to set
them according to SWIG_EXECUTABLE.
  • Loading branch information
dweindl authored May 22, 2023
1 parent d0e8853 commit 4d767e7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ endif()

if(DEFINED ENV{SWIG})
message(STATUS "Setting SWIG_EXECUTABLE to $ENV{SWIG} ($SWIG)")
unset(SWIG_VERSION CACHE)
unset(SWIG_DIR CACHE)
set(SWIG_EXECUTABLE $ENV{SWIG})
endif()

Expand Down

0 comments on commit 4d767e7

Please sign in to comment.