From 14678a46d28327b25957a1efc59f0c29d2a83564 Mon Sep 17 00:00:00 2001 From: Simon Rit Date: Mon, 5 Dec 2011 08:56:46 +0100 Subject: [PATCH] Gate text file I/O is not cross-platform due to regex, compile only on unix --- common/CMakeLists.txt | 10 ++++++++-- common/clitkIO.cxx | 2 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index ec826a2..380ce41 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -24,8 +24,6 @@ SET(clitkCommon_SRC clitkXdrImageIOFactory.cxx clitkHndImageIO.cxx clitkHndImageIOFactory.cxx - clitkGateAsciiImageIO.cxx - clitkGateAsciiImageIOFactory.cxx clitkDicomRTDoseIO.cxx clitkDicomRTDoseIOFactory.cxx clitkOrientation.cxx @@ -38,6 +36,14 @@ SET(clitkCommon_SRC vvImageWriter.cxx ) +IF(UNIX) + SET(clitkCommon_SRC + ${clitkCommon_SRC} + clitkGateAsciiImageIO.cxx + clitkGateAsciiImageIOFactory.cxx + ) +ENDIF(UNIX) + ### Declare clitkCommon library ADD_LIBRARY(clitkCommon STATIC ${clitkCommon_SRC}) diff --git a/common/clitkIO.cxx b/common/clitkIO.cxx index 1acd352..2126a5a 100644 --- a/common/clitkIO.cxx +++ b/common/clitkIO.cxx @@ -38,7 +38,9 @@ // Register factories void clitk::RegisterClitkFactories() { +#ifdef unix clitk::GateAsciiImageIOFactory::RegisterOneFactory(); +#endif clitk::DicomRTDoseIOFactory::RegisterOneFactory(); #if ITK_VERSION_MAJOR <= 3 itk::ImageIOFactory::RegisterBuiltInFactories(); -- 2.47.1