SHARE
TWEET

Untitled

a guest Sep 20th, 2019 77 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmake_minimum_required(VERSION 3.14)
  2.  
  3. #SET(CMAKE_C_COMPILER /usr/bin/g++)
  4. #SET(CMAKE_CXX_COMPILER /usr/bin/g++)
  5.  
  6.  
  7. if(NOT CMAKE_BUILD_TYPE)
  8.   set(CMAKE_BUILD_TYPE Debug CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
  9. endif()
  10.  
  11. project(run)
  12. set(EXECUTABLE_NAME "run")
  13.  
  14. file(GLOB src ${PROJECT_SOURCE_DIR}/src/*.cpp)
  15. file(GLOB include ${PROJECT_SOURCE_DIR}/include/*.h)
  16. file(GLOB audio ${PROJECT_SOURCE_DIR}/audio/*)
  17.  
  18. add_compile_options(-pedantic -MMD -MP -Wall -g -Wextra -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align  -Woverloaded-virtual -Wpedantic -Wconversion -Wsign-conversion -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wuseless-cast -fsanitize=leak)
  19. add_executable(${EXECUTABLE_NAME} ${main} ${include} ${src} ${audio} )
  20.  
  21. include_directories(${PROJECT_SOURCE_DIR}/include ${GTEST_INCLUDE_DIRS})
  22.  
  23. # set(SFML_STATIC_LIBRARIES TRUE)
  24.  
  25. set(SFML_DIR "./library/frameworks/SFML-2.5.1/lib/cmake/SFML")
  26.  
  27.  
  28. find_package(GTest REQUIRED)
  29. target_link_libraries(run sfml-graphics sfml-audio sfml-window sfml-system)
  30.  
  31. # testing
  32.  
  33. enable_testing()
  34. file(GLOB test_src_files ${PROJECT_SOURCE_DIR}/tests/*.cpp)
  35.  
  36. # add_executable(runAllTests ${test_src_files})
  37. # add_test(Tests runAllTests)
  38. # target_link_libraries(runAllTests sfml-graphics sfml-audio sfml-window sfml-system ${GTEST_LIBRARIES} pthread)
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