memory
memory copied to clipboard
MSVC: CMake err for determine type char ??
I try to install with the command "cmake .. -DCMAKE_BUILD_TYPE="buildtype" -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF -DFOONATHAN_MEMORY_BUILD_TESTS=OFF -DFOONATHAN_MEMORY_BUILD_TOOLS=ON -DCMAKE_INSTALL_PREFIX=../install -DBUILD_SHARED_LIBS=ON" , but there occur an error, below is the record:
E:\Dev\study\open_source\DDS\foonathan_memory_msvc\build>cmake .. -DCMAKE_BUILD_TYPE="buildtype" -DFOONATHAN_MEMORY_BUILD_EXAMPLES=OFF -DFOONATHAN_MEMORY_BUILD_TESTS=OFF -DFOONATHAN_MEMORY_BUILD_TOOLS=ON -DCMAKE_INSTALL_PREFIX=../install -DBUILD_SHARED_LIBS=ON -- Building for: Visual Studio 17 2022 -- Selecting Windows SDK version 10.0.26100.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.44.35211.0 -- The CXX compiler identification is MSVC 19.44.35211.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: D:/IDE/Microsoft/Visual_Studio/2022/Community/VC/Tools/MSVC/14.44.35207/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: D:/IDE/Microsoft/Visual_Studio/2022/Community/VC/Tools/MSVC/14.44.35207/bin/Hostx64/x64/cl.exe - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Performing Test HAVE_CXX_ATOMIC_NOFLAG -- Performing Test HAVE_CXX_ATOMIC_NOFLAG - Success -- Getting container node sizes CMake Error at cmake/get_container_node_sizes.cmake:39 (message): Unable to determine alignment of C++ type char - no error text matching align_of<..., ##> in compiler output |Change Dir: 'E:/Dev/study/open_source/DDS/foonathan_memory_msvc/build/src/CMakeFiles/CMakeTmp'
Run Build Command(s): D:/IDE/Microsoft/Visual_Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_c689b.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
閫傜敤浜?.NET Framework MSBuild 鐗堟湰 17.14.14+a129329f1
鐢熸垚鍚姩鏃堕棿涓?2025/7/7 22:19:49銆?
鑺傜偣 1 涓婄殑椤圭洰鈥淓:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\cmTC_c689b.vcxproj鈥?榛樿鐩爣)銆?
PrepareForBuild:
姝e湪鍒涘缓鐩綍鈥渃mTC_c689b.dir\Debug\鈥濄€?
宸插惎鐢ㄧ粨鏋勫寲杈撳嚭銆傜紪璇戝櫒璇婃柇鐨勬牸寮忚缃皢鍙嶆槧閿欒灞傛缁撴瀯銆傛湁鍏宠缁嗕俊鎭紝璇峰弬闃?https://aka.ms/cpp/structured-output銆?
姝e湪鍒涘缓鐩綍鈥淓:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\Debug\鈥濄€?
姝e湪鍒涘缓鐩綍鈥渃mTC_c689b.dir\Debug\cmTC_c689b.tlog\鈥濄€?
InitializeBuildStatus:
姝e湪鍒涘缓鈥渃mTC_c689b.dir\Debug\cmTC_c689b.tlog\unsuccessfulbuild鈥濓紝鍥犱负宸叉寚瀹氣€淎lwaysCreate鈥濄€?
姝e湪瀵光€渃mTC_c689b.dir\Debug\cmTC_c689b.tlog\unsuccessfulbuild鈥濇墽琛?Touch 浠诲姟銆?
ClCompile:
D:\IDE\Microsoft\Visual_Studio\2022\Community\VC\Tools\MSVC\14.44.35207\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D TEST_TYPE=char /D "CMAKE_INTDIR=\"Debug\"" /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_c689b.dir\Debug\\" /Fd"cmTC_c689b.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp
鐢ㄤ簬 x64 鐨?Microsoft (R) C/C++ 浼樺寲缂栬瘧鍣?19.44.35211 鐗?
鐗堟潈鎵€鏈?C) Microsoft Corporation銆備繚鐣欐墍鏈夋潈鍒┿€?
cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D TEST_TYPE=char /D "CMAKE_INTDIR=\"Debug\"" /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_c689b.dir\Debug\\" /Fd"cmTC_c689b.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp
get_align_of.cpp
E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp(6,27): error C2338: static_assert failed: 'this should fail, the purpose of this is to generate a compile error on this type that contains the alignment value on this target' [E:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\cmTC_c689b.vcxproj]
E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp(6,27):
妯℃澘瀹炰緥鍖栦笂涓嬫枃(鏈€鏃╃殑瀹炰緥鍖栦笂涓嬫枃)涓?
E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp(16,25):
鏌ョ湅瀵规鍦ㄧ紪璇戠殑 绫?妯℃澘 瀹炰緥鍖栤€渁lign_of<char,1>鈥濈殑寮曠敤
宸插畬鎴愮敓鎴愰」鐩€淓:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\cmTC_c689b.vcxproj鈥?榛樿鐩爣)鐨勬搷浣?- 澶辫触銆?
鐢熸垚澶辫触銆?
鈥淓:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\cmTC_c689b.vcxproj鈥?榛樿鐩爣) (1) ->
(ClCompile 鐩爣) ->
E:\Dev\study\open_source\DDS\foonathan_memory_msvc\cmake\get_align_of.cpp(6,27): error C2338: static_assert failed: 'this should fail, the purpose of this is to generate a compile error on this type that contains the alignment value on this target' [E:\Dev\study\open_source\DDS\foonathan_memory_msvc\build\src\CMakeFiles\CMakeTmp\cmTC_c689b.vcxproj]
0 涓鍛?
1 涓敊璇?
宸茬敤鏃堕棿 00:00:00.32
| Call Stack (most recent call first): cmake/get_container_node_sizes.cmake:57 (get_alignof_type) cmake/get_container_node_sizes.cmake:137 (unique_aligned_types) src/CMakeLists.txt:80 (get_container_node_sizes)
-- Configuring incomplete, errors occurred!