WebAssembly/wasp

How to build on Windows?

Horcrux7 opened this issue · 5 comments

I try to build it but with no luck.

C:\git\wasp>cmake C:\git\wasp
-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.19041.
-- The C compiler identification is MSVC 19.22.27905.0
-- The CXX compiler identification is MSVC 19.22.27905.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx86/x86/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx86/x86/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx86/x86/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.22.27905/bin/Hostx86/x86/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:267 (add_subdirectory):
  add_subdirectory given source "third_party/gtest" which is not an existing
  directory.


-- Configuring incomplete, errors occurred!
See also "C:/git/wasp/CMakeFiles/CMakeOutput.log".

CMakeOutput.log

Ok, I must also clone the sub modules.

I try to build it with:

set path=%path%;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin
md build
cd build
cmake .. -DCMAKE_BUILD_TYPE=DEBUG -DCMAKE_INSTALL_PREFIX=..\bin
cmake --build ..\build --config DEBUG --target install
cd ..

And receive the error:

....
  Building Custom Rule C:/git/wasp/CMakeLists.txt
  CMake does not need to re-run because C:/git/wasp/build/CMakeFiles/generate.stamp is up-to-date.
  cl : Befehlszeile error D8021 : Ungültiges numerisches Argument /Wextra.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(429
,5): error MSB6006: "CL.exe" wurde mit dem Code 2 beendet. [C:\git\wasp\build\libwasp_base.vcxproj]

I think I must modify the CMakeLists.txt. But I have no Idea what I can do there. CMake i not my domain.

binji commented

Ah, it looks like I have some flags that are not Windows-friendly. I'll make a PR that will get this compiling on Windows. Thanks for taking a look!

Great, I had also to update the Visual Studio. It was already one year old. Now it compile an run. Many Thanks.