Skip to content

install(EXPORT "AxiomTargets") fails due to missing hwy target in export set #27

Description

@gnusupport

When configuring the project, CMake fails with the following error:

CMake Error: install(EXPORT "AxiomTargets" ...) includes target "axiom" which requires target "hwy" that is not in any export set.
-- Configuring done (10.6s)
CMake Error: install(EXPORT "AxiomTargets" ...) includes target "axiom" which requires target "hwy" that is not in any export set.
-- Generating done (0.0s)
CMake Generate step failed.  Build files cannot be regenerated correctly.
make: *** [Makefile:29: configure] Error 1

The third_party/axiom/CMakeLists.txt file installs the axiom target but excludes the hwy (Google Highway library) target from the export set, even though axiom depends on it. This causes CMake to fail when generating install rules.

Environment

OS: Debian/GNU Trixie
Compiler: gcc (Debian 14.2.0-19) 14.2.0, g++ (Debian 14.2.0-19) 14.2.0
Highway version: 1.2.0-2+b2 (system installed)
cmake version 3.31.

Solution Applied

Modified third_party/axiom/CMakeLists.txt to include hwy in the install targets:

BEFORE:

install(TARGETS axiom
    EXPORT AxiomTargets
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

AFTER:

install(TARGETS axiom hwy
    EXPORT AxiomTargets
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
    INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
)

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