Skip to content

Need method to disable CPU flag detection at build time #266

Closed
@matt-domsch-sp

Description

@matt-domsch-sp

In this commit, CPU flag detection was added to the build process.

commit a1c16a6
Author: Davide Gerhard rainbow@irh.it
Date: Thu Aug 15 08:30:42 2019 +0200

cmake: new build tool

     - cpu flags are auto-discovered in the default build and it works
    on gcc/clang/msvc on x86/x86_64/arm; you can force cpu flags with
    -DFORCE_SSE=1 for example (see CMakeLists.txt on root)

When building on/for the target system, this is great. However when building in a Linux distribution environment such as Fedora, this introduces build-system dependencies on the runtime system. Specifically, a build system may support CPU instructions that are not supported on the runtime CPUs of every target.

When packaging for Fedora, I must patch out the line that invokes the FindCPUflags method. I would prefer to have a build-time define option to disable this. This allows the distribution to continue to choose the broad set of CPUs that it targets by setting the CFLAGS itself at build time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions