-
-
Notifications
You must be signed in to change notification settings - Fork 818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve copy pdb with cmake package #5566
Comments
这种没办法,cmake 里面搞得这么随意,要么只能改成 要么只能针对特定包,install 后,额外 os.cp 下就行了。 |
There is no way around this, cmake is so random, or you can only change it to Or it can only be used for specific packages. After installation, just download the additional os.cp. |
估计只有用 msbuild 构建,pdb 才会稳定生成在 目前在更新包的时候只考虑适配 ninja 了,毕竟其他包管理都是用 ninja 的。 |
现在路径位置不确定,不太好搞。。而且一个包,有可能需要同时 copy到 bin/lib 不确定性太多,没有个统一的输出规范 |
It is estimated that only when built with msbuild, pdb will be stably generated in Currently, when updating packages, we only consider adapting to ninja. After all, other package management uses ninja. |
The path location is now uncertain and not easy to handle. . Moreover, a package may need to be copied to bin/lib at the same time. There are too many uncertainties and there is no unified output specification. |
cmake 太黑盒了,我做很多实验终于试出来了。 if not opt._configs_str:find("CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY") then
local pdb_dir = path.unix(path.join(os.curdir(), "pdb"))
table.insert(configs, "-DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=" .. pdb_dir)
table.insert(configs, "-DCMAKE_PDB_OUTPUT_DIRECTORY=" .. pdb_dir)
end cmake -DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=Debug -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=C:\Users\star\AppData\Local\.xmake\packages\i\imath\v3.1.12\dcb06deb6afe439594b483ae653d4066 -DCMAKE_INSTALL_LIBDIR:PATH=lib -G Ninja -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL -DCMAKE_COMPILE_PDB_OUTPUT_DIRECTORY=C:/Users/star/AppData/Local/.xmake/cache/packages/2411/i/imath/v3.1.12/source/build_dcb06deb/pdb -DCMAKE_PDB_OUTPUT_DIRECTORY=C:/Users/star/AppData/Local/.xmake/cache/packages/2411/i/imath/v3.1.12/source/build_dcb06deb/pdb "-DCMAKE_C_FLAGS_DEBUG=/DWIN32 /D_WINDOWS /W3 /Zi /Ob0 /Od /RTC1 -MD" "-DCMAKE_SHARED_LINKER_FLAGS_DEBUG=/machine:x64 /debug /INCREMENTAL" -DCMAKE_STATIC_LINKER_FLAGS_DEBUG=/machine:x64 "-DCMAKE_EXE_LINKER_FLAGS_DEBUG=/machine:x64 /debug /INCREMENTAL" "-DCMAKE_CXX_FLAGS_DEBUG=/DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD" -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source
-- The C compiler identification is MSVC 19.41.34120.0
-- The CXX compiler identification is MSVC 19.41.34120.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.41.34120/bin/Hostx64/x64/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configure Imath 3.1.12, library API version: 29.11.0
-- Imath pkg-config generation enabled
-- Looking for sin in m
-- Looking for sin in m - not found
-- clang-format found: C:/Users/star/scoop/apps/llvm/current/bin/clang-format.exe
-- Configuring done (4.0s)
-- Generating done (0.2s)
-- Build files have been written to: C:/Users/star/AppData/Local/.xmake/cache/packages/2411/i/imath/v3.1.12/source/build_dcb06deb
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checkinfo: cannot runv(pkgconf.exe --version), No such file or directory
checking for pkgconf ... no
checking for pkg-config ... ok
checking for ninja ... ok
ninja install -C C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb -v -j 18
ninja: Entering directory `C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb'
[1/7] ccache C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DIMATH_DLL -DIMATH_EXPORTS -DImath_EXPORTS -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\config /DWIN32 /D_WINDOWS /W3 /GR /EHsc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD /EHsc /showIncludes /Fosrc\Imath\CMakeFiles\Imath.dir\ImathFun.cpp.obj /Fdpdb\ /FS -c C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath\ImathFun.cpp
[2/7] ccache C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DIMATH_DLL -DIMATH_EXPORTS -DImath_EXPORTS -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\config /DWIN32 /D_WINDOWS /W3 /GR /EHsc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD /EHsc /showIncludes /Fosrc\Imath\CMakeFiles\Imath.dir\ImathRandom.cpp.obj /Fdpdb\ /FS -c C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath\ImathRandom.cpp
[3/7] ccache C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DIMATH_DLL -DIMATH_EXPORTS -DImath_EXPORTS -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\config /DWIN32 /D_WINDOWS /W3 /GR /EHsc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD /EHsc /showIncludes /Fosrc\Imath\CMakeFiles\Imath.dir\ImathColorAlgo.cpp.obj /Fdpdb\ /FS -c C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath\ImathColorAlgo.cpp
[4/7] ccache C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DIMATH_DLL -DIMATH_EXPORTS -DImath_EXPORTS -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\config /DWIN32 /D_WINDOWS /W3 /GR /EHsc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD /EHsc /showIncludes /Fosrc\Imath\CMakeFiles\Imath.dir\half.cpp.obj /Fdpdb\ /FS -c C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath\half.cpp
[5/7] ccache C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\cl.exe /nologo /TP -DIMATH_DLL -DIMATH_EXPORTS -DImath_EXPORTS -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath -IC:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb\config /DWIN32 /D_WINDOWS /W3 /GR /EHsc /DWIN32 /D_WINDOWS /W3 /GR /EHsc /Zi /Ob0 /Od /RTC1 -MD /EHsc /showIncludes /Fosrc\Imath\CMakeFiles\Imath.dir\ImathMatrixAlgo.cpp.obj /Fdpdb\ /FS -c C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\src\Imath\ImathMatrixAlgo.cpp
[6/7] C:\Windows\system32\cmd.exe /C "cd . && C:\Users\star\scoop\apps\cmake\3.31.0\bin\cmake.exe -E vs_link_dll --msvc-ver=1941 --intdir=src\Imath\CMakeFiles\Imath.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\MSVC\1441~1.341\bin\Hostx64\x64\link.exe /nologo src\Imath\CMakeFiles\Imath.dir\half.cpp.obj src\Imath\CMakeFiles\Imath.dir\ImathColorAlgo.cpp.obj src\Imath\CMakeFiles\Imath.dir\ImathFun.cpp.obj src\Imath\CMakeFiles\Imath.dir\ImathMatrixAlgo.cpp.obj src\Imath\CMakeFiles\Imath.dir\ImathRandom.cpp.obj /out:bin\Imath-3_1_d.dll /implib:src\Imath\Imath-3_1_d.lib /pdb:pdb\Imath-3_1_d.pdb /dll /version:29.11 /machine:x64 /machine:x64 /debug /INCREMENTAL kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
[6/7] C:\Windows\system32\cmd.exe /C "cd /D C:\Users\star\AppData\Local\.xmake\cache\packages\2411\i\imath\v3.1.12\source\build_dcb06deb && C:\Users\star\scoop\apps\cmake\3.31.0\bin\cmake.exe -P cmake_install.cmake" |
Xmake Version
dev
Operating System Version and Architecture
Windows
Describe Bug
install dir:
build dir:
The install dir missing
flecs.pdb
.Expected Behavior
Improve this code or patch cmakelists (How?)
xmake/xmake/modules/package/tools/cmake.lua
Lines 1254 to 1260 in b7ef860
Project Configuration
N/A
Additional Information and Error Logs
N/A
The text was updated successfully, but these errors were encountered: