[Cucumber C]PP] build issue with cucumber cpp in windows and with visual studio

136 views
Skip to first unread message

Vinu Rout

unread,
Sep 13, 2019, 4:42:43 AM9/13/19
to Cukes
Hello, 

I am new to Cucumber Cpp. I ma trying to setup an environment for cucumber cpp in windows 10 and with visual studio.

My current environment is as  follow

OS: Windows 10 
Visual Studio Community Edition 2017
CMake Version:3.14.3
Ruby Version: 2.5.5p157 (2019-03-15 revision 67260) [x64-mingw32]
Boost Library Version: 1.69.0


I followed the steps mentioned in Readme.md


Building Cucumber-Cpp with tests and samples:

```
# Download test suite
git submodule init
git submodule update

# Create build directory
cmake -E make_directory build

# Generate Makefiles
cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DCMAKE_INSTALL_PREFIX=${prefix} ..

# Build cucumber-cpp and tests
cmake --build build



I am facing build issue with GTest component. Below is the error message

========================================================

Performing build step for 'gtest'
 
CMake Error at C:/Cucumber/cucumber-cpp/build/gmock/src/gtest-stamp/gtest-build-Debug.cmake:49 (message):
   
Command failed: 1


     
'C:/Program Files/CMake/bin/cmake.exe' '--build' '.' '--config' 'Debug'


   
See also


      C
:/Cucumber/cucumber-cpp/build/gmock/src/gtest-stamp/gtest-build-*.log




C
:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets(209,
5): error MSB6006: "cmd.exe" exited with code 1. [C:\Cucumber\cucumber-cpp\build\gtest.vcxproj]



========================================================
Even I tried to build it with visual studio. Same error comes

Anybody has faced same issue. 

I would appreciate any solution or suggestion.

Thanks in advance for any help.


gtest-build-Debug.cmake
gtest-build-out.log

Peter

unread,
Dec 18, 2019, 10:00:42 AM12/18/19
to Cukes
Hi

I had the same issue, the cmake is pulling in release 1.7 from googmock which is no longer the central repository. I manually pulled googletest (which now has mock) and built it first. When you build it make sure to add  -Dgtest_force_shared_crt=on to the cmake command line to force the CRT to dynamic link.

I also changed the installation location, so my cmake was "cmake . -DCMAKE_INSTALL_PREFIX="*somepath*\googletest-distribution" -Dgtest_force_shared_crt=on"

When building Cucumber-cpp I added the following to cmake "-DBOOST_ROOT="*somepath*\boost_1_69_0" -DGMOCK_ROOT="*somepath*\googletest-distribution" -DGTEST_ROOT="*somepath*\googletest-distribution""

Peter
Reply all
Reply to author
Forward
0 new messages