Skip to content

Build test with CMake failed #409

Description

@chenqiuhao1997

Build test with CMake failed with error below.

[cmake] CMake Error at third/tcmalloc/tcmalloc/tcmalloc_helpers.cmake:75 (target_link_libraries):
[cmake]   Target "tcmalloc_testing_tcmalloc_test_small_but_slow_with_assertions"
[cmake]   links to:
[cmake] 
[cmake]     tcmalloc::tcmalloc_small_but_slow_with_assertions
[cmake] 
[cmake]   but the target was not found.  Possible reasons include:
[cmake] 
[cmake]     * There is a typo in the target name.
[cmake]     * A find_package call is missing for an IMPORTED target.
[cmake]     * An ALIAS target is missing.

This bug may be caused by the commit 88d9d1e which forgot to remove tcmalloc_cc_test with NAME ${TCMALLOC_NAME}_small_but_slow_with_assertions around codes below.

tcmalloc_cc_test(NAME ${TCMALLOC_NAME}_small_but_slow_with_assertions
SRCS ${TCMALLOC_SRCS}
HDRS ${TCMALLOC_HDRS}
COPTS ${TCMALLOC_COPTS} -DTCMALLOC_INTERNAL_SMALL_BUT_SLOW
LINKOPTS ${TCMALLOC_LINKOPTS}
DEPS ${TCMALLOC_DEPS} $<LINK_LIBRARY:WHOLE_ARCHIVE,tcmalloc::tcmalloc_small_but_slow_with_assertions,tcmalloc::common_small_but_slow_with_assertions>
)
set_tests_properties(${TCMALLOC_NAME}_small_but_slow_with_assertions PROPERTIES ENVIRONMENT "TEST_TMPDIR=${CMAKE_CURRENT_BINARY_DIR};TEST_SRCDIR=${CMAKE_SOURCE_DIR}")

Are there any requirements for creating a PR if necessary?

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