summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-18 13:03:50 (GMT)
committerBrad King <brad.king@kitware.com>2018-07-18 13:03:50 (GMT)
commit4436be337d6a1c54df4318a037a4f2ccf2e54f9b (patch)
treed6cec05573c808cd23db99ac651cb6fc9a47333c
parent59af434946950ca7206551ab8c9867af6de9e1db (diff)
parented289e05772529051361fc2ee1cbe6e47c68f2f7 (diff)
downloadCMake-4436be337d6a1c54df4318a037a4f2ccf2e54f9b.zip
CMake-4436be337d6a1c54df4318a037a4f2ccf2e54f9b.tar.gz
CMake-4436be337d6a1c54df4318a037a4f2ccf2e54f9b.tar.bz2
Merge branch 'UseSWIG-csharp-conditional' into release-3.12
Merge-request: !2219
-rw-r--r--Modules/UseSWIG.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index b306181..b74ba9f 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -294,7 +294,7 @@ function(SWIG_GET_EXTRA_OUTPUT_FILES language outfiles generatedpath infile)
endif()
foreach(it ${SWIG_${language}_EXTRA_FILE_EXTENSIONS})
set(extra_file "${generatedpath}/${module_basename}${it}")
- if (extra_file MATCHES "\\.cs$")
+ if (extra_file MATCHES "\\.cs$" AND CMAKE_CSharp_COMPILER_LOADED)
set_source_files_properties(${extra_file} PROPERTIES LANGUAGE "CSharp")
else()
# Treat extra outputs as plain files regardless of language.