Skip to content

Commit 4d767e7

Browse files
authored
CMake: Fix choosing SWIG via env variable (#2100)
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.
1 parent d0e8853 commit 4d767e7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ endif()
9595

9696
if(DEFINED ENV{SWIG})
9797
message(STATUS "Setting SWIG_EXECUTABLE to $ENV{SWIG} ($SWIG)")
98+
unset(SWIG_VERSION CACHE)
99+
unset(SWIG_DIR CACHE)
98100
set(SWIG_EXECUTABLE $ENV{SWIG})
99101
endif()
100102

0 commit comments

Comments
 (0)