diff options
| author | Arthur LAURENT <[email protected]> | 2022-12-04 22:39:05 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2022-12-04 22:49:47 +0100 |
| commit | 54d1c3ba54069b36337e6ba269f33a3bf148b476 (patch) | |
| tree | 8d39695770da2d65a2e8b5e7b9ca18f7e3b1dd71 | |
| parent | e5ddfba800683c9a0ee54445f3cab42defab11ed (diff) | |
internalpartition is not msvc specific
| -rw-r--r-- | tests/projects/c++/modules/internal_partition/src/hello.mpp (renamed from tests/projects/c++/modules/msvc_internal_partition/src/hello.mpp) | 0 | ||||
| -rw-r--r-- | tests/projects/c++/modules/internal_partition/src/hello_internal.mpp (renamed from tests/projects/c++/modules/msvc_internal_partition/src/hello_internal.mpp) | 0 | ||||
| -rw-r--r-- | tests/projects/c++/modules/internal_partition/src/main.cpp (renamed from tests/projects/c++/modules/msvc_internal_partition/src/main.cpp) | 0 | ||||
| -rw-r--r-- | tests/projects/c++/modules/internal_partition/test.lua | 1 | ||||
| -rw-r--r-- | tests/projects/c++/modules/internal_partition/xmake.lua (renamed from tests/projects/c++/modules/msvc_internal_partition/xmake.lua) | 4 | ||||
| -rw-r--r-- | tests/projects/c++/modules/msvc_internal_partition/test.lua | 1 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 2 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/msvc.lua | 4 |
8 files changed, 6 insertions, 6 deletions
diff --git a/tests/projects/c++/modules/msvc_internal_partition/src/hello.mpp b/tests/projects/c++/modules/internal_partition/src/hello.mpp index 0966f029e..0966f029e 100644 --- a/tests/projects/c++/modules/msvc_internal_partition/src/hello.mpp +++ b/tests/projects/c++/modules/internal_partition/src/hello.mpp diff --git a/tests/projects/c++/modules/msvc_internal_partition/src/hello_internal.mpp b/tests/projects/c++/modules/internal_partition/src/hello_internal.mpp index 8d0d4bee0..8d0d4bee0 100644 --- a/tests/projects/c++/modules/msvc_internal_partition/src/hello_internal.mpp +++ b/tests/projects/c++/modules/internal_partition/src/hello_internal.mpp diff --git a/tests/projects/c++/modules/msvc_internal_partition/src/main.cpp b/tests/projects/c++/modules/internal_partition/src/main.cpp index 1e5cc698f..1e5cc698f 100644 --- a/tests/projects/c++/modules/msvc_internal_partition/src/main.cpp +++ b/tests/projects/c++/modules/internal_partition/src/main.cpp diff --git a/tests/projects/c++/modules/internal_partition/test.lua b/tests/projects/c++/modules/internal_partition/test.lua new file mode 100644 index 000000000..7717f8049 --- /dev/null +++ b/tests/projects/c++/modules/internal_partition/test.lua @@ -0,0 +1 @@ +inherit(".test_base") diff --git a/tests/projects/c++/modules/msvc_internal_partition/xmake.lua b/tests/projects/c++/modules/internal_partition/xmake.lua index 9c2063ebb..ed784534a 100644 --- a/tests/projects/c++/modules/msvc_internal_partition/xmake.lua +++ b/tests/projects/c++/modules/internal_partition/xmake.lua @@ -1,6 +1,6 @@ add_rules("mode.release", "mode.debug") set_languages("c++20") -target("msvc_internal_partition") +target("internal_partition") set_kind("binary") add_files("src/*.cpp", "src/hello.mpp") - add_files("src/hello_internal.mpp", {values = {["msvc.internalpartition"] = true}}) + add_files("src/hello_internal.mpp", {values = {["internalpartition"] = true}}) diff --git a/tests/projects/c++/modules/msvc_internal_partition/test.lua b/tests/projects/c++/modules/msvc_internal_partition/test.lua deleted file mode 100644 index 0657ead56..000000000 --- a/tests/projects/c++/modules/msvc_internal_partition/test.lua +++ /dev/null @@ -1 +0,0 @@ -inherit(".test_msvc") diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index ad8f94549..4314fd4a5 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -444,7 +444,7 @@ function fallback_generate_dependencies(target, jsonfile, sourcefile, preprocess local module_deps_set = hashset.new() local sourcecode = preprocess_file(sourcefile) or io.readfile(sourcefile) local fileconfig = target:fileconfig(sourcefile) - local internalpartition = (fileconfig and fileconfig.values) and fileconfig.values["msvc.internalpartition"] or false + local internalpartition = (fileconfig and fileconfig.values) and fileconfig.values["internalpartition"] or false sourcecode = sourcecode:gsub("//.-\n", "\n") sourcecode = sourcecode:gsub("/%*.-%*/", "") for _, line in ipairs(sourcecode:split("\n", {plain = true})) do diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index c1c0e76cf..484076521 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -470,7 +470,7 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op dependfile = target:dependfile(provide.bmi) local fileconfig = target:fileconfig(provide.sourcefile) - if fileconfig and fileconfig.values and fileconfig.values["msvc.internalpartition"] then + if not provide.interface then assert(internalpartitionflag, "/internalPartition not supported !") table.insert(flags, internalpartitionflag) elseif provide.interface then @@ -559,7 +559,7 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op table.join2(flags, {ifcoutputflag, path(provide.bmi)}) local fileconfig = target:fileconfig(cppfile) - if fileconfig and fileconfig.values and fileconfig.values["msvc.internalpartition"] then + if not provide.interface then assert(internalpartitionflag, "/internalPartition not supported !") table.insert(flags, internalpartitionflag) elseif provide.interface then |
