Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mirrors
SuperElastix
Commits
9ee498fc
Commit
9ee498fc
authored
Nov 01, 2017
by
Kasper Marstal
Browse files
COMP: Fix CommandLineInterface test
parent
2e41d737
Changes
4
Show whitespace changes
Inline
Side-by-side
Applications/CommandLineInterface/ApplicationCommandLineInterface.cmake
View file @
9ee498fc
...
...
@@ -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
...
...
Applications/CommandLineInterface/CMakeLists.txt
View file @
9ee498fc
...
...
@@ -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
file
system REQUIRED QUIET
)
find_package
(
Boost COMPONENTS program_options
file
system system
regex
REQUIRED QUIET
)
include_directories
(
${
Boost_INCLUDE_DIR
}
)
# Compile executable
...
...
Applications/CommandLineInterface/test/selxConfigurationReaderTest.cxx
View file @
9ee498fc
...
...
@@ -40,16 +40,16 @@ public:
TEST_F
(
ConfigurationReaderTest
,
ReadXML
)
{
ConfigurationReader
::
BlueprintPointerType
blueprint
;
BlueprintImpl
blueprint
;
EXPECT_NO_THROW
(
blueprint
=
ConfigurationReader
::
From
XML
(
this
->
dataManager
->
GetConfigurationFile
(
"itkv4_SVF_ANTsCC.xml"
)
)
);
blueprint
->
Write
(
this
->
dataManager
->
GetOutputFile
(
"configurationReaderTest_itkv4_SVF_ANTsCC.xml.dot"
)
);
EXPECT_NO_THROW
(
blueprint
=
ConfigurationReader
::
From
File
(
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
::
From
Json
(
this
->
dataManager
->
GetConfigurationFile
(
"itkv4_SVF_ANTsCC.json"
)
)
);
blueprint
->
Write
(
this
->
dataManager
->
GetOutputFile
(
"configurationReaderTest_itkv4_SVF_ANTsCC.json.dot"
)
);
EXPECT_NO_THROW
(
blueprint
=
ConfigurationReader
::
From
File
(
this
->
dataManager
->
GetConfigurationFile
(
"itkv4_SVF_ANTsCC.json"
)
)
);
blueprint
.
Write
(
this
->
dataManager
->
GetOutputFile
(
"configurationReaderTest_itkv4_SVF_ANTsCC.json.dot"
)
);
}
CMake/selxApplications.cmake
View file @
9ee498fc
...
...
@@ -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
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment