# # pthread/CMakeLists.txt -- # cmake_minimum_required(VERSION 2.6) project(PTHREAD C) INCLUDE(FindThreads) add_executable(pthread pthread.c) add_executable(pthread-echo pthread-echo.c) add_executable(fork-echo fork-echo.c) target_link_libraries(pthread ${CMAKE_THREAD_LIBS_INIT}) target_link_libraries(pthread-echo ${CMAKE_THREAD_LIBS_INIT}) if(CMAKE_COMPILER_IS_GNUCC) add_definitions(--std=c99 -Wall) endif()