MantisBT - CMake | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0016104 | CMake | CMake | public | 2016-05-15 06:35 | 2016-06-10 14:21 |
Reporter | Vladislav K. | ||||
Assigned To | |||||
Priority | high | Severity | minor | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | Win32 or Win64 | OS | Windows | OS Version | All |
Product Version | CMake 3.5.2 | ||||
Target Version | Fixed in Version | ||||
Summary | 0016104: The extra escape sequence \${...} in the generated export file | ||||
Description | The extra escape sequence \${} in the generated export file # if (UNIX) set(_build_type ${CMAKE_BUILD_TYPE} ) else() set(_build_type \${BUILD_TYPE} ) #previously \@BUILD_TYPE@ endif() install( TARGETS ${TARGETNAME} EXPORT ${EXPORT_NAME} RUNTIME DESTINATION ${_build_type}/bin LIBRARY DESTINATION ${_build_type}/lib ARCHIVE DESTINATION ${_build_type}/lib ) ...In cmake 3.5.2 in the performance of the export file, an error occurs Ok. # in cmake_install.cmake 3.0.0 or 3.5.2 ---> ${BUILD_TYPE} file(INSTALL DESTINATION "${CMAKE_INSTALL_PREFIX}/Win64/VC12/${BUILD_TYPE}/lib" TYPE STATIC_LIBRARY OPTIONAL FILES "X:/CTVMO/bm/build_cm-vc12-win64/Win64/VC12/Debug/lib/bm-system-mem-debug.lib") Ok. # in bm-export-debug.cmake 3.0.0 ---> ${BUILD_TYPE} # Import target "bm-system-mem" for configuration "Debug" set_property(TARGET bm-system-mem APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) set_target_properties(bm-system-mem PROPERTIES IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/Win64/VC12/${BUILD_TYPE}/lib/bm-system-mem-debug.lib" IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "Psapi;Winmm;rpcrt4;X:/CTVMO/ext_sdk/sdk/libs/win64/VC12/zlib1d.lib;X:/CTVMO/ext_sdk/sdk/libs/win64/VC12/libbz2d.lib" IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/Win64/VC12/${BUILD_TYPE}/bin/bm-system-mem-debug.dll" ) Error. # in bm-export-debug.cmake 3.5.2 ----> \${_BUILD_TYPE}. # Import target "bm-system-mem" for configuration "Debug" set_property(TARGET bm-system-mem APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) set_target_properties(bm-system-mem PROPERTIES IMPORTED_IMPLIB_DEBUG "${_IMPORT_PREFIX}/Win32/VC12/\${_BUILD_TYPE}/lib/bm-system-mem-debug.lib" IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUG "Psapi;Winmm;rpcrt4;X:/CTVMO/ext_sdk/sdk/libs/Win32/VC12/zlib1d.lib;X:/CTVMO/ext_sdk/sdk/libs/Win32/VC12/libbz2d.lib" IMPORTED_LOCATION_DEBUG "${_IMPORT_PREFIX}/Win32/VC12/\${_BUILD_TYPE}/bin/bm-system-mem-debug.dll" ) cmake 3.5.2 Beat changes in cmExportFileGenerator.cxx: cmExportFileGenerator::GenerateImportPropertyCode(... 1152 os << " " << pi->first << " " 1153 << cmExportFileGeneratorEscape(pi->second) << "\n"; previously in cmake 3.0.0 cmExportFileGenerator.cxx: cmExportFileGenerator::GenerateImportPropertyCode(... 1026 os << " " << pi->first << " \"" << pi->second << "\"\n"; As a special case the error is eliminated by changing in //---------------------------------------------------------------------------- static std::string cmExportFileGeneratorEscape(std::string const& str) { // Escape a property value for writing into a .cmake file. std::string result = cmOutputConverter::EscapeForCMake(str); // Un-escape variable references generated by our own export code. cmSystemTools::ReplaceString(result, "\\${_IMPORT_PREFIX}", "${_IMPORT_PREFIX}"); cmSystemTools::ReplaceString(result, "\\${CMAKE_IMPORT_LIBRARY_SUFFIX}", "${CMAKE_IMPORT_LIBRARY_SUFFIX}"); //////////////////////////////////////////////////////////////////// // My insert vvvvvv cmSystemTools::ReplaceString(result, "\\${BUILD_TYPE}", "${BUILD_TYPE}"); //End my insert /////////////////////////////////////////////////////////////////// return result; } P.S. Use \@BUILD_TYPE@ in cmake 3.0.0 Ok. Warning in cmake 3.5.2: To many warning of use @BUILD_TYPE@ instead @BUILD_TYPE@ by run cmake_install.cmake No way to set cmake policy CMP0053 in cmake_install.cmake | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files | |||||
Issue History | |||||
Date Modified | Username | Field | Change | ||
2016-05-15 06:35 | Vladislav K. | New Issue | |||
2016-05-16 09:23 | Brad King | Note Added: 0041065 | |||
2016-05-16 09:23 | Brad King | Severity | crash => minor | ||
2016-05-16 09:23 | Brad King | Status | new => resolved | ||
2016-05-16 09:23 | Brad King | Resolution | open => won't fix | ||
2016-06-10 14:21 | Kitware Robot | Note Added: 0041172 | |||
2016-06-10 14:21 | Kitware Robot | Status | resolved => closed |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|