CMakeLists.txt 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
  2. cmake_policy(VERSION 2.6)
  3. project(glm)
  4. enable_testing()
  5. add_definitions(-D_CRT_SECURE_NO_WARNINGS)
  6. if(CMAKE_COMPILER_IS_GNUCXX)
  7. #add_definitions(/Za)
  8. #add_definitions(-pedantic)
  9. #add_definitions(-S)
  10. #add_definitions(-s)
  11. #add_definitions(-msse2)
  12. #add_definitions(-std=c++0x)
  13. #add_definitions(-fms-extensions)
  14. #add_definitions(-D_MSC_EXTENSIONS)
  15. #add_definitions(-m32)
  16. #add_definitions(-mfpmath=387)
  17. #add_definitions(-ffast-math)
  18. #add_definitions(-O3)
  19. #add_definitions(-fprofile-arcs -ftest-coverage) gcov
  20. #ctest_enable_coverage()
  21. endif()
  22. include_directories(".")
  23. include_directories("./test/external")
  24. add_subdirectory(glm)
  25. add_subdirectory(test)
  26. add_subdirectory(bench)
  27. add_subdirectory(doc)
  28. option(GLM_TEST_MODE "GLM test" OFF)
  29. if(NOT GLM_TEST_MODE)
  30. message(FATAL_ERROR "GLM is a header only library, no need to build it. Set the option GLM_TEST_MODE with ON to build and run the test bench")
  31. endif()
  32. install(DIRECTORY glm DESTINATION include)