MantisBT - CMake
View Issue Details
0011147CMakeCMakepublic2010-08-18 11:092012-03-19 08:47
RolandSchulz 
David Cole 
normalmajoralways
closedfixed 
CMake-2-8 
CMake 2.8.4CMake 2.8.4 
0011147: VC10 error "item ... already exists under the filter"
VC10 Express reports the error 'item ... already exists under the filter ""'. We have a custum build for nasm asm files. Cmake includes the obj files produced by the custom build in two item groups. Once as:
  <ItemGroup>
    <None Include=...
   </ItemGroup>
And once as:
  <ItemGroup>
     <ClInclude Include=..
   </ItemGroup>

The part in CMakeLists.txt for the asm files is:
=====
  FOREACH(SRC ${GMX_SSEKERNEL_ASM_SRC})
    GET_FILENAME_COMPONENT(FILE_BASE ${SRC} NAME_WE)
    SET(OBJ ${CMAKE_CURRENT_BINARY_DIR}/${FILE_BASE}${CMAKE_C_OUTPUT_EXTENSION})

    ADD_CUSTOM_COMMAND(OUTPUT ${OBJ}
                       MAIN_DEPENDENCY ${SRC}
                       COMMAND ${CMAKE_ASM-NASM_COMPILER} -f ${CMAKE_ASM-NASM_OBJECT_FORMAT} -o ${OBJ} ${SRC})

    SET(ALL_ASM_OBJS ${ALL_ASM_OBJS} ${OBJ})
  ENDFOREACH(SRC ${GMX_SSEKERNEL_ASM_SRC})
  set(GMX_SSEKERNEL_ASM_OBJ ${ALL_ASM_OBJS})

add_library(gmx ${GMXLIB_SOURCES} ${BLAS_SOURCES} ${LAPACK_SOURCES} ${GMX_SSEKERNEL_C_SRC} ${GMX_SSEKERNEL_ASM_OBJ} ${THREAD_MPI_SRC})
=====

This is with Cmake 2.8.2.
No tags attached.
related to 0011459closed David Cole VS2010 Generator inserts object files as headers 
has duplicate 0011741closed David Cole ASM files generate broken vcproj files for Visual Studio 2010/x64 
related to 0013047closed Brad King Visual Studio 2010 Generator and "PROPERTIES GENERATED 1" adds .obj as "not part of this build" to projects 
Issue History
2010-08-18 11:09RolandSchulzNew Issue
2010-08-19 09:03Bill HoffmanNote Added: 0021834
2010-08-25 13:24RolandSchulzNote Added: 0021959
2010-10-07 20:52RolandSchulzNote Added: 0022450
2010-12-15 11:40David ColeNote Added: 0024165
2010-12-15 11:40David ColeAssigned To => David Cole
2010-12-15 11:40David ColeStatusnew => assigned
2010-12-15 12:21RolandSchulzNote Added: 0024175
2010-12-15 12:30David ColeNote Added: 0024178
2010-12-17 07:35David ColeTarget Version => CMake 2.8.4
2011-01-11 10:27David ColeNote Added: 0024583
2011-01-11 10:28David ColeNote Added: 0024584
2011-01-11 10:28David ColeStatusassigned => resolved
2011-01-11 10:28David ColeFixed in Version => CMake 2.8.4
2011-01-11 10:28David ColeResolutionopen => fixed
2011-01-14 09:27RolandSchulzNote Added: 0024676
2011-01-14 09:27RolandSchulzStatusresolved => feedback
2011-01-14 09:27RolandSchulzResolutionfixed => reopened
2011-01-18 18:08David ColeNote Added: 0024901
2011-01-21 03:25Robert LenhardtNote Added: 0024987
2011-01-21 03:26Robert LenhardtNote Edited: 0024987bug_revision_view_page.php?bugnote_id=24987#r149
2011-01-21 10:21David ColeRelationship addedrelated to 0011459
2011-01-21 10:39David ColeRelationship addedhas duplicate 0011741
2011-01-21 11:07David ColeStatusfeedback => assigned
2011-01-21 12:25David ColeNote Added: 0024994
2011-01-21 12:25David ColeStatusassigned => resolved
2011-01-21 12:25David ColeFixed in VersionCMake 2.8.4 =>
2011-01-21 12:25David ColeResolutionreopened => fixed
2011-01-21 18:11David ColeNote Added: 0025012
2011-01-31 16:12David ColeFixed in Version => CMake 2.8.4
2011-05-02 14:47David ColeNote Added: 0026385
2011-05-02 14:47David ColeStatusresolved => closed
2012-03-19 08:47Brad KingRelationship addedrelated to 0013047

Notes
(0021834)
Bill Hoffman   
2010-08-19 09:03   
Can you provide a small test full example of this?
(0021959)
RolandSchulz   
2010-08-25 13:24   
I haven't written the Cmake Nasm rules myself and I'm a Cmake novice. Thus I don't know how to reduce it to a small test.

The source is public available by:
git clone git://git.gromacs.org/gromacs.git [^]

And it doesn't have any dependencies. Thus it should be easy to test with the full example. Sorry for not being able to help more. Let me know if there is something I can help even as Cmake novice. Thanks.
(0022450)
RolandSchulz   
2010-10-07 20:52   
A work-around is to remove the <ItemGroup> <None ...> ... </ItemGroup> from the vcxproj file using an text editor. Than VC compile can open it and can compile correctly.
(0024165)
David Cole   
2010-12-15 11:40   
Does this still happen with CMake 2.8.3? There were a lot of VS 10 fixes put into 2.8.3 just before it was released...

Thanks for checking.
(0024175)
RolandSchulz   
2010-12-15 12:21   
Just tested it with 2.8.3. The error persists.
(0024178)
David Cole   
2010-12-15 12:30   
Thanks for checking...
(0024583)
David Cole   
2011-01-11 10:27   
This symptom should be fixed by this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13caaa3eb74a11dbf067409ea129321718d34dfe [^]

Specifically, a missing "else" was added on the line that now reads:
else if(strcmp(lang, "RC") == 0)

This commit is presently in CMake 'next' branch in git. If you want to build a CMake from there, and try it out today, and verify that it's fixed for me, that would be great.

Otherwise, unless something unexpected occurs, this change should be merged to 'master' later today, and we'll be producing the first release candidate for CMake 2.8.4 tomorrow. So... if you can't build it and try it out today, please, at least do try the CMake 2.8.4-rc1 release to verify that this is fixed.

Thanks!
(0024584)
David Cole   
2011-01-11 10:28   
Should be fixed by this commit:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=13caaa3eb74a11dbf067409ea129321718d34dfe [^]

Already in the 'next' CMake git branch.

Should be fixed in CMake 2.8.4
(0024676)
RolandSchulz   
2011-01-14 09:27   
Is it supposed to be resolved in 2.8.3.20110113? Because I just tested that version and still have the ItemGroup None.
(0024901)
David Cole   
2011-01-18 18:08   
I'm treying to reproduce this to get it fixed. Running CMake on the gromacs source tree with VS10 gives me this error about not finding FFTW3F:

CMake Error at C:/Users/davidcole/Dashboards/My Tests/CMake/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could not find FFTW3F. Provide the fftw3 install directory in the
  FFTW3F_ROOT_DIR environment variable. (missing: FFTW3F_LIBRARIES
  FFTW3F_INCLUDE_DIR)
Call Stack (most recent call first):
  C:/Users/davidcole/Dashboards/My Tests/CMake/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindFFTW3F.cmake:31 (find_package_handle_standard_args)
  CMakeLists.txt:649 (find_package)

I'm going to try to comment out this find_package to get to the point where I am reproducing the issue...
(0024987)
Robert Lenhardt   
2011-01-21 03:25   
(edited on: 2011-01-21 03:26)
Sounds like a duplicate of http://www.cmake.org/Bug/view.php?id=11459. [^] Roland, can you try to use the patch attached there and see if the problem is fixed then?

(0024994)
David Cole   
2011-01-21 12:25   
Just pushed fix to 'next'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=0cde56dda4b93a8a51196dbd8c26fdf530a70968 [^]

This will be included in the nightly installer after tonight's dashboards run.

To verify this fix, you can:
- pull from 'next' right now and build your own CMake
- wait till tomorrow and try the nightly Windows build
- hope that everything goes smoothly and we can get this into the rc2 build for CMake 2.8.4 and you can try out that installer

I verified this myself with the code from:

  git clone git://git.gromacs.org/gromacs.git [^]

Thanks
(0025012)
David Cole   
2011-01-21 18:11   
The inspriration for the fix for this issue came from the related issue, 0011459
(0026385)
David Cole   
2011-05-02 14:47   
Closing resolved issues that have not been updated in more than 3 months.