gradle / gradle-native

The home of Gradle's support for natively compiled languages
https://blog.gradle.org/introducing-the-new-cpp-plugins
Apache License 2.0
93 stars 8 forks source link

VS2008 ToolChain is not recognized #744

Closed zosrothko closed 6 years ago

zosrothko commented 6 years ago

Building Poco with VisualStudio VS2008

Expected Behavior

A complete build without any exception/error

Current Behavior

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task :CppParser:compileCppParserWin32DebugSemiStaticLibraryCppParserCpp.
> No tool chain is available to build for platform 'win32':
    - Tool chain 'VS2008' (Visual Studio): The specified installation directory 
'C:\Program Files (x86)\Microsoft Visual Studio 9.0' 
does not appear to contain a Visual Studio installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log
 output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 48s
3 actionable tasks: 2 executed, 1 up-to-date

Context

Here the content of the VS2008 directory

Directory of C:\Program Files (x86)\Microsoft Visual Studio 9.0

05/03/2018  04:55 AM    <DIR>          .
05/03/2018  04:55 AM    <DIR>          ..
05/03/2018  04:02 AM    <DIR>          Common7
05/03/2018  04:02 AM    <DIR>          DIA SDK
05/03/2018  04:12 AM    <DIR>          Microsoft Visual Studio 2008 Professional Edition - ENU
10/26/2007  05:54 PM            48,311 readme.htm
10/16/2007  06:56 PM            15,967 redist.txt
05/04/2018  11:54 PM    <DIR>          ReportViewer
05/03/2018  04:02 AM    <DIR>          Samples
05/03/2018  04:02 AM    <DIR>          SDK
05/03/2018  04:03 AM    <DIR>          Setup
05/03/2018  04:12 AM    <DIR>          sqlserver
05/03/2018  04:02 AM    <DIR>          VB
05/03/2018  04:03 AM    <DIR>          VC
05/03/2018  04:02 AM    <DIR>          VC#
05/03/2018  04:02 AM    <DIR>          Visual Studio Tools for Office
05/03/2018  04:02 AM    <DIR>          Xml

Steps to Reproduce (for bugs)

Buikld a cpp sample project with VS2008

Your Environment

lacasseio commented 6 years ago

Unfortunately, Visual Studio 2008 isn't supported by Gradle. We support Visual Studio 2010 as the lowest version at the moment. We hope to open up the tool chain definition soon which would allow for third-party support of older Visual Studio compilers.

The fix for VS2008 support should be simple and could be added as part of a PR, however, you have to understand that we would need to modify our testing infrastructure to allow VS2008 testing which may not be as trivial and would add maintenance burden.

We will close this issue. If you want to provide a PR to support VS2008, then we will create an issue for adding VS2008 support.