# # pthread/CMakeLists.txt -- # cmake_minimum_required(VERSION 2.6) project(PTHREAD C) INCLUDE(FindThreads) add_executable(pthread pthread.c) add_definitions(-D_REENTRANT -D_BSD_SOURCE -D_XOPEN_SOURCE -DDEBUG) target_link_libraries(pthread ${CMAKE_THREAD_LIBS_INIT}) set_property(SOURCE pthread.c APPEND PROPERTY COMPILE_FLAGS "--std=c99 -Wall -pedantic")