Skip to content

Commit 8af4880

Browse files
committed
Do not manually build and install swig if not using gcc as the host compiler
1 parent 9d90ea2 commit 8af4880

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

swig/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ if(NOT SWIG_FOUND)
7474
set(SWIG_EXECUTABLE "${swig_SOURCE_DIR}/swig.exe")
7575
set(SWIG_EXECUTABLE "${swig_SOURCE_DIR}/swig.exe" CACHE FILEPATH "Path to SWIG executable")
7676
endif()
77-
else()
77+
# If under linux, and using gcc download, extract, build and install swig
78+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
7879
# Under linux, download the .tar.gz, extract, build and install.
7980
# This must be done at configure time, as FindSwig requires the swig executable.
8081
# FetchContent allows download at configure time, but must use execute_process to run commands at configure time.

0 commit comments

Comments
 (0)