I've already posted the question about different targets with the same
name. I'm trying to change my project's cmake configuration towards it
like this (this is a very simplicated example):

|-- foo
|---- cmake_foo1
|------- CMakeLists.txt
|---- cmake_foo2
|------- CMakeLists.txt
|
|---- bar.cpp
|---- CMakeLists.txt
|---- foo.cpp
|---- foo.rc

cmake_foo1/CMakeLists.txt:
add_library(foo1 ../bar.cpp ../foo.cpp ../foo.rc)

cmake_foo2/CMakeLists.txt ist similar.

I've got the wrong intermediate path for foo.cpp and foo.rc, because
CMake thinks, its the same filename, so it must generate the output in
different dirs.
I've got the cmake source code and tried to debug. I've found out,
that the function cmLocalVisualStudioGenerator::CountObjectNames
calculates object file name wrong. It adds "obj" regardless source
file type. It must be
-----
objectName += this->GlobalGenerator->GetLanguageOutputExtension(*sf)
-----
instead.

I think, its a easy fix.
-- 
BG,
Alexey
_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

Reply via email to