nanoant / CMakePCHCompiler

CMake precompiled header support via custom PCH compiler extension
MIT License
103 stars 20 forks source link

Minimal support for multi-language projects #31

Closed embeddedteam103 closed 5 years ago

embeddedteam103 commented 5 years ago

Partially resolves #27: The function now tries to detect the language to use for compilation from the arguments passed, using the following logic:

if we are reusing the pch:
     get the language from the already built target
else #we are defining the pch
    if explicit `TYPE` argument passed
        use the language specified by `TYPE`
    else #detect the language from the project - the old behaviour
        if single language project
            use this single language
        else
            warning + set language to cxx (same behaviour as before)

This is the most minmal way to support multiple languages