cmake: Don't build tests when not testing
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user