SHARE
TWEET

Untitled

a guest Mar 11th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 2.8.2)
  2.  
  3. set(CMAKE_BUILD_TYPE Debug)
  4.  
  5. if(${CMAKE_VERSION} VERSION_LESS 2.8.2)
  6.   cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
  7. endif()
  8.  
  9. project(mt1 DESCRIPTION "Multithreading Task 1" LANGUAGES CXX)
  10.  
  11. set(THREADS_PREFER_PTHREAD_FLAG ON) --
  12. set(CURSES_USE_NCURSES TRUE)
  13. find_package(Curses REQUIRED)
  14. find_package(Threads REQUIRED)  --
  15. include_directories(${CURSES_INCLUDE_DIRS})
  16.  
  17. find_program(CMAKE_CXX_CPPCHECK NAMES cppcheck)
  18. if(CMAKE_CXX_CPPCHECK)
  19.   list(APPEND CMAKE_CXX_CPPCHECK
  20.               "--enable=warning"
  21.               "--inconclusive"
  22.               "--force"
  23.               "--inline-suppr")
  24. endif()
  25.  
  26. set(HEADERS
  27.     ${CMAKE_SOURCE_DIR}/include/ball.hpp
  28.     ${CMAKE_SOURCE_DIR}/include/window.hpp
  29.     ${CMAKE_SOURCE_DIR}/include/direction.hpp
  30. )
  31.  
  32. set(SOURCES
  33.     ${CMAKE_SOURCE_DIR}/src/main.cpp
  34.     ${CMAKE_SOURCE_DIR}/src/window.cpp
  35.     ${CMAKE_SOURCE_DIR}/src/direction.cpp
  36.     ${CMAKE_SOURCE_DIR}/src/ball.cpp)
  37.  
  38. add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS})
  39.  
  40.  
  41. set_target_properties(${PROJECT_NAME}
  42.                       PROPERTIES CXX_STANDARD
  43.                                  17
  44.                                  CXX_STANDARD_REQUIRED
  45.                                  ON)
  46.  
  47. target_link_libraries(${PROJECT_NAME} ${CURSES_LIBRARY})
  48. target_link_libraries(${PROJECT_NAME} Threads::Threads) --
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top