Skip to content

cmake script on win32 produce additional output #679

Closed

Description

@malexzx

While making *.vcxproj on win32 configuration using cmake, it calls commands that produces additional CR-LF output. In the result, the following compilation faults.:

  const char* rocksdb_build_git_datetime = "rocksdb_build_git_datetime:03.08.2015
  The filename, directory name, or volume label syntax is incorrect.
  The filename, directory name, or volume label syntax is incorrect.
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 123. [C:\lib\contrib\rocksdb\build\GenerateBuildVersion.vcxproj]

The solution is to write after the next string
string(CONCAT GIT_DATE_TIME ${DATE} ${TIME})
these two lines
string(REGEX REPLACE "\n" "" GIT_DATE_TIME ${GIT_DATE_TIME})
string(REGEX REPLACE "\r" "" GIT_DATE_TIME ${GIT_DATE_TIME})
in CMakeLists.txt

Activity

  1. DoktorSeltsam commented on Oct 2, 2015

    @DoktorSeltsam

    The same behavior occures when build for x64 with > cmake -G "Visual Studio 14 Win64" <. The proposed solution works fine.

  2. adamretter commented on May 11, 2017

    @adamretter
    Collaborator

    @malexzx @DoktorSeltsam was this ever resolved?

  3. gfosco commented on Jan 10, 2018

    @gfosco
    Contributor

    Closing this via automation due to lack of activity. If discussion is still needed here, please re-open or create a new/updated issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions