[CMake] ExternalPackage_Add with Non-CMake project that runs differently then equivalent shell script
Williams, Norman K
norman-k-williams at uiowa.edu
Wed May 28 13:58:25 EDT 2014
make VERBOSE=1 is specific to the Unix make command. You get a similar
effect by specifying CMAKE_VERBOSE_MAKEFILES.
A more fruitful method might be to try and fix the Cmake build system for
Metis, I found a relatively simple fix that made that work, but I couldn’t
find any way to contact the Metis developers and suggest better ways to
use Cmake. There are a a bunch of little things (using GLOB to build
lists of source files) and one BIG thing (using try_compile to change the
CMAKE_CFLAGS instead of using configure to generate a C/C++ header to
control configuration).
I don’t know what the solution is. Like I said, file it as a bug report,
and attach the CMakeLists.txt I wrote which is more succinct and
independent of your local programming environment.
From: Chad Balen <cbalen at ualberta.ca>
Date: Tuesday, May 27, 2014 at 3:56 PM
To: Mushly McMushmaster <norman-k-williams at uiowa.edu>
Cc: CMake Users <cmake at cmake.org>
Subject: Re: [CMake] ExternalPackage_Add with Non-CMake project that runs
differently then equivalent shell script
Hi Norman,
I used your CMakeLists script and I tried adding VERBOSE=1 likeso:
BUILD_COMMAND ${CMAKE_BUILD_TOOL} VERBOSE=1
But I still get the same error (I also tried adding VERBOSE to the end of
the CONFIGURE_COMMAND and INSTALL_COMMAND but same thing). Maybe it's
worth noting in terminal the VERBOSE command resulted in this also being
printed throughout the make process:
Dependee
"/Build/Metis/src/Metis/build/Linux-x86_64/libmetis/CMakeFiles/metis.dir/De
pendInfo.cmake" is newer than depender
"/Build/Metis/src/Metis/build/Linux-x86_64/libmetis/CMakeFiles/metis.dir/de
pend.internal".
Dependee
"/Build/Metis/src/Metis/build/Linux-x86_64/libmetis/CMakeFiles/CMakeDirecto
ryInformation.cmake" is newer than depender
"/Build/Metis/src/Metis/build/Linux-x86_64/libmetis/CMakeFiles/metis.dir/de
pend.internal".
Anyways I then went set CMAKE_VERBOSE_MAKEFILE to ON likeso:
SET(CMAKE_VERBOSE_MAKEFILE ON)
ExternalProject_Add(Metis ...
and then it told me: make[4]: *** No rule to make target `w'
where it used to say target 's'. Did I not use VERBOSE correctly? If I did
use it correctly then your solution may be machine dependent then.
Interestingly, if I jump from config to make install likeso:
CONFIGURE_COMMAND ${CMAKE_BUILD_TOOL} config shared=1
prefix=${CMAKE_INSTALL_PREFIX}/Metis
BUILD_COMMAND ${CMAKE_BUILD_TOOL} install
it will then give the same error but AFTER it installs Metis. Is there by
any chance a way to make CMake ignore this error and continue running?
That way I wouldn't have to wait for a fix to this bug.
Thanks for the help,
Chad
--
Chad Balen, E.I.T.
Energy Systems Design Laboratory,
3-23 Mechanical Engineering Building,
University of Alberta,
Edmonton, AB
On Tue, May 27, 2014 at 12:16 PM, Williams, Norman K
<norman-k-williams at uiowa.edu> wrote:
I took what you did it and cleaned it up a bit, but I ran into the same
issue. Strangely, in trying to debug it I ran
Œmake VERBOSE=1¹ and THAT command succeeded where Œmake¹ by itself had
that problem with finding the target ¹s¹
I then tried setting CMAKE_VERBOSE_MAKEFILE to ON and same thing, the
build succeeded. So I don¹t know where that target ¹s¹ complaint came from.
So maybe this is something to log as a bug.
By the way, Metis actually comes with a Cmake build setup (I.e.
CMakeLists.txt) but it¹s broken.
This is the CMakeLists.txt I wrote to test with:
cmake_minimum_required(VERSION 2.8)
project(MetisBuild)
include(ExternalProject)
ExternalProject_Add(Metis
URL
http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
<http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz>
URL_MD5 0
SOURCE_DIR Metis
BUILD_IN_SOURCE 1
BUILD_COMMAND ${CMAKE_BUILD_TOOL}
UPDATE_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_BUILD_TOOL} config shared=1
prefix=${CMAKE_INSTALL_PREFIX}/contrib/Metis
INSTALL_COMMAND ${CMAKE_BUILD_TOOL} install
INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/contrib/Metis
)
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by
the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is
confidential and may be legally privileged. If you are not the intended
recipient, you are hereby notified that any
retention, dissemination, distribution, or copying of this communication
is strictly prohibited. Please reply to the sender that you have received
the message in error, then delete it. Thank you.
________________________________
________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged. If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited. Please reply to the sender that you have received the message in error, then delete it. Thank you.
________________________________
More information about the CMake
mailing list