2010-04-29 10:56:52 +00:00
|
|
|
cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
|
|
|
cmake_policy(VERSION 2.6)
|
|
|
|
|
|
|
|
project(glm)
|
2011-02-23 14:45:54 +00:00
|
|
|
enable_testing()
|
2010-04-29 10:56:52 +00:00
|
|
|
|
|
|
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
2011-05-31 16:41:21 +00:00
|
|
|
|
|
|
|
if(CMAKE_COMPILER_IS_GNUCXX)
|
2011-10-19 20:51:45 +00:00
|
|
|
#add_definitions(/Za)
|
2011-05-31 16:41:21 +00:00
|
|
|
#add_definitions(-pedantic)
|
|
|
|
#add_definitions(-S)
|
|
|
|
#add_definitions(-s)
|
|
|
|
add_definitions(-msse2)
|
2011-09-24 22:25:09 +00:00
|
|
|
add_definitions(-std=c++0x)
|
|
|
|
add_definitions(-fms-extensions)
|
|
|
|
add_definitions(-D_MSC_EXTENSIONS)
|
2011-05-31 16:41:21 +00:00
|
|
|
#add_definitions(-m32)
|
|
|
|
#add_definitions(-mfpmath=387)
|
|
|
|
#add_definitions(-ffast-math)
|
|
|
|
#add_definitions(-O3)
|
2011-06-03 07:53:38 +00:00
|
|
|
|
|
|
|
#add_definitions(-fprofile-arcs -ftest-coverage) gcov
|
|
|
|
#ctest_enable_coverage()
|
2011-05-31 16:41:21 +00:00
|
|
|
endif()
|
2010-04-29 10:56:52 +00:00
|
|
|
|
2010-12-17 01:33:17 +00:00
|
|
|
include_directories(".")
|
2011-06-23 19:20:16 +00:00
|
|
|
include_directories("./test/external")
|
2010-12-17 01:33:17 +00:00
|
|
|
|
2010-04-29 10:56:52 +00:00
|
|
|
add_subdirectory(glm)
|
2010-12-17 01:33:17 +00:00
|
|
|
add_subdirectory(test)
|
2011-01-19 16:14:43 +00:00
|
|
|
add_subdirectory(bench)
|
2010-04-29 10:56:52 +00:00
|
|
|
add_subdirectory(doc)
|
2010-04-29 14:45:55 +00:00
|
|
|
|
2011-02-17 11:45:17 +00:00
|
|
|
option(GLM_TEST_MODE "GLM test" OFF)
|
|
|
|
if(NOT GLM_TEST_MODE)
|
2011-02-17 11:59:43 +00:00
|
|
|
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")
|
2011-02-17 11:45:17 +00:00
|
|
|
endif()
|
2011-02-15 17:25:21 +00:00
|
|
|
|
2011-02-23 14:44:05 +00:00
|
|
|
install(DIRECTORY glm DESTINATION include)
|