Skip to content

cmake error relating to REGEX and CORRADE_CXX_FLAGS #457

Closed
@TimYorke

Description

@TimYorke

After installing Magnum using vcpkg (x64-windows), I got this error when trying to configure my cmake project:

CMake Error at C:/Users/timyo/dev/libs/vcpkg/installed/x64-windows/share/cmake/Corrade/UseCorrade.cmake:302 (string): string sub-command REGEX, mode REPLACE needs at least 6 arguments total to command. Call Stack (most recent call first): C:/Users/timyo/dev/libs/vcpkg/installed/x64-windows/share/cmake/Corrade/FindCorrade.cmake:592 (include) C:/Users/timyo/dev/libs/vcpkg/installed/x64-windows/share/cmake/Corrade/CorradeConfig.cmake:26 (include) C:/Users/timyo/dev/libs/vcpkg/scripts/buildsystems/vcpkg.cmake:439 (_find_package) C:/Users/timyo/dev/libs/vcpkg/installed/x64-windows/share/cmake/Magnum/FindMagnum.cmake:233 (find_package) C:/Users/timyo/dev/libs/vcpkg/installed/x64-windows/share/cmake/Magnum/MagnumConfig.cmake:26 (include) C:/Users/timyo/dev/libs/vcpkg/scripts/buildsystems/vcpkg.cmake:439 (_find_package) CMakeLists.txt:6 (find_package)

I guessed that it was because CORRADE_CXX_FLAGS wasn't set, and worked around it by adding a check for this before the REGEX command.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions