Bug #1220
CURRENT_DATE function seems to fail on Windows
Status: | Resolved | Start date: | 10/25/2012 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | J. Wienke | % Done: | 100% | |
Category: | cmake | |||
Target version: | Robotics Service Bus - rsb-0.9 |
Description
V. Losing schrieb:
Beim generieren des VS-Projects für rsb selbst, kommt der Fehler dass die Variable "CURRENT_DATE" nicht gefunden werden kann
Associated revisions
Fix implementation of the CMake function CURRENT_DATE for windows.
Shell-built-in functions cannot be called directly by CMake's
execute_process. Instead, cmd.exe needs to be called to execute the
built-in function.
refs #1220
Backport: Fix implementation of the CMake function CURRENT_DATE for
windows.
Shell-built-in functions cannot be called directly by CMake's
execute_process. Instead, cmd.exe needs to be called to execute the
built-in function.
fixes #1220
Disable CURRENT_DATE support for windows.
There is no easy to implement way to get the current date on
windows. Make the warning a status message to not confuse users
refs #1220
Backport: Disable CURRENT_DATE support for windows.
There is no easy to implement way to get the current date on
windows. Make the warning a status message to not confuse users
refs #1220
Add support for Windows in the cmake CURRENT_DATE function.
This uses a batch script calling the WMI host to acquire a parseable
date which is not localized by windows.
fixes #1220
History
#1 Updated by J. Wienke about 11 years ago
can someone please provide the cmake output indicating the failure?
#2 Updated by V. Losing about 11 years ago
Here is the cmake output:
CMake Warning at cmake/Modules/CurrentDate.cmake:42 (MESSAGE):
error calling date command
Call Stack (most recent call first):
CMakeLists.txt:30 (CURRENT_DATE)
#3 Updated by J. Wienke about 11 years ago
Do you have cygwin or something comparable installed which provides unix tools? Can you run a terminal please and show the output of ``date``, ``date -h`` and ``date /h``?
#4 Updated by V. Losing about 11 years ago
no i haven't installed cygwin or something compareable.
i've added a description link to the date.exe of windows
http://ss64.com/nt/date.html
when i just call "date" i'm requested to provide the current date.
"date /T" delivers the current date
#5 Updated by J. Wienke about 11 years ago
- File CMakeCache.txt
added
This is weird. Actually this is exactly what the macro should be doing. Depending on the operating system, different arguments should be chosen.
Could you please try the attached CMakeListst.txt
to see if the test works well. Just put it somewhere and let cmake run on it. Afterwards, please paste the output of cmake to this issue.
#6 Updated by J. Wienke about 11 years ago
- Status changed from New to In Progress
#7 Updated by J. Wienke about 11 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Applied in changeset rsc|commit:fc3516ba993c2f095ee3e55b51095a792009f6e6.
#8 Updated by J. Wienke about 11 years ago
- Status changed from Resolved to In Progress
Narf, the date command on windows outputs the date in the local format and there is no way to tell it to use a fixed format.
#9 Updated by J. Wienke about 11 years ago
- Priority changed from Normal to Low
- % Done changed from 100 to 40
There is now at least a workaround for windows without a warning.
#10 Updated by J. Wienke over 10 years ago
- Status changed from In Progress to Resolved
- % Done changed from 40 to 100
Applied in changeset rsc|commit:c43dda11ab8272b8404e72cdb64a67d49672b98a.