[CMake] Still problems with add_custom_command

2011-10-06 Thread Martin Kupke
Hi, in my CMake project I have the need for a custom command that should be processed in case a file is touched...that is the file the custom command depends on. I already use the add_custom_command and add_custom_target CMake instructions in my project, but always for CMakeLists.txt files in

Re: [CMake] How to use add_custom_command correctly

2011-09-30 Thread Martin Kupke
On 29.09.11 01:46, Michael Hertling wrote: On 09/28/2011 01:45 PM, Martin Kupke wrote: Now it seems to be solved, the generator is called and the generated sources / headers are then compiled and linked into a library. My changes are in the D:/project/Discovery/Generated/Driver/CMakeLists.txt

Re: [CMake] How to use add_custom_command correctly

2011-09-28 Thread Martin Kupke
} ${all_generated_hdrs} ) Additionally I added in the root CMakeLists.txt add_dependencies( ${MY_PROJECT} MyGeneratedSources ) This works fine. On 28.09.11 13:34, Rolf Eike Beer wrote: On 27.09.11 18:24, Michael Wild wrote: On 09/27/2011 05:59 PM, Martin Kupke wrote: Hi, in my project there

Re: [CMake] multiple source directories

2011-09-28 Thread Martin Kupke
option CMAKE_USE_RELATIVE_PATHS but it might not be defined for that purpose as it did not solve the problem. Would you have any idea how to solve that problem ? thanks a lot Eric -- *martin kupke* can diagnostics

Re: [CMake] How to use add_custom_command correctly

2011-09-28 Thread Martin Kupke
On 27.09.11 18:24, Michael Wild wrote: On 09/27/2011 05:59 PM, Martin Kupke wrote: Hi, in my project there is a subfolder which SHALL contain sources to generate a library. The problem is that at startup of the project there are no source files existing, because they will be generated by a

[CMake] How to use add_custom_command correctly

2011-09-27 Thread Martin Kupke
Hi, in my project there is a subfolder which SHALL contain sources to generate a library. The problem is that at startup of the project there are no source files existing, because they will be generated by a code generator. This means within the build process the code generator needs to be ca

Re: [CMake] How to set own linker?

2011-09-23 Thread Martin Kupke
cutable(foo_target ${FOO_SRC}) SET_TARGET_PROPERTIES(foo_target PROPERTIES LINKER_LANGUAGE C) SET_TARGET_PROPERTIES(foo_target PROPERTIES LINK_FLAGS "-abcdfg") -- martin kupke can diagn

Re: [CMake] How to set own linker?

2011-09-23 Thread Martin Kupke
gs are not used. I tried to set CMAKE_EXE_LINKER_FLAGS, but this doesn't work. On 23.09.11 11:08, Martin Kupke wrote: If I am using a cross linker, mine is the dld.exe.. How do I incorporate it into the CMake process? As I could figure out CMake assumes that the compiler itself will do the

Re: [CMake] How to set own linker?

2011-09-23 Thread Martin Kupke
If I am using a cross linker, mine is the dld.exe.. How do I incorporate it into the CMake process? As I could figure out CMake assumes that the compiler itself will do the linking. On 22.09.11 18:09, Martin Kupke wrote: Hi, I created a toolchain file for cross compiling in my Windows XP

[CMake] How to set own linker?

2011-09-22 Thread Martin Kupke
Hi, I created a toolchain file for cross compiling in my Windows XP environment. To provide cross compiling functionality I set the CMAKE_SYSTEM_NAME to Generic. The toolchain file contains the variables: CMAKE_C_COMPILER set to my own wanted compiler, which is dcc.exe CMAKE_ASM_OCU_COMPILER s

Re: [CMake] SOLVED: Generated successfully NMake Makefile using CMake for Cross Compiling, but compiling with nmake fails

