When integrating VOLK via FetchContent or add_subdirectory, its CMake options are exposed in the global CMake option namespace. This can lead to unintended conflicts or ambiguity, especially in larger projects where generic option names may overlap.
For example, options like:
ENABLE_STATIC_LIBS
ENABLE_TESTING
are too generic and may clash with similarly named options from other dependencies or the parent project.
All VOLK-specific CMake options should be prefixed with VOLK_ to ensure proper namespacing and avoid polluting the global option space.
Example:
ENABLE_STATIC_LIBS -> VOLK_ENABLE_STATIC_LIBS
ENABLE_TESTING -> VOLK_ENABLE_TESTING
When integrating VOLK via
FetchContentoradd_subdirectory, its CMake options are exposed in the global CMake option namespace. This can lead to unintended conflicts or ambiguity, especially in larger projects where generic option names may overlap.For example, options like:
are too generic and may clash with similarly named options from other dependencies or the parent project.
All VOLK-specific CMake options should be prefixed with
VOLK_to ensure proper namespacing and avoid polluting the global option space.Example: