mirror of
https://github.com/g-truc/glm.git
synced 2024-11-15 14:24:36 +00:00
cmake: Don't build tests when not testing
This commit is contained in:
parent
e69271e766
commit
cd65199935
@ -30,11 +30,13 @@ source_group("GTX Files" FILES ${GTX_HEADER})
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
|
||||
|
||||
add_executable(${NAME} ${ROOT_TEXT}
|
||||
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
||||
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
||||
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
||||
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
|
||||
if(GLM_TEST_ENABLE)
|
||||
add_executable(${NAME} ${ROOT_TEXT}
|
||||
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
|
||||
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
|
||||
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
|
||||
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
|
||||
endif(GLM_TEST_ENABLE)
|
||||
|
||||
#add_library(glm STATIC glm.cpp)
|
||||
#add_library(glm_shared SHARED glm.cpp)
|
||||
|
@ -1,10 +1,12 @@
|
||||
function(glmCreateTestGTC NAME)
|
||||
set(SAMPLE_NAME test-${NAME})
|
||||
add_executable(${SAMPLE_NAME} ${NAME}.cpp)
|
||||
if(GLM_TEST_ENABLE)
|
||||
set(SAMPLE_NAME test-${NAME})
|
||||
add_executable(${SAMPLE_NAME} ${NAME}.cpp)
|
||||
|
||||
add_test(
|
||||
NAME ${SAMPLE_NAME}
|
||||
COMMAND $<TARGET_FILE:${SAMPLE_NAME}> )
|
||||
add_test(
|
||||
NAME ${SAMPLE_NAME}
|
||||
COMMAND $<TARGET_FILE:${SAMPLE_NAME}> )
|
||||
endif(GLM_TEST_ENABLE)
|
||||
endfunction()
|
||||
|
||||
add_subdirectory(bug)
|
||||
|
Loading…
Reference in New Issue
Block a user