这是一个本人学习 csapp 的 learning 库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
558 B

1 year ago
  1. cmake_minimum_required(VERSION 3.16)
  2. project(CsappLearning C)
  3. set(CMAKE_C_STANDARD 11)
  4. set(BUILD_PATH ${CMAKE_SOURCE_DIR}/build) # 自定义路径变量
  5. set(LAB_PATH ${CMAKE_SOURCE_DIR}/labs)
  6. set(EXECUTABLE_OUTPUT_PATH ${BUILD_PATH}) # EXE
  7. set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${BUILD_PATH}) # LIB
  8. add_executable(TestQuiz quiz/test_quiz.c)
  9. add_executable(Mountain quiz/storage_mountain/mountain.c quiz/storage_mountain/clock.c quiz/storage_mountain/fcyc2.c)
  10. if(CMAKE_BUILD_TYPE AND (CMAKE_BUILD_TYPE STREQUAL "Debug"))
  11. add_definitions(-DDEBUG)
  12. endif()