This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 211732 - CMake - configure fails
Summary: CMake - configure fails
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.2
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: issues@cnd
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-25 18:56 UTC by gaich
Modified: 2016-08-26 05:10 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gaich 2012-04-25 18:56:06 UTC

    
Comment 1 gaich 2012-04-25 19:30:23 UTC
Configure Arguments for CMake are insufficient. CMAKE_RC_COMPILER should also be set in Automatic Mode.
I tried to create a new C++ project with existing sources using CMake.
Setting Configuration Mode to Automatic results in an CMake Error CMAKE_RC_COMPILER-NOTFOUND.
In Configuration Mode Custom I added "-DCMAKE_RC_COMPILER=C:\MinGW\bin\winres.exe" to Configure Arguments and the project was created.

CMake 2.8.8
NB 201204240400
Comment 2 Alexander Simon 2012-04-25 19:53:04 UTC
Automatic mode does not cover all use cases but only basic.
Complicated cases are covered by custom mode.
So it is not a defect.
Comment 3 gaich 2012-04-26 19:14:20 UTC
(In reply to comment #2)
> Automatic mode does not cover all use cases but only basic.
> Complicated cases are covered by custom mode.
> So it is not a defect.

With CMake 2.8.8 each configure without setting CMAKE_RC_COMPILER fails - not only complicated cases.
CMake 2.6.4 configuring the same project worked well without setting CMAKE_RC_COMPILER.
I tested both with a small c++ program using CMake-gui.exe
Setting CMAKE_RC_COMPILER would be a workaround for this strange behaviour of CMake 2.8.8.
Comment 4 soldatov 2012-04-26 20:10:23 UTC
CMakeLists.txt:
--------------------------
project(Test)
cmake_minimum_required(VERSION 2.8)
set(SRC main.cpp)
add_executable(Test ${SRC})

main.cpp:
--------------------------
int main() {
  return 0;
}

Check cmake in DOS console

cmake -G "Unix Makefiles"
==> build failed

cmake -G "Unix Makefiles" -DCMAKE_RC_COMPILER=D:/MinGW/bin/windres.exe
==> ok

For me It is a bug in CMake.
Comment 5 Alexander Simon 2012-04-27 03:53:24 UTC
Is it only Windows specific bug?
Comment 6 soldatov 2012-04-27 09:20:25 UTC
Simple scenario works correctly in Fedora 17 (gcc4.7,gdb 7.4, cmake 2.8.8). Only I see a lot of exceptions on NetBeans startup and such warnings on any build

ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
[100%] ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
Built target Test
ERROR: ld.so: object 'libBuildTrace.so' from LD_PRELOAD cannot be preloaded: ignored.
Comment 7 soldatov 2012-04-27 18:08:30 UTC
gaich, can you create bug on http://www.cmake.org?
From my point of view D:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\Platform\Windows-GNU.cmake file should be modified (see D:\Program Files (x86)\CMake 2.8\share\cmake-2.8\Modules\Platform\CYGWIN-GNU.cmake file)
If you adds "set(CMAKE_GENERATOR_RC windres)" before "enable_language(RC)", then build works nicely.
Comment 8 gaich 2012-05-01 12:06:42 UTC
Bug #13179 is created at http://www.cmake.org
Comment 9 soldatov 2012-05-01 13:27:45 UTC
direct link: http://www.cmake.org/Bug/view.php?id=12871
Comment 10 soldatov 2012-05-01 13:29:59 UTC
sorry. correct link is http://www.cmake.org/Bug/view.php?id=13179
Comment 12 soldatov 2012-11-08 08:17:20 UTC
... and released.

Published November 07, 2012
CMake 2.8.10 Just Released

On behalf of the Kitware team and broader, global CMake community, we are happy to announce the release of CMake 2.8.10. This release features support for the latest versions of Visual Studio and Xcode, target properties improvements, and updates to generator expressions.
.....
Comment 13 bluzboy 2016-08-25 20:31:34 UTC
did the recommended approach set the project directory 
to where the CMaleLists.txt was and as soon as I said
OK I got

"No make files or configure scripts found in folder"

I checked it with a terminal window and the CMakeLists.txt
is there WTF
Comment 14 Alexander Simon 2016-08-26 05:10:47 UTC
(In reply to bluzboy from comment #13)
> did the recommended approach set the project directory 
> to where the CMaleLists.txt was and as soon as I said
> OK I got
> 
> "No make files or configure scripts found in folder"
> 
> I checked it with a terminal window and the CMakeLists.txt
> is there WTF

Hi bluzboy,

Please do not reopen closed issue.
File a new issue instead.

Thanks,
Alexander