2011-09-20 Thread Martin Kupke
works fine. Of course this version is NOT free of charge, because it's part of the buyable package from Microsoft. Just the short form: the nmake tool version 1.50 isn't able to use the generated Makefile. Br, Martin... On 20.09.11 11:00, Mar

[CMake] Generated successfully NMake Makefile using CMake for Cross Compiling, but compiling with nmake fails

2011-09-20 Thread Martin Kupke
Hi, after many helpful hints from other users now I was able to create a NMake Makefile using CMake. I'm working in a Windows XP environment in a cmd.exe command line interface (shell). The CMake tool created the typical Makefile including the subfolders etc. in my output folder, without any e

Re: [CMake] Cross compiling in Win32 environment doesn't work

2011-09-20 Thread Martin Kupke
On Monday, September 19, 2011 04:57:32 PM Martin Kupke wrote: That's a hint, I changed my toolchain file "toolchain_ppc.cmake" to the following: INCLUDE(CMakeForceCompiler) set(CMAKE_SYSTEM_NAME "Discovery") if(CMAKE_CROSSCOMPILING) message("Cross Compiling&qu

[CMake] How to setup toolchain correctly for C compiler only (no CXX present for target)

2011-09-19 Thread Martin Kupke
Is there a way to setup the toolchain file in a way to work only with a C compiler? What if no C++ compiler is present (or wanted) for the target HW? E.g. we use standard C compiler for different processors on our embedded solutions. We need to buy the compiler for C and / or C++, but mostly we

Re: [CMake] Where to declare the CMAKE_C_FLAGS for cross compiling

2011-09-19 Thread Martin Kupke
gram Files\" and the blank / space character confuses the build process. Any ideas to blanks / spaces in files and foldernames? Thanks Martin... On 19.09.11 18:04, Martin Kupke wrote: I'm using a toolchain file with the CMAKE_SYSTEM_NAME

[CMake] Where to declare the CMAKE_C_FLAGS for cross compiling

2011-09-19 Thread Martin Kupke
I'm using a toolchain file with the CMAKE_SYSTEM_NAME "Generic", because I want to cross compile on a Windows XP machine for a PPC (PowerPC) processor. From my point of view it should be in a way as in the documentation for the SDCC. My toolchain file "toolchain_ppc.cmake" is setup: ###

Re: [CMake] Cross compiling in Win32 environment doesn't work

2011-09-19 Thread Martin Kupke
_NAME=Discovery I can see that the platform file is used 2.) the compilation doesn't complete, because the CMAKE_C_FLAGS are still not used 3.) why do I have to have a CXX (C++) compiler, even if I don't need it in my embedded solution 4.) is there any reason

Re: [CMake] Cross compiling in Win32 environment doesn't work

2011-09-19 Thread Martin Kupke
ds to know what are compilers used in the CMakeLists.txt: message("C compiler: " ${CMAKE_C_COMPILER}) message("C++ compiler: " ${CMAKE_CXX_COMPILER}) Moreover, you can set them: set(CMAKE_CXX_COMPILER ...) regards Benjamin JEANTY-RUARD Le lundi 19 septembre 2011

Re: [CMake] Cross compiling in Win32 environment doesn't work

2011-09-19 Thread Martin Kupke
w the CMAKE_C_FLAGS are not recognized. set(CMAKE_C_FLAGS "-tPPCVLEEN:simple") On 19.09.11 15:24, Eric Noulard wrote: 2011/9/19 Martin Kupke : I'm using CMake in version 2.8.5 and just want to cross compile with a decicated Compiler / Linker set on my Wi

[CMake] Cross compiling in Win32 environment doesn't work

2011-09-19 Thread Martin Kupke
I'm using CMake in version 2.8.5 and just want to cross compile with a decicated Compiler / Linker set on my Windows machine. Of course I've read the FAQ and the Tutorial, afterwards I started trying to use CMake on a DOS (cmd.exe) command line interface with CMakeLists.txt and a toolchain file