@@ -14,22 +14,54 @@ Project {
1414 cpp .enableRtti : false // disable runtime type information for faster build and smaller object files and executable
1515
1616 cpp .minimumWindowsVersion : " 10.0"
17- cpp .generateManifestFile : false
18- cpp .includePaths : ' src'
19- cpp .cxxFlags : [' /analyze' , ' /Zc:char8_t-' ]
20- cpp .defines : [' NOMINMAX' ]
2117 cpp .dynamicLibraries : [' d3d11' , " User32" , " Gdi32" , " Shell32" , " Ole32" , " Comctl32" ]
18+ cpp .includePaths : [' src' ]
2219
2320 Properties {
24- condition: qbs .toolchain .contains (' msvc' )
25- cpp .cxxFlags : outer .concat (
26- " /permissive-" , " /Zc:__cplusplus" , // best C++ compatibilty
21+ condition: qbs .toolchainType == ' msvc'
22+ cpp .generateManifestFile : false
23+ cpp .defines : [' NOMINMAX' ]
24+ cpp .cxxFlags : [
25+ ' /analyze' , ' /Zc:char8_t-' ,
26+ ' /permissive-' , ' /Zc:__cplusplus' , // best C++ compatibilty
2727 " /Zc:inline" , // do not include inline code in object files
2828 " /Zc:throwingNew" , // avoid redundant null checks after new
2929 " /diagnostics:caret" , // better error postions
3030 " /W4" , // enable all warnings
3131 " /experimental:external" , " /external:anglebrackets" , " /external:W0" // ignore warnings from external headers
32- )
32+ ]
33+ }
34+ Properties {
35+ condition: qbs .toolchainType == ' clang-cl'
36+ cpp .generateManifestFile : false
37+ cpp .defines : [' NOMINMAX' ]
38+ cpp .cxxFlags : [
39+ " /permissive-" , " /Zc:__cplusplus" , // best C++ compatibilty
40+ " /Zc:inline" , // do not include inline code in object files
41+ " /diagnostics:caret" , // better error postions
42+ " /W4" , // enable all warnings
43+ ]
44+ }
45+ Properties {
46+ condition: qbs .toolchain .contains (' clang' )
47+ // note: would require '--target=x86_64-pc-windows-msvc19.43.34808' to work
48+ // useful: to run third party clang based tools
49+ cpp .defines : [
50+ ' _M_X64=100' ,
51+ ' _M_AMD64=100' ,
52+ ' _WIN64=1' ,
53+ ' NOMINMAX'
54+ ]
55+ cpp .cxxFlags : [
56+ ' -fms-volatile' ,
57+ ' -fms-extensions' ,
58+ ' -fms-compatibility-version=19.43.34808' ,
59+ ' -fms-compatibility' ,
60+ // "-###" // print cc1 subcommand arguments
61+ ]
62+ cpp .systemIncludePaths : [
63+ // note: actually needs msvc include & windows kit includes
64+ ]
3365 }
3466
3567 Depends { name: ' hlsl' }
0 commit comments