Commit 9ee498fc authored by Kasper Marstal's avatar Kasper Marstal
Browse files

COMP: Fix CommandLineInterface test

parent 2e41d737
......@@ -27,19 +27,14 @@ set( ${APPLICATION}_SOURCE_FILES
${${APPLICATION}_SOURCE_DIR}/src/selxConfigurationReader.cxx
)
set( ${APPLICATION}_LINK_LIBRARIES
${ITK_LIBRARIES}
${Boost_LIBRARIES}
${SUPERELASTIX_LIBRARIES}
)
set( ${APPLICATION}_MODULE_DEPENDENCIES
ModuleFilter
)
set( ${APPLICATION}_TEST_SOURCE_FILES
${${APPLICATION}_SOURCE_DIR}/test/selxConfigurationReaderTest.cxx
)
# TODO: Find out how to include selxConfigurationReader.cxx in compilation unit
#set( ${APPLICATION}_TEST_SOURCE_FILES
# ${${APPLICATION}_SOURCE_DIR}/test/selxConfigurationReaderTest.cxx
#)
set( ${APPLICATION}_INTEGRATION_TEST_SOURCE_FILES
${${APPLICATION}_SOURCE_DIR}/test/integration.cmake
......
......@@ -36,7 +36,7 @@ set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost COMPONENTS program_options system filesystem REQUIRED QUIET )
find_package(Boost COMPONENTS program_options filesystem system regex REQUIRED QUIET )
include_directories( ${Boost_INCLUDE_DIR} )
# Compile executable
......
......@@ -40,16 +40,16 @@ public:
TEST_F( ConfigurationReaderTest, ReadXML )
{
ConfigurationReader::BlueprintPointerType blueprint;
BlueprintImpl blueprint;
EXPECT_NO_THROW( blueprint = ConfigurationReader::FromXML( this->dataManager->GetConfigurationFile( "itkv4_SVF_ANTsCC.xml" ) ) );
blueprint->Write( this->dataManager->GetOutputFile( "configurationReaderTest_itkv4_SVF_ANTsCC.xml.dot" ) );
EXPECT_NO_THROW( blueprint = ConfigurationReader::FromFile( this->dataManager->GetConfigurationFile( "itkv4_SVF_ANTsCC.xml" ) ) );
blueprint.Write( this->dataManager->GetOutputFile( "configurationReaderTest_itkv4_SVF_ANTsCC.xml.dot" ) );
}
TEST_F( ConfigurationReaderTest, ReadJson )
{
ConfigurationReader::BlueprintPointerType blueprint;
BlueprintImpl blueprint;
EXPECT_NO_THROW( blueprint = ConfigurationReader::FromJson( this->dataManager->GetConfigurationFile( "itkv4_SVF_ANTsCC.json" ) ) );
blueprint->Write( this->dataManager->GetOutputFile( "configurationReaderTest_itkv4_SVF_ANTsCC.json.dot" ) );
EXPECT_NO_THROW( blueprint = ConfigurationReader::FromFile( this->dataManager->GetConfigurationFile( "itkv4_SVF_ANTsCC.json" ) ) );
blueprint.Write( this->dataManager->GetOutputFile( "configurationReaderTest_itkv4_SVF_ANTsCC.json.dot" ) );
}
......@@ -97,15 +97,14 @@ macro( _selxapplication_enable APPLICATION UPSTREAM )
endif()
add_executable( ${${APPLICATION}_TARGET_NAME} "${${APPLICATION}_HEADER_FILES}" "${${APPLICATION}_SOURCE_FILES}" )
if( ${APPLICATION}_LINK_LIBRARIES )
target_link_libraries( ${${APPLICATION}_TARGET_NAME} ${${APPLICATION}_LINK_LIBRARIES} )
endif()
target_link_libraries( ${${APPLICATION}_TARGET_NAME} ${SUPERELASTIX_LIBRARIES} ${ITK_LIBRARIES} ${Boost_LIBRARIES} )
if( BUILD_TESTING AND ${APPLICATION}_TEST_SOURCE_FILES )
list( APPEND SUPERELASTIX_TEST_SOURCE_FILES ${APPLICATION}_TEST_SOURCE_FILES )
endif()
add_dependencies( ${${APPLICATION}_TARGET_NAME} ModuleCore )
message( STATUS "${APPLICATION} enabled." )
else()
message( STATUS "${APPLICATION} already enabled." )
......@@ -113,7 +112,7 @@ macro( _selxapplication_enable APPLICATION UPSTREAM )
endmacro()
macro( _selxapplication_disable APPLICATION )
set( USE_${APPLICATION} FALSE )
set( USE_${APPLICATION} OFF )
endmacro()
macro( add_integration_test )
......
Supports Markdown
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