<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 4/20/10 6:09 AM, Matthias Goesswein wrote:
<blockquote cite="mid:4BCD8B5D.1060908@sbox.tugraz.at" type="cite">Hello!
<br>
<br>
I`m using the Softune-Compiler under CMake with MSYS on Windows. (I'v e
written the Plattform files by myself)
<br>
The Softune Compiler (For Fujitsu Microcontrollers) requires
Backslashes for paths in the options, but Cmake generates slashes as it
is usual in MSYS.
<br>
<br>
e.g.
<br>
<br>
The linker must be called:
<br>
<br>
flnk907s -cpu MB90F345 -a -o otuput.abs main.o -l mylibrary\mylibrary.a
<br>
<br>
(it finds the library in the directory mylibrary)
<br>
<br>
but it is called like this
<br>
<br>
flnk907s -cpu MB90F345 -a -o output.abs main.o -l mylibrary/mylibrary.a
<br>
<br>
(it doesn't find the library in the directory mylibrary)
<br>
<br>
Is there any option to change the slashes with cmake to backslashes?
<br>
<br>
---
<br>
My Plattform file for the compiler looks like this:
<br>
<br>
<br>
MESSAGE(STATUS "Fujitsu_16LX-fcc907s.cmake loaded")
<br>
<br>
# This file implements support for the Softune Compiler
<br>
<br>
SET(CMAKE_STATIC_LIBRARY_PREFIX "")
<br>
SET(CMAKE_STATIC_LIBRARY_SUFFIX ".a")
<br>
SET(CMAKE_C_OUTPUT_EXTENSION ".o")
<br>
SET(CMAKE_EXECUTABLE_SUFFIX ".abs")
<br>
SET(CMAKE_LINK_LIBRARY_SUFFIX ".a")
<br>
SET(CMAKE_LINK_LIBRARY_FILE_FLAG "-l")
<br>
<br>
# Default C Flags
<br>
SET(CMAKE_C_FLAGS_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR}")
<br>
SET(CMAKE_C_FLAGS_DEBUG_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR} -g
-DDEBUG=1")
<br>
SET(CMAKE_C_FLAGS_MINSIZEREL_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR}")
<br>
SET(CMAKE_C_FLAGS_RELEASE_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR}")
<br>
SET(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR}
-g -DDEBUG=1")
<br>
<br>
# Default Linker Flags
<br>
SET (CMAKE_EXE_LINKER_FLAGS_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR} -a")
<br>
SET (CMAKE_EXE_LINKER_FLAGS_DEBUG_INIT "-cpu ${CMAKE_SYSTEM_PROCESSOR}
-a -g")
<br>
SET (CMAKE_EXE_LINKER_FLAGS_MINSIZEREL_INIT "-cpu
${CMAKE_SYSTEM_PROCESSOR} -a")
<br>
SET (CMAKE_EXE_LINKER_FLAGS_RELEASE_INIT "-cpu
${CMAKE_SYSTEM_PROCESSOR} -a")
<br>
SET (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO_INIT "-cpu
${CMAKE_SYSTEM_PROCESSOR} -a -g")
<br>
<br>
# Rule variable to compile a single object file
<br>
SET(CMAKE_C_COMPILE_OBJECT
<br>
"<CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o
<OBJECT> <SOURCE>" )
<br>
<br>
# Rule variable to create a static library
<br>
SET(CMAKE_C_CREATE_STATIC_LIBRARY
<br>
"${CMAKE_COMMAND} -E remove <TARGET>"
<br>
"flib907s -cpu ${CMAKE_SYSTEM_PROCESSOR} -g -a <OBJECTS>
<TARGET>"
<br>
)
<br>
<br>
# Rule variable to link a axecutable
<br>
SET(CMAKE_C_LINK_EXECUTABLE
<br>
"flnk907s <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> -o
<TARGET> <OBJECTS> <LINK_LIBRARIES>"
<br>
"f2ms -S3 -o <TARGET_BASE>.s19 -adjust <TARGET>"
<br>
)
<br>
<br>
# not supported
<br>
SET(CMAKE_C_CREATE_SHARED_LIBRARY "")
<br>
SET(CMAKE_C_CREATE_MODULE_LIBRARY "")
<br>
<br>
---
<br>
<br>
Another question: Are such plattform ports welcome in the cmake
distribution? If yes, I'll put it in as feature request, when my port
is functional.
<br>
BTW: Are there any naming conventions for new plattforms?
<br>
<br>
Cheers,
<br>
Matthias. <br>
</blockquote>
You somehow would need to include a call to
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<pre>file(TO_NATIVE_PATH path result)
</pre>
to prepare the file names for the tool. I'm not sure how you'd go
about doing that, though, sorry...<br>
<br>
Ryan<br>
<br>
<br>
<pre class="moz-signature" cols="72">--
Ryan Pavlik
Human-Computer Interaction Graduate Student
Virtual Reality Applications Center
Iowa State University
<a class="moz-txt-link-abbreviated" href="mailto:rpavlik@iastate.edu">rpavlik@iastate.edu</a>
<a class="moz-txt-link-freetext" href="http://academic.cleardefinition.com/">http://academic.cleardefinition.com/</a></pre>
</body>
</html>