Skip to content

CMakeList.txt error in first practice in "CMake Practice.pdf" #8

@willson-chen

Description

@willson-chen

/backup/t1/CMakeLists.txt

PROJECT (HELLO)
SET(SRC_LIST main.c)
MESSAGE(STATUS "This is BINARY dir " ${HELLO_BINARY_DIR})
MESSAGE(STATUS "This is SOURCE dir "${HELLO_SOURCE_DIR})
ADD_EXECUTABLE(hello SRC_LIST)

line 1: space after PROJECT is unnessary.
line 4: need no space before ${HELLO_SOURCE_DIR}, or there will be warning.
line 5: ${SRC_LIST} not SRC_LIST, or there will be an error.

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