RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 896116 - cmake add_custom_target not working
Summary: cmake add_custom_target not working
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cmake
Version: 6.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Patsy Griffin
QA Contact: Martin Cermak
URL:
Whiteboard:
Depends On: 606892
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-16 16:33 UTC by Brad Bell
Modified: 2014-10-14 07:11 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:11:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Bash script that demonstrates the bug (765 bytes, application/x-shellscript)
2013-01-16 16:33 UTC, Brad Bell
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1506 0 normal SHIPPED_LIVE cmake bug fix and enhancement update 2014-10-14 01:22:34 UTC

Description Brad Bell 2013-01-16 16:33:47 UTC
Created attachment 679703 [details]
Bash script that demonstrates the bug

Description of problem:
After building a custom target, cmake seems to forget it has done so. 

How reproducible:
Always.

Steps to Reproduce:
Run the attached bash script. Note that the created the sub-directory build (of the current working directory) where files are created and cmake is run.

------------------------------------
Actual results: (run on Redhat 6.3):
------------------------------------
[bradbell@gorst trash]$ ./cmake_target.sh
Linux gorst.ihme.washington.edu 2.6.32-279.9.1.el6.x86_64 #1 SMP Fri Aug 31 09:04:24 EDT 2012 x86_64 x86_64 x86_64 GNU/Linux
cmake version 2.6-patch 4
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /homes/bradbell/trash/build
Scanning dependencies of target hello_two
[ 50%] Building CXX object CMakeFiles/hello_two.dir/hello_two.cpp.o
Linking CXX executable hello_two
[ 50%] Built target hello_two
Scanning dependencies of target check_two
hello_two

[ 50%] Built target check_two
Scanning dependencies of target hello_one
[100%] Building CXX object CMakeFiles/hello_one.dir/hello_one.cpp.o
Linking CXX executable hello_one
[100%] Built target hello_one
Scanning dependencies of target check_one
hello_one

[100%] Built target check_one
Scanning dependencies of target check
make[3]: *** No rule to make target `check_one', needed by `CMakeFiles/check'.  Stop.
make[2]: *** [CMakeFiles/check.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
[bradbell@gorst trash]$ 


------------------------------------
Expected results: (run on Fedora 17)
------------------------------------
[bradbell@brad bug]$ ./cmake_target.sh
Linux brad.home 3.6.10-2.fc17.x86_64 #1 SMP Tue Dec 11 18:07:34 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
cmake version 2.8.9
-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/bradbell/cppad/trunk/bug/build
Scanning dependencies of target hello_one
[ 50%] Building CXX object CMakeFiles/hello_one.dir/hello_one.cpp.o
Linking CXX executable hello_one
[ 50%] Built target hello_one
Scanning dependencies of target check_one
hello_one

[ 50%] Built target check_one
Scanning dependencies of target hello_two
[100%] Building CXX object CMakeFiles/hello_two.dir/hello_two.cpp.o
Linking CXX executable hello_two
[100%] Built target hello_two
Scanning dependencies of target check_two
hello_two

[100%] Built target check_two
Scanning dependencies of target check
[100%] Built target check
[bradbell@brad bug]$ 

-----------------
Additional info:
-----------------
I have posted this on the cmake mailing list and, as yet, have not gotten a reply; see
    http://www.cmake.org/pipermail/cmake/2013-January/053213.html

Perhaps upgrading to cmake 2.8 as suggested by
    https://bugzilla.redhat.com/show_bug.cgi?id=606892
would solve this problem (since that is what is running on Fedora 17)

This is causing the el6 cppad build to fail. A copy of the attached script can be found at
    https://projects.coin-or.org/CppAD/browser/trunk/bug/cmake_target.sh

Comment 2 RHEL Program Management 2013-01-16 18:10:23 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Comment 3 Orion Poplawski 2014-03-05 17:13:33 UTC
FYI - cmake28 is available from Fedora EPEL.

Comment 8 errata-xmlrpc 2014-10-14 07:11:15 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1506.html


Note You need to log in before you can comment on or make changes to this bug.