Skip to content

Commit

Permalink
Do not throw up when the requested C/C++ version is beyond Visual Stu…
Browse files Browse the repository at this point in the history
…dio's capabilities

Fixes #54
  • Loading branch information
RobDangerous committed Mar 1, 2024
1 parent 7ea9609 commit 0551ef1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
6 changes: 4 additions & 2 deletions kmake/src/Exporters/VisualStudioExporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,8 @@ export class VisualStudioExporter extends Exporter {
return 'stdc17';
case 'gnu2x':
case 'c2x':
throw 'C 2x is not yet supported in Visual Studio';
log.info('C 2x is not yet supported in Visual Studio, using stdc17.');
return 'stdc17';
default:
throw 'Unknown C-version'
}
Expand Down Expand Up @@ -592,7 +593,8 @@ export class VisualStudioExporter extends Exporter {
case 'c++2b':
case 'gnu++23':
case 'c++23':
throw 'C++ 23 is not yet supported in Visual Studio';
log.info('C++ 23 is not yet supported in Visual Studio, using stdcpplatest.');
return 'stdcpplatest';
default:
throw 'Unknown C++-version'
}
Expand Down
6 changes: 4 additions & 2 deletions lib/kmake/Exporters/VisualStudioExporter.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/kmake/Exporters/VisualStudioExporter.js.map

Large diffs are not rendered by default.

0 comments on commit 0551ef1

Please sign in to comment.