diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-21 01:37:17 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-21 04:53:30 +0200 |
| commit | 8b4e9f90ba045edb14cb2800c506ee6bc5118cd7 (patch) | |
| tree | ffa4bc5edf9e19d953689fde3cc811382397e786 /xmake/rules/c++/modules | |
| parent | bfc0f75db8c238187aa011f522adf9685e023b31 (diff) | |
(C++ modules support) refactor tests
Diffstat (limited to 'xmake/rules/c++/modules')
| -rw-r--r-- | xmake/rules/c++/modules/msvc/support.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/msvc/support.lua b/xmake/rules/c++/modules/msvc/support.lua index 41c5cd44e..c425ce911 100644 --- a/xmake/rules/c++/modules/msvc/support.lua +++ b/xmake/rules/c++/modules/msvc/support.lua @@ -46,11 +46,13 @@ function load(target) local msvc = target:toolchain("msvc") if msvc then local vcvars = msvc:config("vcvars") - if vcvars.VCInstallDir and vcvars.VCToolsVersion and semver.compare(vcvars.VCToolsVersion, "14.35") > 0 then + if vcvars.VCInstallDir and vcvars.VCToolsVersion and semver.compare(vcvars.VCToolsVersion, "14.35") >= 0 then stdmodulesdir = path.join(vcvars.VCInstallDir, "Tools", "MSVC", vcvars.VCToolsVersion, "modules") end end - target:data_set("c++.msvc.enable_std_import", isatleastcpp23 and os.isdir(stdmodulesdir)) + if stdmodulesdir then + target:data_set("c++.msvc.enable_std_import", isatleastcpp23 and os.isdir(stdmodulesdir)) + end end end |
