MantisBT - CMake
View Issue Details
0004775CMakeCMakepublic2007-04-03 13:532016-06-10 14:30
philip 
Bill Hoffman 
lowminoralways
closedmoved 
 
 
0004775: cmake -E copy_if_different doesn't preserve case on Win32
Using cmake -E copy_if_different doesn't seem to preserve case for me when used by Win32.

IF(WIN32 AND NOT ${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR} )
    SET(SRC_FILE "${PROJECT_SOURCE_DIR}/LibCigicl/bin/dllDebugMT_DLL/ccl_dll.dll")
    SET(DST_FILE "${PROJECT_BINARY_DIR}/LibCigicl/bin/dllDebugMT_DLL/ccl_dll.dll")

    MESSAGE("Going to copy ${SRC_FILE} to ${DST_FILE}")

    ADD_CUSTOM_COMMAND(
        OUTPUT "${DST_FILE}"
        DEPENDS "${SRC_FILE}"
        COMMAND "${CMAKE_COMMAND}"
        ARGS -E copy_if_different "${SRC_FILE}" "${DST_FILE}")
    ADD_CUSTOM_TARGET(CopyLibCigicl DEPENDS "${DST_FILE}")
ENDIF()

The result is:
libcigicl/bin/dlldebugmt_dll/ccl_dll.dll file

instead of:
LibCigicl/bin/dllDebugMT_DLL/ccl_dll.dll file.

Turns out this isn't a big deal but I still think case should be preserved by copy_if_different for all platforms.
No tags attached.
Issue History
2016-06-10 14:27Kitware RobotNote Added: 0041352
2016-06-10 14:27Kitware RobotStatusassigned => resolved
2016-06-10 14:27Kitware RobotResolutionopen => moved
2016-06-10 14:30Kitware RobotStatusresolved => closed

Notes
(0041352)
Kitware Robot   
2016-06-10 14:27   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.