Giter VIP home page Giter VIP logo

Comments (5)

jenisys avatar jenisys commented on July 21, 2024 1

The following works for me using the current HEAD of git repository on branch=main:

  • boost v1.81.0
  • cmake v3.26.3
  • googletest v1.13.0
  • DISABLED: Qt5

I needed to manually tweak the CMAKE_CXX_STANDARD (reason: googletest v1.13.0 requires at least C++ STD14).
After that I could and run the unit tests:

export BUILD_DIR=build
cmake -B $BUILD_DIR -DCMAKE_CXX_STANDARD=17 -G Ninja
...

# -- STEP: Build the library and test programs
cmake --build $BUILD_DIR
...

# -- STEP: Run. the unit tests
ctest --test-dir $BUILD_DIR
...
111/111 Test #111: GenericDriverTest ................................................................   Passed    0.01 sec

100% tests passed, 0 tests failed out of 111
...

from cucumber-cpp.

ursfassler avatar ursfassler commented on July 21, 2024

The solution from @jenisys also works for me. Make sure you disable Qt, there is another problem with missing C++11 and gtest. I have on a current debian testing:

  • cmake 3.26.4
  • boost 1.81.0
  • googletest current head

This is a bug within cucumber-cpp, we have to enforce C++14. Thanks for figuring that out.

from cucumber-cpp.

ursfassler avatar ursfassler commented on July 21, 2024

@Gonerr the mentioned error:

-- Could NOT find Boost (missing: unit_test_framework) (found suitable version "1.46.1", minimum required is "1.46")
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: thread system regex date_time
  program_options filesystem) (found suitable version "1.46.1", minimum
  required is "1.46")

Says that the boost modules "thread system regex date_time program_options filesystem" are missing. You may have to install them explicitly/manually.

from cucumber-cpp.

linopsa avatar linopsa commented on July 21, 2024

We still need help with the described issue.
We can not get past this error.
We are building on Windows with VS2022.
Built boost explicitly with
.\b2 --with-thread --with-system --with-regex --with-date_time

But got the following errors:

$ cmake -E chdir build cmake -DCUKE_ENABLE_EXAMPLES=on -DCMAKE_INSTALL_PREFIX=${prefix} .. -DCUKE_USE_STATIC_BOOST=ON -DCUKE_ENABLE_QT=OFF -DCMAKE_CXX_STANDARD=20
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19043.
-- Could NOT find Boost (missing: unit_test_framework) (found suitable version "1.82.0", minimum required is "1.46")
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: thread system regex date_time
  program_options filesystem) (found suitable version "1.82.0", minimum
  required is "1.46")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindBoost.cmake:2378 (find_package_handle_standard_args)
  CMakeLists.txt:132 (find_package)


-- Configuring incomplete, errors occurred!

We also tried with
set BUILD_DIR=build
cmake -B $BUILD_DIR -DCMAKE_CXX_STANDARD=20 -G Ninja
but got

c:\cucumber\cucumber-cpp>cmake -B $BUILD_DIR -DCMAKE_CXX_STANDARD=20 -G Ninja
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is MSVC 19.36.32535.0
-- The CXX compiler identification is MSVC 19.36.32535.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x86/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/Professional/VC/Tools/MSVC/14.36.32532/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Could NOT find Boost (missing: Boost_INCLUDE_DIR unit_test_framework) (Required is at least version "1.46")
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - not found
-- Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: Boost_INCLUDE_DIR thread system regex
  date_time program_options filesystem) (Required is at least version "1.46")
Call Stack (most recent call first):
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  C:/Program Files/CMake/share/cmake-3.27/Modules/FindBoost.cmake:2378 (find_package_handle_standard_args)
  CMakeLists.txt:132 (find_package)


-- Configuring incomplete, errors occurred!

from cucumber-cpp.

ursfassler avatar ursfassler commented on July 21, 2024

@Gonerr @linopsa
Please reopen this issue if it is not resolved for you.
In the case it works for you, I would appreciate if you can help others by doing one or more:

  • Add your solution here
  • Add Windows to the CI (with a github action) that:
    • compiles cucumber-cpp
    • runs the tests
    • runs the examples

from cucumber-cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.