Re: [CMake] Visual SourceSafe and Relative Paths for MSVC
It seems that although when I add a file to a library with a relative path, the resulting MSVC project contains the file with an absolute path. While it works for compiling, it doesn’t work for the Microsoft visual source safe plug-in in Visual Studio. Does Cmake support Microsoft’s visual source safe plug-in in Visual Studio? Is there any reason not to use relative paths? Try using SET(CMAKE_USE_RELATIVE_PATHS 1) --Sylvain ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] Project being (unnecessarily) relinked
Jesper Eskilson wrote: Mathieu Malaterre wrote: On 9/4/07, Jesper Eskilson [EMAIL PROTECTED] wrote: Hi! I've got a Visual Studio 8 solution generated by CMake where one of the projects is always being relinked everytime I build it, even when nothing in it has changed (i.e. if I try to build it twice, it always relinks the project the second time). I've studied the build logs, but they do not make me any wiser. Does anyone recognize this behavior? wild guess Circular dependencie ? /wild guess I am not sure if outputing the depencie graph with graphiz could show that, since it only output high level dep (libs/executable) I think I've located the problem. The project in question uses target_link_library() in a possibly non-kosher way: target_link_library(Foo Bar.lib) That is, the top-level target Foo should include Bar.lib on its command line. This seems to work insofar that it actually performs the link correctly, but for some reason it always relinks as well. A related question: if I include an external project in my solution using include_external_msproject(Bar ../../Bar/Bar.vcproj) can I later refer to this project using target_link_libraries(Foo Bar) More generally, what is the correct way to specify that a CMake target should be linked with some external library? I'm still very much interested in an answer to this question. -- /Jesper -- /Jesper ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
[CMake] Framework
I want to use a framework for the includes and library linkage. FIND_LIBRARY seems like it will work for the library, but what about the include. Should I use a FIND_FILE followed by a INCLUDE_DIRECTORIES. I want to link against the Apple profiling library found in /System/ Library/PrivateFrameworks/CHUD.framework . Thanks, James ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] basename macro
On Sep 10, 2007, at 10:19 AM, Juan Sanchez wrote: Is there a basename macro to remove the file extension from a name? I am using 2.4.7. Thanks, Juan What you want is GET_FILENAME_COMPONENT. From cmake --help-full | less GET_FILENAME_COMPONENT Get a specific component of a full filename. GET_FILENAME_COMPONENT(VarName FileName PATH|ABSOLUTE|NAME|EXT|NAME_WE [CACHE]) Set VarName to be the path (PATH), file name (NAME), file extension (EXT), file name without extension (NAME_WE) of FileName, or the full absolute (ABSOLUTE) file name without symlinks. Note that the path is converted to Unix slashes format and has no trailing slashes. The longest file extension is always considered. If the optional CACHE argument is specified, the result variable is added to the cache. GET_FILENAME_COMPONENT(VarName FileName PROGRAM [PROGRAM_ARGS ArgVar] [CACHE]) The program in FileName will be found in the system search path or left as a full path. If PROGRAM_ARGS is present with PROGRAM, then any command-line arguments present in the FileName string are split from the program name and stored in ArgVar. This is used to separate a program name from its arguments in a command line string. ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake
Re: [CMake] disable compiler test
Juan Sanchez wrote: How do you disable the compiler test? Our version of gcc is passing a bad compiler option (--as-needed) to ld and it is causing cmake to fail. This is ok since g++ still seems to work properly. Disabling the test is a bad idea, as cmake will use the same code to create your makefiles and your stuff won't work either. (That is why the test is done, so you find out sooner than later.) Do you have LDFLAGS, CFLAGS, CXXFLAGS set in your environment? -Bill ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake