Unnamed: 0
int64
0
0
repo_id
stringlengths
5
186
file_path
stringlengths
15
223
content
stringlengths
1
32.8M
0
repos/xmake/tests/projects/swift/macapp
repos/xmake/tests/projects/swift/macapp/src/Info.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleVersion</key> <string>1</string> <key>LSMinimumSystemVersion</key> <string>$(MACOSX_DEPLOYMENT_TARGET)</string> <key>NSHumanReadableCopyright</key> <string>Copyright © 2020 tboox. All rights reserved.</string> <key>NSMainStoryboardFile</key> <string>Main</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSSupportsAutomaticTermination</key> <true/> <key>NSSupportsSuddenTermination</key> <true/> </dict> </plist>
0
repos/xmake/tests/projects/swift/macapp
repos/xmake/tests/projects/swift/macapp/src/test.entitlements
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.files.user-selected.read-only</key> <true/> </dict> </plist>
0
repos/xmake/tests/projects/swift/macapp/src
repos/xmake/tests/projects/swift/macapp/src/Assets.xcassets/Contents.json
{ "info" : { "version" : 1, "author" : "xcode" } }
0
repos/xmake/tests/projects/swift/macapp/src/Assets.xcassets
repos/xmake/tests/projects/swift/macapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
{ "images" : [ { "idiom" : "mac", "size" : "16x16", "scale" : "1x" }, { "idiom" : "mac", "size" : "16x16", "scale" : "2x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "1x" }, { "idiom" : "mac", "size" : "32x32", "scale" : "2x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "1x" }, { "idiom" : "mac", "size" : "128x128", "scale" : "2x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "1x" }, { "idiom" : "mac", "size" : "256x256", "scale" : "2x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "1x" }, { "idiom" : "mac", "size" : "512x512", "scale" : "2x" } ], "info" : { "version" : 1, "author" : "xcode" } }
0
repos/xmake/tests/projects/swift
repos/xmake/tests/projects/swift/iosapp/xmake.lua
add_rules("mode.debug", "mode.release") set_plat("iphoneos") set_arch("arm64") target("test") add_rules("xcode.application") add_files("src/*.swift", "src/**.storyboard", "src/*.xcassets") add_files("src/Info.plist")
0
repos/xmake/tests/projects/swift/iosapp
repos/xmake/tests/projects/swift/iosapp/src/Info.plist
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>$(DEVELOPMENT_LANGUAGE)</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundleDisplayName</key> <string>$(PRODUCT_DISPLAY_NAME)</string> <key>CFBundlePackageType</key> <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleVersion</key> <string>1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIApplicationSceneManifest</key> <dict> <key>UIApplicationSupportsMultipleScenes</key> <false/> <key>UISceneConfigurations</key> <dict> <key>UIWindowSceneSessionRoleApplication</key> <array> <dict> <key>UISceneConfigurationName</key> <string>Default Configuration</string> <key>UISceneDelegateClassName</key> <string>$(PRODUCT_MODULE_NAME).SceneDelegate</string> <key>UISceneStoryboardFile</key> <string>Main</string> </dict> </array> </dict> </dict> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist>
0
repos/xmake/tests/projects/swift/iosapp/src
repos/xmake/tests/projects/swift/iosapp/src/Assets.xcassets/Contents.json
{ "info" : { "version" : 1, "author" : "xcode" } }
0
repos/xmake/tests/projects/swift/iosapp/src/Assets.xcassets
repos/xmake/tests/projects/swift/iosapp/src/Assets.xcassets/AppIcon.appiconset/Contents.json
{ "images" : [ { "idiom" : "iphone", "size" : "20x20", "scale" : "2x" }, { "idiom" : "iphone", "size" : "20x20", "scale" : "3x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "2x" }, { "idiom" : "iphone", "size" : "29x29", "scale" : "3x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, { "idiom" : "iphone", "size" : "40x40", "scale" : "3x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, { "idiom" : "iphone", "size" : "60x60", "scale" : "3x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "1x" }, { "idiom" : "ipad", "size" : "20x20", "scale" : "2x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "1x" }, { "idiom" : "ipad", "size" : "29x29", "scale" : "2x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "1x" }, { "idiom" : "ipad", "size" : "40x40", "scale" : "2x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "1x" }, { "idiom" : "ipad", "size" : "76x76", "scale" : "2x" }, { "idiom" : "ipad", "size" : "83.5x83.5", "scale" : "2x" }, { "idiom" : "ios-marketing", "size" : "1024x1024", "scale" : "1x" } ], "info" : { "version" : 1, "author" : "xcode" } }
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/console/test.lua
function main(t) if is_host("macosx") and os.arch() ~= "arm64" then t:build() else return t:skip("wrong host platform") end end
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/console/xmake.lua
add_rules("mode.debug", "mode.release") target("test") set_kind("binary") add_files("src/*.d")
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/static_library/test.lua
function main(t) if is_host("macosx") and os.arch() ~= "arm64" then t:build() else return t:skip("wrong host platform") end end
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/static_library/xmake.lua
add_rules("mode.debug", "mode.release") target("interfaces") set_kind("static") add_files("src/interfaces.d") add_includedirs("src", {public = true}) target("test") set_kind("binary") add_deps("interfaces") add_files("src/main.d")
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/console_with_pkgs/xmake.lua
add_rules("mode.debug", "mode.release") add_requires("dub::log 0.4.3", {alias = "log"}) add_requires("dub::dateparser", {alias = "dateparser"}) add_requires("dub::emsi_containers", {alias = "emsi_containers"}) add_requires("dub::stdx-allocator", {alias = "stdx-allocator"}) add_requires("dub::mir-core", {alias = "mir-core"}) target("test") set_kind("binary") add_files("src/*.d") add_packages("log", "dateparser", "emsi_containers", "stdx-allocator", "mir-core")
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/shared_library/test.lua
function main(t) if is_host("macosx") and os.arch() ~= "arm64" then t:build() else return t:skip("wrong host platform") end end
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/shared_library/xmake.lua
add_rules("mode.debug", "mode.release") target("interfaces") set_kind("shared") add_files("src/interfaces.d") add_includedirs("src", {public = true}) add_rules("utils.symbols.export_list", {symbols = { "add", "sub"}}) target("test") set_kind("binary") add_deps("interfaces") add_files("src/main.d")
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/dub_package/test.lua
function main(t) if is_host("macosx") and os.arch() ~= "arm64" then t:build() else return t:skip("wrong host platform") end end
0
repos/xmake/tests/projects/dlang
repos/xmake/tests/projects/dlang/dub_package/xmake.lua
add_rules("mode.debug", "mode.release") add_requires("dub::log 0.4.3") target("test") set_kind("binary") add_files("src/main.d") add_packages("dub::log")
0
repos/xmake/tests/projects/c++
repos/xmake/tests/projects/c++/modules/test_headerunits.lua
import("lib.detect.find_tool") import("core.base.semver") import("detect.sdks.find_vstudio") import("utils.ci.is_running", {alias = "ci_is_running"}) function _build() if ci_is_running() then os.run("xmake -rvD") else os.run("xmake -r") end local outdata = os.iorun("xmake") if outdata then if outdata:find("compiling") or outdata:find("linking") or outdata:find("generating") then raise("Modules incremental compilation does not work\n%s", outdata) end end end function main(t) if is_subhost("windows") then local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "15.0") >= 0 then -- clang headerunit are bugged -- os.exec("xmake f --toolchain=clang --policies=build.c++.clang.fallbackscanner -c --yes") -- _build() -- if semver.compare(clang.version, "17.0") >= 0 then -- os.exec("xmake clean -a") -- -- clang-scan-deps dependency detection doesn't support header units atm -- os.exec("xmake f --toolchain=clang --policies=build.c++.clang.fallbackscanner --runtimes=c++_shared -c --yes") -- _build() -- end end local vs = find_vstudio() if vs and vs["2022"] then os.exec("xmake clean -a") os.exec("xmake f -c --yes") _build() end elseif is_subhost("msys") then -- on windows, mingw modulemapper doesn't handle headeunit path correctly, but it's working with mingw on macOS / Linux -- os.exec("xmake f -c -p mingw --yes") -- _build() elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then -- gcc dependency detection doesn't support header units atm os.exec("xmake f --policies=build.c++.gcc.fallbackscanner -c --yes") _build() end local clang = find_tool("clang", {version = true}) if clang and clang.version then if semver.compare(clang.version, "15.0") >= 0 then os.exec("xmake clean -a") -- clang-scan-deps dependency detection doesn't support header units atm os.exec("xmake f --toolchain=clang --policies=build.c++.clang.fallbackscanner -c --yes") _build() end -- libc++ headerunit are bugged -- if semver.compare(clang.version, "17.0") >= 0 then -- os.exec("xmake clean -a") -- -- clang-scan-deps dependency detection doesn't support header units atm -- os.exec("xmake f --toolchain=clang --policies=build.c++.clang.fallbackscanner --runtimes=c++_shared -c --yes") -- _build() -- end end end end
0
repos/xmake/tests/projects/c++
repos/xmake/tests/projects/c++/modules/test_base.lua
import("lib.detect.find_tool") import("core.base.semver") import("utils.ci.is_running", {alias = "ci_is_running"}) function _build() if ci_is_running() then os.run("xmake -rvD") else os.run("xmake -r") end local outdata = os.iorun("xmake") if outdata then if outdata:find("compiling") or outdata:find("linking") or outdata:find("generating") then raise("Modules incremental compilation does not work\n%s", outdata) end end end function can_build() if is_subhost("windows") then return true elseif is_subhost("msys") then return true elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then return true end local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "14.0") >= 0 then return true end end end function main(t) if is_subhost("windows") then local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "17.0") >= 0 then os.exec("xmake f --toolchain=clang -c --yes") _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end os.exec("xmake clean -a") os.exec("xmake f -c --yes") _build() elseif is_subhost("msys") then os.exec("xmake f -c -p mingw --yes") _build() elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then os.exec("xmake f -c --yes") _build() end local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "14.0") >= 0 then os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang -c --yes") _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end end end
0
repos/xmake/tests/projects/c++
repos/xmake/tests/projects/c++/modules/test_stdmodules.lua
import("lib.detect.find_tool") import("core.base.semver") import("core.tool.toolchain") import("utils.ci.is_running", {alias = "ci_is_running"}) function _build() if ci_is_running() then os.run("xmake -rvD") else os.run("xmake -r") end local outdata = os.iorun("xmake") if outdata then if outdata:find("compiling") or outdata:find("linking") or outdata:find("generating") then raise("Modules incremental compilation does not work\n%s", outdata) end end end function main(t) if is_subhost("windows") then local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "19.0") >= 0 then -- clang don't support msstl std modules atm -- os.exec("xmake f --toolchain=clang -c --yes") -- _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end local msvc = toolchain.load("msvc") if msvc and msvc:check() then local vcvars = msvc:config("vcvars") if vcvars and vcvars.VCInstallDir and vcvars.VCToolsVersion and semver.compare(vcvars.VCToolsVersion, "14.35") then local stdmodulesdir = path.join(vcvars.VCInstallDir, "Tools", "MSVC", vcvars.VCToolsVersion, "modules") if os.isdir(stdmodulesdir) then os.exec("xmake clean -a") os.exec("xmake f -c --yes") _build() end end end elseif is_subhost("msys") then -- os.exec("xmake f -c -p mingw --yes") -- _build() elseif is_host("linux") then -- or is_host("macosx") then -- gcc don't support std modules atm -- local gcc = find_tool("gcc", {version = true}) -- if is_host("linux") and gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then -- os.exec("xmake f -c --yes") -- _build() -- end local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "19.0") >= 0 then -- clang don't support libstdc++ std modules atm -- os.exec("xmake clean -a") -- os.exec("xmake f --toolchain=clang -c --yes") -- _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end end end
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stl_headerunit_cpp_only/test.lua
inherit(".test_headerunits")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stl_headerunit_cpp_only/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("stl_headerunit_cpp_only") set_kind("binary") add_files("src/*.cpp") set_policy("build.c++.modules", true)
0
repos/xmake/tests/projects/c++/modules/stl_headerunit_cpp_only
repos/xmake/tests/projects/c++/modules/stl_headerunit_cpp_only/src/main.cpp
import <iostream>; import <algorithm>; import <deque>; import <iostream>; import <map>; import <memory>; import <set>; import <utility>; import <vector>; import <string>; import <queue>; import <cstdlib>; import <utility>; import <exception>; import <list>; import <stack>; import <complex>; import <fstream>; import <cstdio>; import <iomanip>; using namespace std; int main(int argc, char** argv) { cout << "hello world!" << endl; return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/user_headerunit/test.lua
inherit(".test_headerunits")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/user_headerunit/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("user_headerunit") set_kind("binary") add_headerfiles("src/*.hpp") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/user_headerunit
repos/xmake/tests/projects/c++/modules/user_headerunit/src/header.hpp
#pragma once namespace hello { inline constexpr auto FOO = "Hello"; }
0
repos/xmake/tests/projects/c++/modules/user_headerunit
repos/xmake/tests/projects/c++/modules/user_headerunit/src/main.cpp
import hello; import "header.hpp"; int main() { hello::say(hello::FOO); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/private_module/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/private_module/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("private_module") add_rules("c++") set_kind("$(kind)") add_files("src/*.mpp") add_files("src/*.cpp")
0
repos/xmake/tests/projects/c++/modules/private_module
repos/xmake/tests/projects/c++/modules/private_module/src/use.cpp
module use; import dep1; import dep2; int lib() { return m() + i(); }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/headerunits_person/test.lua
inherit(".test_headerunits")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/headerunits_person/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("headerunits_person") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/headerunits_person
repos/xmake/tests/projects/c++/modules/headerunits_person/src/test.cpp
import person; import <iostream>; import <string>; // For operator<< for std::string using namespace std; int main() { Person person{ "Kole", "Webb" }; cout << person.getLastName() << ", " << person.getFirstName() << endl; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/moduleonly_private_dep/xmake.lua
set_languages("c++20") target("A") set_kind("moduleonly") add_files("src/modA.mpp") target("B") add_deps("A") set_kind("static") add_files("src/modB.mpp", { public = true }) add_files("src/modB.cpp") target("test") set_kind("binary") add_deps("B") add_files("src/main.cpp")
0
repos/xmake/tests/projects/c++/modules/moduleonly_private_dep
repos/xmake/tests/projects/c++/modules/moduleonly_private_dep/src/main.cpp
import B; int main() { return func(); }
0
repos/xmake/tests/projects/c++/modules/moduleonly_private_dep
repos/xmake/tests/projects/c++/modules/moduleonly_private_dep/src/modB.cpp
module B; import A; int func() { return foo; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/impl_unit/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/impl_unit/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("impl_unit") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/impl_unit
repos/xmake/tests/projects/c++/modules/impl_unit/src/hello_impl.cpp
module; #include <iostream> module hello; using namespace std; namespace hello { void say_hi() { cout << "hello hi!" << endl; } void say_hello() { cout << "hello world!" << endl; } void say_xz() { cout << "hello xz!" << endl; } }
0
repos/xmake/tests/projects/c++/modules/impl_unit
repos/xmake/tests/projects/c++/modules/impl_unit/src/main.cpp
import hello; int main() { hello::say_hello(); hello::say_xz(); // hello::say_hi(); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/culling/test.lua
import("lib.detect.find_tool") import("core.base.semver") import("utils.ci.is_running", {alias = "ci_is_running"}) function _build() local outdata if ci_is_running() then outdata = os.iorun("xmake -rvD") else outdata = os.iorun("xmake -rv") end if outdata then if outdata:find("culled") then raise("Modules culling does not work\n%s", outdata) end end end function can_build() if is_subhost("windows") then return true elseif is_subhost("msys") then return true elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then return true end local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "14.0") >= 0 then return true end end end function main(t) if is_subhost("windows") then local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "17.0") >= 0 then os.exec("xmake f --toolchain=clang -c --yes") _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end os.exec("xmake clean -a") os.exec("xmake f -c --yes") _build() elseif is_subhost("msys") then os.exec("xmake f -c -p mingw --yes") _build() elseif is_host("linux") then local gcc = find_tool("gcc", {version = true}) if gcc and gcc.version and semver.compare(gcc.version, "11.0") >= 0 then os.exec("xmake f -c --yes") _build() end local clang = find_tool("clang", {version = true}) if clang and clang.version and semver.compare(clang.version, "14.0") >= 0 then os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang -c --yes") _build() os.exec("xmake clean -a") os.exec("xmake f --toolchain=clang --runtimes=c++_shared -c --yes") _build() end end end
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/culling/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("culling") set_kind("static") add_files("src/*.mpp") set_policy("build.c++.modules.culling", false)
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/dependence2/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/dependence2/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("dependence2") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/dependence2
repos/xmake/tests/projects/c++/modules/dependence2/src/main.cpp
#include <stdio.h> import foo; int main() { printf("add(1, 2): %d\n", foo::add(1, 2)); printf("sub(1, 2): %d\n", foo::sub(1, 2)); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/submodules2/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/submodules2/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("submodules2") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/submodules2
repos/xmake/tests/projects/c++/modules/submodules2/src/module1.cpp
module; #include <stdio.h> module main_module.module1; void hello1(void) { printf("hello1\n"); }
0
repos/xmake/tests/projects/c++/modules/submodules2
repos/xmake/tests/projects/c++/modules/submodules2/src/main.cpp
import main_module; int main(int argc, char** argv) { hello(); return 0; }
0
repos/xmake/tests/projects/c++/modules/submodules2
repos/xmake/tests/projects/c++/modules/submodules2/src/module2.cpp
module; #include <stdio.h> module main_module.module2; void hello2(void) { printf("hello2\n"); }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/class/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/class/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("class") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/class
repos/xmake/tests/projects/c++/modules/class/src/hello_impl.cpp
module; #include <iostream> module hello; using namespace std; namespace hello { say::say(int data) : data_(data) { } void say::hello() { cout << "hello, say class: " << data_ << endl; } }
0
repos/xmake/tests/projects/c++/modules/class
repos/xmake/tests/projects/c++/modules/class/src/main.cpp
import hello; int main() { hello::say s(sizeof(hello::say)); s.hello(); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stdmodules_multiple_targets/test.lua
inherit(".test_stdmodules")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stdmodules_multiple_targets/xmake.lua
add_rules("mode.debug", "mode.release") set_languages("c++latest") target("mod") set_kind("static") add_files("src/*.cpp", "src/*.mpp") target("mod2") set_kind("static") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/stdmodules_multiple_targets
repos/xmake/tests/projects/c++/modules/stdmodules_multiple_targets/src/my_module.cpp
module my_module; import std; auto my_sum(size_t a, size_t b) -> size_t { return a + b; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/partitions_implunit2/test.lua
inherit(".test_stdmodules")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/partitions_implunit2/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("test") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/partitions_implunit2
repos/xmake/tests/projects/c++/modules/partitions_implunit2/src/main.cpp
import Foo; int main(int argc, char** argv) { foo(); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/staticlib2/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/staticlib2/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("bar") set_kind("static") add_files("src/bar.mpp", {public = true}) add_files("src/bar.cpp") target("foo") set_kind("static") add_deps("bar") add_files("src/foo.mpp", {public = true}) add_files("src/foo.cpp") target("hello") set_kind("binary") add_deps("foo") add_files("src/main.cpp")
0
repos/xmake/tests/projects/c++/modules/staticlib2
repos/xmake/tests/projects/c++/modules/staticlib2/src/bar.cpp
module bar; namespace bar { int hello() { return 2; } }
0
repos/xmake/tests/projects/c++/modules/staticlib2
repos/xmake/tests/projects/c++/modules/staticlib2/src/foo.cpp
module foo; import bar; namespace foo { int hello() { return bar::hello(); } }
0
repos/xmake/tests/projects/c++/modules/staticlib2
repos/xmake/tests/projects/c++/modules/staticlib2/src/main.cpp
#include <stdio.h> import foo; int main() { printf("%d\n", foo::hello()); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/hello/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/hello/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("hello") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/hello
repos/xmake/tests/projects/c++/modules/hello/src/main.cpp
import hello; int main() { hello::say("hello module!"); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/packages/test.lua
inherit(".test_headerunits")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/packages/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++2b") add_repositories("my-repo my-repo") add_requires("foo", "bar", "bar2") target("packages") set_kind("binary") add_files("src/*.cpp") add_packages("foo", "bar", "bar2") set_policy("build.c++.modules", true)
0
repos/xmake/tests/projects/c++/modules/packages
repos/xmake/tests/projects/c++/modules/packages/src/main.cpp
import foo; import bar; import bar2; int main() { foo::say(bar::hello()); foo::say(bar::hello2()); return 0; }
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f/foo/xmake.lua
package("foo") set_sourcedir(path.join(os.scriptdir(), "src")) on_install(function(package) import("package.tools.xmake").install(package, {}) end)
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f/foo
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f/foo/src/foo.cpp
module foo; namespace foo { void say(const char *msg) { } }
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f/foo
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/f/foo/src/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("foo") set_kind("static") add_files("*.cpp") add_files("*.mpp", {defines = "FOO_EXPORT", public = true})
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar2/xmake.lua
package("bar2") set_kind("library", {moduleonly = true}) set_sourcedir(path.join(os.scriptdir(), "src")) on_install(function(package) import("package.tools.xmake").install(package, {}) end)
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar2
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar2/src/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("bar2") set_kind("moduleonly") add_files("*.mpp")
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar/xmake.lua
package("bar") set_sourcedir(path.join(os.scriptdir(), "src")) on_install(function(package) import("package.tools.xmake").install(package, {}) end)
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar/src/bar.cpp
#include <a.hpp> const char *hello() { return "Hello world"; }
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar/src/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("bar") set_kind("static") add_headerfiles("include/(**.hpp)") add_includedirs("include") add_files("*.cpp") add_files("*.mpp", { public = true })
0
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar/src
repos/xmake/tests/projects/c++/modules/packages/my-repo/packages/b/bar/src/include/a.hpp
#ifndef A_HPP #define A_HPP [[gnu::visibility("default")]] const char *hello(); #endif
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("mod") set_kind("static") add_files("src/mod.mpp", {public = true}) add_files("src/mod.cpp") target("cpp_with_moduledeps") set_kind("binary") add_deps("mod") add_files("src/main.cpp")
0
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps/src/main.cpp
// main.cpp import mod; int main() { f(); return 0; }
0
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps
repos/xmake/tests/projects/c++/modules/cpp_with_moduledeps/src/mod.cpp
module mod; void f() { }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/aliased_headerunit/test.lua
inherit(".test_headerunits")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/aliased_headerunit/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") -- header.hpp should be built only one time target("aliased_headerunit") set_kind("binary") add_headerfiles("src/*.hpp") add_files("src/*.cpp", "src/foo/*.mpp")
0
repos/xmake/tests/projects/c++/modules/aliased_headerunit
repos/xmake/tests/projects/c++/modules/aliased_headerunit/src/header.hpp
#pragma once namespace hello { inline constexpr auto FOO = "Hello"; }
0
repos/xmake/tests/projects/c++/modules/aliased_headerunit
repos/xmake/tests/projects/c++/modules/aliased_headerunit/src/main.cpp
import hello; import "header.hpp"; int main() { hello::say(hello::FOO); return 0; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stdmodules/test.lua
inherit(".test_stdmodules")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/stdmodules/xmake.lua
add_rules("mode.debug", "mode.release") set_languages("c++latest") target("mod") set_kind("static") add_files("src/*.cpp") add_files("src/*.mpp", {public = true}) target("stdmodules") set_kind("binary") add_files("test/*.cpp") add_deps("mod")
0
repos/xmake/tests/projects/c++/modules/stdmodules
repos/xmake/tests/projects/c++/modules/stdmodules/src/my_module.cpp
module my_module; import std; auto my_sum(std::size_t a, std::size_t b) -> std::size_t { return a + b; }
0
repos/xmake/tests/projects/c++/modules/stdmodules
repos/xmake/tests/projects/c++/modules/stdmodules/test/test.cpp
import std; import my_module; using namespace std; int main(int argc, char** argv) { cout << my_sum(1, 1) << endl; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/submodules/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/submodules/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("submodule") set_kind("binary") add_files("src/*.cpp", "src/*.mpp")
0
repos/xmake/tests/projects/c++/modules/submodules
repos/xmake/tests/projects/c++/modules/submodules/src/main.cpp
#include <iostream> import math; int main() { std::cout << std::endl; std::cout << "add(3, 4): " << add(3, 4) << std::endl; std::cout << "mul(3, 4): " << mul(3, 4) << std::endl; }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/staticlib/test.lua
inherit(".test_base")
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/staticlib/xmake.lua
add_rules("mode.release", "mode.debug") set_languages("c++20") target("mod") set_kind("static") add_files("src/mod.mpp", {public = true}) add_files("src/mod.cpp") target("hello") set_kind("binary") add_deps("mod") add_files("src/main.cpp")
0
repos/xmake/tests/projects/c++/modules/staticlib
repos/xmake/tests/projects/c++/modules/staticlib/src/main.cpp
#include <stdio.h> import mod; int main() { printf("%d\n", mod::foo()); return 0; }
0
repos/xmake/tests/projects/c++/modules/staticlib
repos/xmake/tests/projects/c++/modules/staticlib/src/mod.cpp
module mod; namespace mod { int foo() { return 2; } }
0
repos/xmake/tests/projects/c++/modules
repos/xmake/tests/projects/c++/modules/partitions/test.lua
inherit(".test_stdmodules")