On Thu, Jul 21, 2011 at 03:29, Ankur Sinha <sanjay.ankur@xxxxxxxxx> wrote: > Hello, > > In the cmake version residing in rawhide, the UseSWIG.cmake file is > broken. Upstream is aware of this. I've also filed a bug with fedora > here[1]. > > I'd like to find a temporary solution to this. gdcm cannot build in > rawhide, and a lot of fedora-medical related packages are failing to > build in rawhide because of this. > > I have the fedora 15 version of the UseSWIG.cmake file, which worked > correctly. How can I use this in my mock build? I need to *force* cmake > to use this file instead of it's own module. > > I've placed the f15-UseSWIG.cmake in the project/CMake directory, but > Cmake still finds its own broken module. What else does one need to do > here? > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=723652 If the problem is purely with the actual UseSWIG.cmake file and not with the supporting tools then as a temporary workaround you can stick the old UseSWIG.cmake file in a directory of it's own and somewhere in the CMakeLists.txt before "include(UseSWIG)" (easiest somewhere near the top of the root CMakeLists.txt file) put a line similar to the following: set(CMAKE_MODULE_PATH "path" ${CMAKE_MODULE_PATH}) where "path" could be the absolute path to the directory containing the UseSWIG.cmake module or ${CMAKE_CURRENT_SOURCE_DIR}/relative/path. The quotes are needed though i believe. That way your file should be found before any others. The only exception is if UseSWIG is included from another module in the standard cmake modules directory. If that's the case then cmake will always search there first. To return to the old behaviour where CMAKE_MODULE_PATH is always used first add "cmake_policy(SET CMP0017 OLD)" to the CMakeLists.txt file. All of this is based on the documentation at [1]. I haven't tested any of it myself. [1] http://www.cmake.org/cmake/help/cmake-2-8-docs.html -- There are 10 kinds of people in the world: Those who understand binary and those who don't... -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel