Commit c42b8e83 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

ctest: use add_test(NAME) signature

This one does the target name transformation.
parent 4364c5bd
......@@ -27,5 +27,5 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# if (SMTK_ENABLE_CGM_SESSION)
# target_link_libraries(add_a_session smtkCGMSession)
# endif (SMTK_ENABLE_CGM_SESSION)
# add_test(tut-add_a_session add_a_session)
# add_test(NAME tut-add_a_session COMMAND add_a_session)
#endif()
......@@ -27,5 +27,5 @@ if (SMTK_ENABLE_TESTING)
if (SMTK_ENABLE_CGM_SESSION)
target_link_libraries(implement_an_operator smtkCGMSession)
endif (SMTK_ENABLE_CGM_SESSION)
add_test(tut-implement_an_operator implement_an_operator)
add_test(NAME tut-implement_an_operator COMMAND implement_an_operator)
endif()
add_executable(list-cgm-engines list-cgm-engines.cxx)
target_link_libraries(list-cgm-engines smtkCGMSession smtkCore)
add_test(list-cgm-engines list-cgm-engines -test-set-default)
add_test(NAME list-cgm-engines COMMAND list-cgm-engines -test-set-default)
add_executable(test-operators test-operators.cxx)
target_link_libraries(test-operators smtkCGMSession smtkCore ${Boost_LIBRARIES})
add_test(test-operators test-operators)
add_test(NAME test-operators COMMAND test-operators)
ADD_EXECUTABLE(DiscreteSerializationTest DiscreteSerializationTest.cxx)
TARGET_LINK_LIBRARIES(DiscreteSerializationTest smtkDiscreteSession vtkSMTKDiscreteModel)
add_test(discreteModelSerializationTest DiscreteSerializationTest)
add_test(NAME discreteModelSerializationTest COMMAND DiscreteSerializationTest)
ADD_EXECUTABLE(Discrete2DModelTopologyTest Discrete2DModelTopologyTest.cxx)
TARGET_LINK_LIBRARIES(Discrete2DModelTopologyTest smtkDiscreteSession vtkSMTKDiscreteModel)
add_test(discreteModel2DModelTopologyTest Discrete2DModelTopologyTest)
add_test(NAME discreteModel2DModelTopologyTest COMMAND Discrete2DModelTopologyTest)
# ADD_EXECUTABLE(DiscreteParserV4Test DiscreteParserV4Test.cxx)
# TARGET_LINK_LIBRARIES(DiscreteParserV4Test smtkDiscreteSession vtkSMTKDiscreteModel)
# add_test(discreteModelParserV4Test
# DiscreteParserV4Test
# add_test(NAME discreteModelParserV4Test
# COMMAND DiscreteParserV4Test
# ${SMTK_DATA_DIR}/cmb/CMBParserV4Test.cmb )
# ADD_EXECUTABLE(DiscreteModelEventsTest DiscreteModelEventsTest.cxx)
# TARGET_LINK_LIBRARIES(DiscreteModelEventsTest smtkDiscreteSession)
# add_test(ModelBuilderModelEventsTest
# DiscreteModelEventsTest
# add_test(NAME ModelBuilderModelEventsTest
# COMMAND DiscreteModelEventsTest
# ${SMTK_DATA_DIR}/test2D.cmb ${SMTK_DATA_DIR}/smooth_surface.cmb)
......@@ -7,7 +7,7 @@ set(ioTests
foreach (test ${ioTests})
add_executable(${test} ${test}.cxx)
target_link_libraries(${test} smtkCore smtkCoreModelTesting)
add_test(${test} ${test})
add_test(NAME ${test} COMMAND ${test})
endforeach()
......@@ -16,8 +16,8 @@ if (SMTK_DATA_DIR)
set(writer_test ResourceSetWriterTest)
add_executable(${writer_test} ${writer_test}.cxx)
target_link_libraries(${writer_test} smtkCore ${Boost_LIBRARIES})
add_test(${writer_test}
${writer_test}
add_test(NAME ${writer_test}
COMMAND ${writer_test}
${SMTK_DATA_DIR}/smtk/attribute/Basic2DFluid.sbt
${SMTK_DATA_DIR}/smtk/attribute/copyAttributeTest.sbi
writer_output.crf
......@@ -26,8 +26,8 @@ if (SMTK_DATA_DIR)
set(reader_test ResourceSetReaderTest)
add_executable(${reader_test} ${reader_test}.cxx)
target_link_libraries(${reader_test} smtkCore ${Boost_LIBRARIES})
add_test(${reader_test}
${reader_test}
add_test(NAME ${reader_test}
COMMAND ${reader_test}
${SMTK_DATA_DIR}/smtk/attribute/resourceTest/resources.xml
2
)
......
......@@ -18,15 +18,15 @@ target_link_libraries(demoReportArrangements smtkCore smtkCoreModelTesting)
################################################################################
add_executable(unitManager unitManager.cxx)
target_link_libraries(unitManager smtkCore smtkCoreModelTesting)
add_test(unitManager unitManager)
add_test(NAME unitManager COMMAND unitManager)
add_executable(unitIterators unitIterators.cxx)
target_link_libraries(unitIterators smtkCore smtkCoreModelTesting)
add_test(unitIterators unitIterators)
add_test(NAME unitIterators COMMAND unitIterators)
add_executable(unitTessellation unitTessellation.cxx)
target_link_libraries(unitTessellation smtkCore smtkCoreModelTesting)
add_test(unitTessellation unitTessellation)
add_test(NAME unitTessellation COMMAND unitTessellation)
add_executable(unitOperator unitOperator.cxx)
smtk_operator_xml( "${CMAKE_CURRENT_SOURCE_DIR}/unitOutcomeOperator.sbt" unitOperatorXML)
......@@ -35,37 +35,37 @@ target_link_libraries(unitOperator smtkCore smtkCoreModelTesting)
if (SMTK_ENABLE_CGM_SESSION)
target_link_libraries(unitOperator smtkCGMSession)
endif (SMTK_ENABLE_CGM_SESSION)
add_test(unitOperator unitOperator)
add_test(NAME unitOperator COMMAND unitOperator)
add_executable(unitEntityRef unitEntityRef.cxx)
target_link_libraries(unitEntityRef smtkCore smtkCoreModelTesting)
add_test(unitEntityRef unitEntityRef)
add_test(NAME unitEntityRef COMMAND unitEntityRef)
add_executable(unitDefaultSession unitDefaultSession.cxx)
smtk_operator_xml( "${CMAKE_CURRENT_SOURCE_DIR}/unitForwardingOperator.sbt" unitOperatorXML)
target_include_directories(unitDefaultSession PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(unitDefaultSession smtkCore smtkCoreModelTesting)
add_test(unitDefaultSession unitDefaultSession)
add_test(NAME unitDefaultSession COMMAND unitDefaultSession)
add_executable(unitDescriptivePhrase unitDescriptivePhrase.cxx)
target_link_libraries(unitDescriptivePhrase smtkCore smtkCoreModelTesting)
add_executable(unitArrangement unitArrangement.cxx)
target_link_libraries(unitArrangement smtkCore)
add_test(unitArrangement unitArrangement)
add_test(NAME unitArrangement COMMAND unitArrangement)
add_executable(unitEntity unitEntity.cxx)
target_link_libraries(unitEntity smtkCore smtkCoreModelTesting)
add_test(unitEntity unitEntity)
add_test(NAME unitEntity COMMAND unitEntity)
add_executable(benchmarkModel benchmarkModel.cxx)
target_link_libraries(benchmarkModel smtkCore smtkCoreModelTesting)
#add_test(benchmarkModel benchmarkModel)
#add_test(NAME benchmarkModel COMMAND benchmarkModel)
################################################################################
# Tests that require SMTK_DATA_DIR
################################################################################
if (SMTK_DATA_DIR AND EXISTS ${SMTK_DATA_DIR}/ReadMe.mkd)
add_test(unitDescriptivePhrase unitDescriptivePhrase
add_test(NAME unitDescriptivePhrase COMMAND unitDescriptivePhrase
"${SMTK_DATA_DIR}/smtk/simple.json")
endif()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment