Re: [CMake] cmake source tree pollution ?

2016-09-12 Thread Vania Joloboff
It seems to be the cause. Thanks Vania On 09/12/2016 09:42 AM, Magnus Therning wrote: Bruce Stephens writes: Looks like https://github.com/redguardtoo/cpputils-cmake might be involved... If that is the case then this section could be of interest:

Re: [CMake] cmake source tree pollution ?

2016-09-09 Thread Vania Joloboff
/CMakeFiles/ti-am1707.dir /home/vjf/workspace/merging/simsoc/trunk/build/examples/SPEAr/CMakeFiles/spear.dir The source directory (trunk) remains entirely clean, except for these strange 5 lines Makefiles. Vania On Sep 9, 2016, at 8:17 AM, Vania Joloboff <vania.jolob...@inria.fr> wrote: Hi,

[CMake] cmake source tree pollution ?

2016-09-09 Thread Vania Joloboff
Hi, I have started to use CMake for my software. I build in a separate directory using : $> cmake -G "Unix Makefiles" Everything is built correctly and the software works fine. However all of my source code directories get polluted. Into each source directory, a new Makefile is created. All

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Vania Joloboff
04:16 PM, Nicholas Braden wrote: Yes, an existing build saves all the information it needs in the build cache. Once you have created a build, you never need to specify the source directory again. On Thu, Feb 25, 2016 at 9:13 AM, Vania Joloboff <vania.jolob...@inria.fr> wrote: Hi, The

Re: [CMake] cmake documentation incomplete

2016-02-25 Thread Vania Joloboff
Hi, The cmake documentation says there are two alternatives to start cmake cmake [] ( | ) But it does not explain nowhere the difference between the two... Does the path-to-existing-build retrieve itself the source dir and start like if it were invoked with path-to-source from

[CMake] how to mix C and C++ modules and link them in a particular way ?

2016-02-11 Thread Vania Joloboff
Hi I have say mod1.cc and mod2.cc that are C++ files plus mod3.c and mod4.c that are C files and I need to link them with a specific linker and link command. I want to compile them and after that link them with specific linker command. I do not want to use the toolchain linker. I thought the

Re: [CMake] Toolchains and CMAKE_FORCE_C_COMPILER in 3.5

2016-02-10 Thread Vania Joloboff
Hi We have not yet moved to 3.5 but seeing this discussion, I am wondering what we will have to do. In our project, we have several C and C++ cross compilers and we want to compare them on selected benchmarks. We also want to compare different compile options and different linking options. We

[CMake] virtual machine project, cross compiling question

2016-01-27 Thread Vania Joloboff
Hi Our project is a virtual machine. All of the VM software must be compiled for the host platform. But, since the software is a VM emulating some target platform the VM tests must be cross compiled for the target. And we have several targets. Thus, in the top VM build the CMAKE_CROSSCOMPILING

[CMake] seeking advice for building and testing variants

2016-01-27 Thread Vania Joloboff
Hi We have a library that we want to build with N different variants in the compile flags for the same source code. Then in the test phase, I want to build N versions of a benchmark linked with the N versions of the library, then run the benchmark and compare. I can create N subdirectories

Re: [CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Vania Joloboff
unnecessary. You should also remove the quotes from your `add_library` call. The way you have it would look for a single file named "A.cc;B.cc;C.cc X.cc;Y.cc;Z.cc". Petr On Tue, Jan 26, 2016 at 9:36 AM, Vania Joloboff <vania.jolob...@inria.fr <mailto:vania.jolob...@inria.fr&g

[CMake] errors with add_custom_command and add_custom_target

2016-01-26 Thread Vania Joloboff
Hi I have a generator that generates some, but not all of the source files. My understanding was that I should use add_custom_command for that When I do set(EXIST_SOURCES A.cc B.cc C.cc) set(GEN_SOURCES X.cc Y.cc Z.cc) add_custom_command(OUTPUT ${GEN_SOURCES} COMMAND

[CMake] add_library object argument question

2016-01-25 Thread Vania Joloboff
Hi In a library project there are two level of subdirectories that contain modules to be included into the main library. In other words, directory lib contains subdirectories foo and bar Subdirectory foo contains A and B. Subdirectory bar contains C and D. All of the objects from A, B, C and D

[CMake] string regexp replace removes the semicolons

2016-01-22 Thread Vania Joloboff
Hi I want to remove from a list of sources those that start with 'foo' So I have file(GLOB ALL_SOURCES "*.cc") # this gives ALL_SOURCES = "a.cc;b.cc;foo_u.cc;foo_v.cc;c.cc;y.cc" # separated by semicolons string(REGEX REPLACE "foo.*cc" " " COMPILE_ONLY ${ALL_SOURCES}) But in the COMPILE_ONLY

[CMake] Adding definitions to compile one file ?

2016-01-21 Thread Vania Joloboff
Hi I want to add two definitions to compile one specific files in addition to the global definitions. I have the following problem. If I use set_source_files_properties(source.cpp PROPERTIES COMPILE_DEFINITIONS VAR1=${MY_VAR1} VAR2=${MY_VAR2} ) then I get error message incorrect number of

Re: [CMake] Adding definitions to compile one file ?

2016-01-21 Thread Vania Joloboff
best to forget about the not-as-convenient-as-they-could-be convenience functions set_*_properties, and just invoke set_property: set_property( SOURCE source.cpp PROPERTY COMPILE_DEFINITIONS VAR1=${MY_VAR1} VAR2=${MY_VAR2} ) Petr On Thu, Jan 21, 2016 at 3:14 PM, Vania Joloboff

[CMake] find_library

2016-01-14 Thread Vania Joloboff
I am running cmake 3.2.2 on Linux 64 bits I run cmake with cmake -G "Unix Makefiles" -DSYSTEMC_PATH=$HOME/systemc-2.3.1/ In my CMakeLists.txt, If I put find_library(SYSC_LIB systemc PATHS "${SYSTEMC_PATH}" PATH_SUFFIXES lib-linux64 lib64-linux lib64-linux64) it works. If I

[CMake] finding if feature is supported by host

2016-01-14 Thread Vania Joloboff
Hi I can find if an include file exists with CHECK_INCLUDE_FILE But I want to know if a particular feature is supported in our case we need to know if the mmap call exists and whether it supports the MAP_ANONYMOUS feature With autoconf, I can use AC_TRY_COMPILE to try compiling a program using

[CMake] test endian ness

2016-01-13 Thread Vania Joloboff
Hi I am familiar with autoconf and trying to migrate our project to cmake. Thus newbie. I am running cmake 3.2.2 on Linux Mint 17 I have seen in the documentation the macro https://cmake.org/cmake/help/v3.2/module/TestBigEndian.html?highlight=endian#module:TestBigEndian which seems very