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

#8 · open · 0 comments

View on GitHub ↗

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.

Comments