Dear all,
Im using Windows and the compiler is VS2005. I wrote a CMakeLists.txt file to
run a image registration program, which generates a executable named as
FFD_3D_mask.exe. This executable takes some arguments as names of input and
output files. The CMake file is written as the following, and it runs properly
and the generated executable also works fine by inputing the arguments manually
in the command window.
-----------------cmake_minimum_required(VERSION 2.8)
PROJECT(FFD_3D_mask)
FIND_PACKAGE(ITK)
IF(ITK_FOUND) INCLUDE(${ITK_USE_FILE})ELSE(ITK_FOUND) MESSAGE(FATAL_ERROR
"ITK not found. Please set ITK_DIR.")ENDIF(ITK_FOUND)
ADD_EXECUTABLE(FFD_3D_mask FFD_3D_mask.cxx )
TARGET_LINK_LIBRARIES(FFD_3D_mask ITKCommon ITKIO ITKNumerics ITKStatistics)
------------
Then I tried to automatically run the executable, without having to type the
arguments manually everytime. Then I added the following lines. I build the
executable first, and then build the RUN_TEST. The test is failed, and the
error message is attached. I am not sure whether the code I wrote was wrong, or
didnt build the test properly?
----------------------
ENABLE_TESTING()
SET(IMAGE_DIR "C:/MRI/Images/MHD")
ADD_TEST(RUN_TEST FFD_3D_mask.exe ${IMAGE_DIR}/fixed.mhd
${IMAGE_DIR}/flirt.mhd ${IMAGE_DIR}/output.mhd ${IMAGE_DIR}/mask_fix.mhd
${IMAGE_DIR}/mask_moving.mhd DiffAfter.mhd DiffBefore.mhd
DeformationField.mhd 1 1 TransformationParas.txt 5
IdenTransform.tfm) ------------------------
The error msg
1>------ Build started: Project: RUN_TESTS, Configuration: Debug Win32 ------1>
1>Performing Post-Build Event...1>Test project
C:/MRI/ITK/test/Registration/Deformable/3D_mask/build1> Start 1:
RUN_TEST1>1/1 Test #1: RUN_TEST .........................***Failed 7.47
sec1>0% tests passed, 1 tests failed out of 11>Total Test time (real) = 7.50
sec1>The following tests FAILED:1> 1 - RUN_TEST (Failed)1>Errors while
running CTest1>Project : error PRJ0019: A tool returned an error code from
"Performing Post-Build Event..."1>Build log was saved at
"file://c:\MRI\ITK\test\Registration\Deformable\3D_mask\build\RUN_TESTS.dir\Debug\BuildLog.htm"1>RUN_TESTS
- 1 error(s), 0 warning(s)========== Build: 0 succeeded, 1 failed, 0
up-to-date, 0 skipped ==========
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail
you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake