Skip to content

small cmake string replace bug in exception-flags.cmake #2510

@tuanthien

Description

@tuanthien

This line will fail when CMAKE_CXX_FLAGS is empty string

string(REPLACE "/EHsc" "/EHs-c-" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})

Exception has occurred: FATAL_ERROR
CMake Error at E:/Cache/CPM/simdjson/b60a1c5b9db0e95e26bfa614d41a391da7385d29/cmake/exception-flags.cmake:20 (string):
  string sub-command REPLACE requires at least four arguments.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions