[Dcmlib] cmake 2.0.6 / swig is broken

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Sep 28 21:20:21 CEST 2005


Just for info, so that people know what to do when getting those errors(*)

You need to apply the following patch to your copy of UseSWIG.cmake:
http://cmake.org/cgi-bin/viewcvs.cgi/Modules/UseSWIG.cmake?root=CMake&r1=1.10&r2=1.11

===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/UseSWIG.cmake,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Modules/UseSWIG.cmake	2005/04/04 20:55:35	1.10
+++ Modules/UseSWIG.cmake	2005/06/20 17:10:09	1.11
@@ -65,9 +65,9 @@
    GET_SOURCE_FILE_PROPERTY(swig_source_file_generated ${infile} GENERATED)
    GET_SOURCE_FILE_PROPERTY(swig_source_file_cplusplus ${infile} CPLUSPLUS)
    GET_SOURCE_FILE_PROPERTY(swig_source_file_flags ${infile} SWIG_FLAGS)
-  IF(${swig_source_file_flags} STREQUAL "NOTFOUND")
+  IF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
      SET(swig_source_file_flags "")
-  ENDIF(${swig_source_file_flags} STREQUAL "NOTFOUND")
+  ENDIF("${swig_source_file_flags}" STREQUAL "NOTFOUND")
    SET(swig_source_file_fullname "${infile}")
    IF(${swig_source_file_path} MATCHES "^${CMAKE_CURRENT_SOURCE_DIR}")
      STRING(REGEX REPLACE

HTH
Mathieu

(*)
-- Check for working C compiler: /usr/bin/gcc-3.3 -- works
-- Check for working CXX compiler: /usr/bin/g++-3.3 -- works
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:68:
IF An IF command had incorrect arguments: ${swig_source_file_flags} 
STREQUAL "NOTFOUND"
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:171:
A command failed during the invocation of macro "SWIG_ADD_SOURCE_TO_MODULE".
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:70:
ENDIF An ENDIF command was found outside of a proper IF ENDIF structure. 
Or its arguments did not match the opening IF command.
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:171:
A command failed during the invocation of macro "SWIG_ADD_SOURCE_TO_MODULE".
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:68:
IF An IF command had incorrect arguments: ${swig_source_file_flags} 
STREQUAL "NOTFOUND"
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:171:
A command failed during the invocation of macro "SWIG_ADD_SOURCE_TO_MODULE".
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:70:
ENDIF An ENDIF command was found outside of a proper IF ENDIF structure. 
Or its arguments did not match the opening IF command.
CMake Error: Error in cmake code at
/usr/share/CMake/Modules/UseSWIG.cmake:171:
A command failed during the invocation of macro "SWIG_ADD_SOURCE_TO_MODULE".
-- Configuring done



More information about the Dcmlib mailing list