The following issue has been SUBMITTED. 
====================================================================== 
http://public.kitware.com/Bug/view.php?id=14608 
====================================================================== 
Reported By:                Erik Sjölund
Assigned To:                
====================================================================== 
Project:                    CMake
Issue ID:                   14608
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2013-11-29 10:51 EST
Last Modified:              2013-11-29 10:51 EST
====================================================================== 
Summary:                    segmentation fault when "export(TARGETS
nonexistenttarget FILE somefile.cmake")
Description: 
If "foobar" is not a target, this CMakeLists.txt content triggers a segmentation
fault:

export(TARGETS foobar FILE somefile.cmake)


The segmentation fault happens for the nighly build
cmake-2.8.12.20131128-ga13cc-Linux-i386 but not for cmake 2.8.11.2 where instead
an error message is shown.


Steps to Reproduce: 
user@ubuntu:/tmp$ uname -m
x86_64
user@ubuntu:/tmp$ cat /etc/issue
Ubuntu 13.10 \n \l
user@ubuntu:/tmp$ cat /tmp/CMakeLists.txt 
cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
export(TARGETS foobar FILE somefile.cmake)
user@ubuntu:/tmp$ cmake --version
cmake version 2.8.11.2
user@ubuntu:/tmp$ dir=`mktemp -d` ; cd $dir
user@ubuntu:/tmp/tmp.Q8C5VD8vgw$ cmake /tmp
CMake Error at CMakeLists.txt:2 (export):
  export given target "foobar" which is not built by this project.


-- Configuring incomplete, errors occurred!
user@ubuntu:/tmp/tmp.Q8C5VD8vgw$ dir=`mktemp -d` ; cd $dir
user@ubuntu:/tmp/tmp.NdOyHKvLMl$
~/cmake/cmake-2.8.12.20131128-ga13cc-Linux-i386/bin/cmake /tmp
-- Configuring done
Segmentation fault (core dumped)
user@ubuntu:/tmp/tmp.NdOyHKvLMl$  
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2013-11-29 10:51 Erik Sjölund   New Issue                                    
======================================================================

--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to