diff options
author | Michael Stürmer <michael.stuermer@schaeffler.com> | 2016-12-12 13:52:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-12-15 14:16:30 (GMT) |
commit | 5c6c0344d32f9282059d46b6fe6f9925ac1f1202 (patch) | |
tree | fc9ce79ea985322807b73cbcd30bcc5cff5ce24d /Modules/CMakeDetermineCompilerId.cmake | |
parent | 3874843f0f5be9d53001517b3697e0d092f0e845 (diff) | |
download | CMake-5c6c0344d32f9282059d46b6fe6f9925ac1f1202.zip CMake-5c6c0344d32f9282059d46b6fe6f9925ac1f1202.tar.gz CMake-5c6c0344d32f9282059d46b6fe6f9925ac1f1202.tar.bz2 |
C# support: add compiler detection for MSVC
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index c5a2bcb..eae139d 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -164,6 +164,10 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS} set(v Intel) set(ext vfproj) set(id_cl ifort.exe) + elseif(lang STREQUAL CSharp) + set(v 10) + set(ext csproj) + set(id_cl csc.exe) elseif(NOT "${vs_version}" VERSION_LESS 10) set(v 10) set(ext vcxproj) @@ -447,8 +451,12 @@ function(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file) set(SIMULATE_ID) set(SIMULATE_VERSION) file(STRINGS ${file} - CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 38 REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]") + CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 38 + ${CMAKE_${lang}_COMPILER_ID_STRINGS_PARAMETERS} + REGEX "INFO:[A-Za-z0-9_]+\\[[^]]*\\]") set(COMPILER_ID_TWICE) + # In C# binaries, some strings are found more than once. + list(REMOVE_DUPLICATES CMAKE_${lang}_COMPILER_ID_STRINGS) foreach(info ${CMAKE_${lang}_COMPILER_ID_STRINGS}) if("${info}" MATCHES "INFO:compiler\\[([^]\"]*)\\]") if(COMPILER_ID) |