added proper cmake test infrastructure
This commit is contained in:
parent
21ea4e592b
commit
cc485cb4c1
@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6 FATAL_ERROR)
|
|||||||
cmake_policy(VERSION 2.6)
|
cmake_policy(VERSION 2.6)
|
||||||
|
|
||||||
project(glm)
|
project(glm)
|
||||||
|
enable_testing()
|
||||||
|
|
||||||
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
#add_definitions(-S)
|
#add_definitions(-S)
|
||||||
@ -14,12 +15,15 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|||||||
|
|
||||||
include_directories(".")
|
include_directories(".")
|
||||||
|
|
||||||
|
|
||||||
add_subdirectory(glm)
|
add_subdirectory(glm)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
add_subdirectory(bench)
|
add_subdirectory(bench)
|
||||||
add_subdirectory(doc)
|
add_subdirectory(doc)
|
||||||
|
|
||||||
option(GLM_DEVELOPMENT_MODE "GLM development" OFF)
|
# option(GLM_DEVELOPMENT_MODE "GLM development" OFF)
|
||||||
if(NOT GLM_DEVELOPMENT_MODE)
|
# if(NOT GLM_DEVELOPMENT_MODE)
|
||||||
message(FATAL_ERROR "GLM is a header only library, no need to build it")
|
# message(FATAL_ERROR "GLM is a header only library, no need to build it")
|
||||||
endif()
|
# endif()
|
||||||
|
|
||||||
|
install( DIRECTORY glm DESTINATION include )
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
function(glmCreateTestGTC NAME)
|
function(glmCreateTestGTC NAME)
|
||||||
set(SAMPLE_NAME test-${NAME})
|
set(SAMPLE_NAME test-${NAME})
|
||||||
|
|
||||||
add_executable(${SAMPLE_NAME} ${NAME}.cpp ../test.hpp ../test.cpp)
|
add_executable(${SAMPLE_NAME} ${NAME}.cpp ../test.hpp ../test.cpp)
|
||||||
endfunction(glmCreateTestGTC)
|
add_test(
|
||||||
|
NAME ${SAMPLE_NAME}
|
||||||
|
COMMAND $<TARGET_FILE:${SAMPLE_NAME}> )
|
||||||
|
endfunction()
|
||||||
|
|
||||||
add_subdirectory(bug)
|
add_subdirectory(bug)
|
||||||
add_subdirectory(core)
|
add_subdirectory(core)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user