cucumber / cucumber-cpp

Support for writing Cucumber step definitions in C++
MIT License
306 stars 131 forks source link

Better integration with CMake 3.13 #214

Closed ghost closed 5 years ago

ghost commented 5 years ago

Use case

FetchContent_Declare (cucumber_cpp
    GIT_REPOSITORY https://github.com/cucumber/cucumber-cpp.git
)

FetchContent_GetProperties (cucumber_cpp)
if (NOT cucumber_cpp_POPULATED)

    FetchContent_Populate (cucumber_cpp)

    set (CUKE_DISABLE_GTEST ON)
    add_subdirectory (
        ${cucumber_cpp_SOURCE_DIR}
        ${cucumber_cpp_BINARY_DIR}
    )

endif ()

Prints the following warning:

CMake Warning (dev) at build/_deps/cucumber_cpp-src/CMakeLists.txt:14 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'CUKE_DISABLE_GTEST'.
This warning is for project developers.  Use -Wno-dev to suppress it.

Possible solutions