summaryrefslogtreecommitdiffstats
path: root/Modules/UseSWIG.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-19 11:08:19 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-19 11:08:31 (GMT)
commit018c373f35501196af8d27bdcd23488ccf8feb9d (patch)
tree52d9b95f4efb4b917ef0739f64793b800fbed88c /Modules/UseSWIG.cmake
parenta35eafdb22a16255a73a8a5770dbab3b55d50d0e (diff)
parented289e05772529051361fc2ee1cbe6e47c68f2f7 (diff)
downloadCMake-018c373f35501196af8d27bdcd23488ccf8feb9d.zip
CMake-018c373f35501196af8d27bdcd23488ccf8feb9d.tar.gz
CMake-018c373f35501196af8d27bdcd23488ccf8feb9d.tar.bz2
Merge topic 'UseSWIG-csharp-conditional'
ed289e0577 UseSWIG: Use CSharp language only if it is enabled Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Ram-Z <me@rmz.io> Acked-by: Marc Chevrier <marc.chevrier@gmail.com> Merge-request: !2219
Diffstat (limited to 'Modules/UseSWIG.cmake')
-rw-r--r--Modules/UseSWIG.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/UseSWIG.cmake b/Modules/UseSWIG.cmake
index 8424a9f..7460932 100644
--- a/Modules/UseSWIG.cmake
+++ b/Modules/UseSWIG.cmake
@@ -308,7 +308,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.