Fix #98 - Build broken using CMake 2.8.8.

As per the CMake docs, LANGUAGE is only to be set for files that are actually compiled. In versions prior to 2.8.7, setting it globally worked fine nevertheless.
This commit is contained in:
David Nadlinger
2012-05-25 19:07:57 +02:00
parent 1805e534b2
commit 8dea63e8a8

View File

@@ -224,10 +224,13 @@ set(LDC_SOURCE_FILES
${GEN_SRC}
${IR_SRC}
)
set_source_files_properties(
${LDC_SOURCE_FILES} PROPERTIES
LANGUAGE CXX
)
# DMD source files have a .c extension, but are actually C++ code.
foreach(file ${LDC_SOURCE_FILES})
if(file MATCHES ".*\\.c$")
set_source_files_properties(${file} PROPERTIES LANGUAGE CXX)
endif()
endforeach()
#
# Includes, defines.