Hello, thanks for your reply. I saw that page already, and I understand cmake needs to work around other people's mistakes, so the fix is not an easy one. My doubt is not about setting a specific path, but about the pdbs ending up in the same spot. Is there any known problem with the pdbs overwriting each other? Or is that safe? Couldn't you just call them *.compiler.pdb and *.linker.pdb as a temporary fix, and leave to the user the burden of picking up the relevant ones?

Michele

On 21/06/2012 19:10, Yuri Timenkov wrote:
This is a limitation of CMake. There is a discussion at
http://public.kitware.com/Bug/view.php?id=11899

On Tue, Jun 19, 2012 at 7:57 PM, Michele Santullo
<michele.santu...@larian.com>  wrote:
Hello, we recently converted our project to cmake but for some reason, as we
generate for VS 2008 on Windows, we get the same path for both the compiler
and the linker generated pdb files.

The path is something like ..../bin/Debug/Project.pdb for both, so they
overwrite each other causing various errors. If I pass the /Fd switch to the
compiler, cmake just keeps the old path and appends the new one to the
command line parameters, confusing the VS IDE and causing a full rebuild
every time we build.

Is there a solution to produce two different files?
Could it be caused by some error in my cmake files? The only settings about
paths I can think of are:

set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../bin )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib )

if(MSVC)
        set(PDB_SEARCH_PATHS "/PDBPATH")
        SET(LNK_FLAGS_DEBUG "${LNK_FLAGS_DEBUG} ${PDB_SEARCH_PATHS}")
        SET(LNK_FLAGS_RELEASE "${LNK_FLAGS_RELEASE} ${PDB_SEARCH_PATHS}")
        SET(LNK_FLAGS_SHIPPING "${LNK_FLAGS_SHIPPING} ${PDB_SEARCH_PATHS}")
endif(MSVC)

Thanks,
Michele
--

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

--

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