Hi everybody,

I am currently trying to add reproducible MSVC build to my project using ducible tool.

ducible can take in optional parameter, a pdb file.

I am using the following command:

  set(DUCIBLE_BINARY "${CMAKE_CURRENT_LIST_DIR}/bin/ducible.exe")
  add_custom_command(TARGET ${MYTARGET}
                     POST_BUILD
                     COMMAND ${DUCIBLE_BINARY} \"$<TARGET_FILE:${MYTARGET}>\" \"$<TARGET_PDB_FILE:${MYTARGET}>\"
                     COMMENT "Patching for reproducible build.")

However even if the current configuration is not generating a PDB (for Release for instance), this generator expression is providing a path, making the ducible tool to fail because the pdb file does not exists. Is it a bug? How can I detect using generator expression if a file exists? I tried to check all _PDB_ properties of the target but they are all empty by default.

Thank you very much for your help,

Louis-Paul CORDIER
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to