RE: [CMake] Digital Mars

2006-05-31 Thread James Mansion
Do you actually need to add -L?

I think if you have:

link a.obj c:\foo bar.lib

(and c:\foo is a directory)

then it will look for bar.lib in c:\foo.

Haven't tried myself, but recently I recall seeing the thread started here:
http://www.digitalmars.com/drn-bin/wwwnews?c%2B%2B.command-line/639

and in http://www.digitalmars.com/drn-bin/wwwnews?c%2B%2B.command-line/643:

link link flags objects,exename,mapfile,lib1 lib2 \my\lib\path\ 
lib3 lib4 lib5,def file,res file


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
Amitha Perera
Sent: 31 May 2006 21:43
To: William A. Hoffman
Cc: cmake@cmake.org
Subject: Re: [CMake] Digital Mars


On Fri 19 May 2006, William A. Hoffman wrote:
 I have another idea.   Write a small program or .bat file
 to run the link command and add the -L ability to it.
 It would basically setenv LIB to the parsed out -L path options,
 then call the DM linker.

I did this using a small perl script to wrap around the linker, and I
managed to get things working using NMake as the make program (so I
didn't need to write a generator).

However, I'm having a lot of pain compiling vxl with it (which was my
original intent). My current reaction is that Digital Mars is not
complete enough to make vxl work easily, so I'm dropping the issue for
now.

That said, I think I did manage to resolve the CMake-Digital Mars
interface, so if someone feels the urge to see what I did to get that
done, I can describe it in more detail.

Cheers,
Amitha.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Digital Mars

2006-05-20 Thread Cesar Rabak
OK, another 0.01999... to your idea:  DM has a utility called 'cl.exe' (look for it in the BIN directory) which emulates a lot of Microsoft command line compiler and linker.  Have a try w/it! "William A. Hoffman" [EMAIL PROTECTED] escreveu: At 11:09 AM 5/19/2006, William A. Hoffman wrote:Yea, I think that is what is needed.The other option is to use the Microsoft linkerI have another idea.   Write a small program or .bat fileto run the link command and add the -L ability to it.It would basically setenv LIB to the parsed out -L path options,then call the DM linker.  It should be pretty easy to writea small c++ program that uses the cmake libraries.  DMLinkerFix.exe.-Bill___CMake mailing
 listCMake@cmake.orghttp://www.cmake.org/mailman/listinfo/cmake-- Cesar RabakGNU/Linux User 52247.Get counted: http://counter.li.org/
		 
Yahoo! Messenger com voz - Instale agora e faça ligações de graça. ___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Digital Mars

2006-05-19 Thread Amitha Perera
On Thu 18 May 2006, William A. Hoffman wrote:
 I am not even sure we always have that information.  For example,
 someone might do LINK_DIRECTORIES() LINK_LIBRARIES(A).

In principle, CMake has enough knowledge to look for it by scanning
the current LINK_DIRECTORIES for libA.

 Maybe we could set the LIB env as part of the link command.
 Then use the /SCANLIB option.   Then do something like this:
 
 In Windows-bmc.cmake try this:
 
 SET(CMAKE_LIBRARY_PATH_FLAG ;)
 SET(CMAKE_CXX_CREATE_SHARED_LIBRARY 
   set LIB=LINK_LIBRARIES
   link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:TARGET 
 /PDB:TARGET_PDB /dll  LINK_FLAGS OBJECTS LINK_LIBRARIES 
 ${CMAKE_END_TEMP_FILE})

I tried this before my previous post, and it didn't work. The problem
is that the directory still appears on the command line, and it is
interpreted as a library.

 We might need to create a LINK_DIRECTORIES that would only have
 the link directories part of the link line, but that might work with
 the extra junk at the end of the lib path.

I think both a LINK_DIRECTORIES and a LINK_ONLY_LIBRARIES is
necessary, because dmc can't deal with the directory paths being on
the command line.

Amitha.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Digital Mars

2006-05-19 Thread William A. Hoffman
At 11:09 AM 5/19/2006, William A. Hoffman wrote:


Yea, I think that is what is needed.

The other option is to use the Microsoft linker

I have another idea.   Write a small program or .bat file
to run the link command and add the -L ability to it.
It would basically setenv LIB to the parsed out -L path options,
then call the DM linker.  It should be pretty easy to write
a small c++ program that uses the cmake libraries.  DMLinkerFix.exe.

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Digital Mars

2006-05-18 Thread William A. Hoffman
At 10:18 AM 5/18/2006, Amitha Perera wrote:
I've been able to get relatively far by simply implementing a
Platform/Windows-bmc.cmake, and using NMake as the Makefile parser. I
thought I'd try this first before writing a generator for the Digital
Mars make.

Right now, I'm stuck here: the Digital Mars linker wants full paths to
the libraries, or else will scan the LIB environment variable. Is
there a variable simliar to LINK_LIBRARIES that will expand to the
full paths of the required libraries?

(Unfortunately, this is somewhat low priority for me, so I'll
apologize in advance for delayed responses.)
Currently, there is not. 

It does seem that the linker can not add paths to the link line:

http://www.digitalmars.com/d/archives/c++/command-line/639.html

I am not even sure we always have that information.  For example,
someone might do LINK_DIRECTORIES() LINK_LIBRARIES(A). 
  
Maybe we could set the LIB env as part of the link command.
Then use the /SCANLIB option.   Then do something like this:

In Windows-bmc.cmake try this:

SET(CMAKE_LIBRARY_PATH_FLAG ;)
SET(CMAKE_CXX_CREATE_SHARED_LIBRARY 
  set LIB=LINK_LIBRARIES
  link ${CMAKE_CL_NOLOGO} ${CMAKE_START_TEMP_FILE} /out:TARGET 
/PDB:TARGET_PDB /dll  LINK_FLAGS OBJECTS LINK_LIBRARIES 
${CMAKE_END_TEMP_FILE})

We might need to create a LINK_DIRECTORIES that would only have the link 
directories
part of the link line, but that might work with the extra junk at the end of 
the lib path.

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Digital Mars

2006-05-17 Thread Amitha Perera
Has anyone tried CMake with Digital Mars C/C++? My quick attempt with
CMake 2.2 and CMake 2.4.2 failed. Current error output with CMake 2.4.2 is

Determining if the C compiler works failed with the following output:
f CMakeFiles/cmTryCompileExec.dir/build.make 
CMakeFiles/cmTryCompileExec.dir/build
Error: 'f' not found

I set
  CC=c:/dm/bin/dmc.exe
  CXX=c:/dm/bin/dmc.exe
and used the Unix Makefile generator.

Thanks,
Amitha.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Digital Mars

2006-05-17 Thread Cristian Adam

William A. Hoffman wrote:

You could run cmake --debug-trycompile and it will leave the makefiles around,
and you can run make in CMakeFiles/CMakeTmp to see what the error really is.
Does Digital Mars have its own make?
  

Yes it has. Digital Mars Make Version 5.05

Cristi.
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Digital Mars

2006-05-17 Thread William A. Hoffman
At 03:12 PM 5/17/2006, Cristian Adam wrote:
William A. Hoffman wrote:
You could run cmake --debug-trycompile and it will leave the makefiles around,
and you can run make in CMakeFiles/CMakeTmp to see what the error really is.
Does Digital Mars have its own make?
  
Yes it has. Digital Mars Make Version 5.05

In that case, I would suggest creating a generator similar to what I just did
for watcom.   

-Bill

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake