[cmake-developers] [CMake 0013360]: Java add_jar() doesn't copy resources to build directory when make is run for the first time
Mantis Bug Tracker
mantis at public.kitware.com
Thu Jun 28 07:16:05 EDT 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13360
======================================================================
Reported By: Marcin Wojdyr
Assigned To:
======================================================================
Project: CMake
Issue ID: 13360
Category: Modules
Reproducibility: always
Severity: major
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-06-28 07:16 EDT
Last Modified: 2012-06-28 07:16 EDT
======================================================================
Summary: Java add_jar() doesn't copy resources to build
directory when make is run for the first time
Description:
With this CMakeLists.txt:
cmake_minimum_required(VERSION 2.8.6)
find_package(Java)
include(UseJava)
project(foo Java)
add_jar(foo foo.java res1.txt)
the first time I run "make" it fails with message:
res1.txt : no such file or directory
but when I run make again it works:
[ 25%] Copying res1.txt to the build directory
[100%] Built target foo
Additional Information:
Full session:
$ cmake .
CMake Warning at /usr/share/cmake/Modules/FindJava.cmake:120 (message):
regex not supported: java version "1.7.0_03-icedtea"
OpenJDK Runtime Environment (fedora-2.2.1.fc17.8-x86_64)
OpenJDK 64-Bit Server VM (build 23.0-b21, mixed mode). Please report
Call Stack (most recent call first):
CMakeLists.txt:2 (find_package)
-- Found Java: /bin/java (found version "..")
-- Configuring done
-- Generating done
-- Build files have been written to: /run/mw/test/sub
$ make
Scanning dependencies of target foo
[ 25%] Building Java objects for foo.jar
[ 50%] Generating CMakeFiles/foo.dir/java_class_filelist
[ 75%] Creating Java archive foo.jar
res1.txt : no such file or directory
make[2]: *** [foo.jar] Error 1
make[1]: *** [CMakeFiles/foo.dir/all] Error 2
make: *** [all] Error 2
$ make
[ 25%] Copying res1.txt to the build directory
[100%] Built target foo
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-06-28 07:16 Marcin Wojdyr New Issue
======================================================================
More information about the cmake-developers
mailing list