Re: [CMake] Intel compilers

2012-05-11 Thread Leif Walsh
On 11 May, 2012, at 5:12 PM, Mohammad Mirzadeh wrote: > > You generally need to set CC, CXX, LD, and AR. I found that in some cases > > even that didn't work. I use this: > > > option(INTEL_CC "Use the Intel compiler." OFF) > > > if (INTEL_CC) > > find_program(CMAKE_C_COMPILER NAMES icc) > >

Re: [CMake] Intel compilers

2012-05-11 Thread Mohammad Mirzadeh
> You generally need to set CC, CXX, LD, and AR. I found that in some cases > even that didn't work. I use this: > option(INTEL_CC "Use the Intel compiler." OFF) > if (INTEL_CC) > find_program(CMAKE_C_COMPILER NAMES icc) > find_program(CMAKE_CXX_COMPILER NAMES icpc) > find_program(CMAKE_AR NAME

Re: [CMake] Passing back list of files from Function

2012-05-11 Thread Michael Jackson
Thanks. Worked. -- Mike Jackson On May 11, 2012, at 3:40 PM, Alexander Neundorf wrote: > On Friday 11 May 2012, Michael Jackson wrote: > > I have a function where I am generating a number of files and I need to > > pass that list of files back to the original calling cmake > > command/file/scope

Re: [CMake] Passing back list of files from Function

2012-05-11 Thread Alexander Neundorf
On Friday 11 May 2012, Michael Jackson wrote: > I have a function where I am generating a number of files and I need to > pass that list of files back to the original calling cmake > command/file/scope. How would I go about that? > > > > function(create_files) > set(options) > set(multiValue

Re: [CMake] How to use different assemblers in single build?

2012-05-11 Thread Alexander Neundorf
On Friday 11 May 2012, Alexey Istomin wrote: > Is it possible to use different assemblers in single build with CMake? > > I try to use CMake for building embedded application - statically linked > elf file. Main CPU has 2 cores: general-purpose MIPS based core and DSP. > Project has simple structu

[CMake] Passing back list of files from Function

2012-05-11 Thread Michael Jackson
I have a function where I am generating a number of files and I need to pass that list of files back to the original calling cmake command/file/scope. How would I go about that? function(create_files) set(options) set(multiValueArgs GENERATED_HEADERS) cmake_parse_arguments( WIG "${option

[CMake] CheckSymbolExists fails with multiple header files

2012-05-11 Thread Leif Walsh
I want to check whether M_MMAP_THRESHOLD is defined in either malloc.h or sys/malloc.h, and whether CLOCK_REALTIME is defined in either time.h or sys/time.h. I thought this would work: check_symbol_exists(M_MMAP_THRESHOLD "malloc.h;sys/malloc.h" HAVE_M_MMAP_THRESHOLD) check_symbol_exists(CLOCK

[CMake] different assemblers in single build?

2012-05-11 Thread Alexey Istomin
Hi all, Is it possible to use different assemblers in single build with CMake? I try to use CMake for building embedded application - statically linked elf file. Main CPU has 2 cores: general-purpose MIPS based core and DSP. Project has simple structure: main dir contains asm and C sources for

Re: [CMake] Default value for CMAKE_BUILD_TYPE

2012-05-11 Thread Jean-Christophe Fillion-Robin
Hi Eric, In our different projects, we use an approach similar to this one: # Set a default build type if none was specified if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) message(STATUS "Setting build type to 'Debug' as none was specified.") set(CMAKE_BUILD_TYPE Debug CACHE STRIN

[CMake] Default value for CMAKE_BUILD_TYPE

2012-05-11 Thread pellegrini
Hi all, when cmake is run without specifying the build type using -D CMAKE_BUILD_TYPE, it is the Debug mode that is selected as the default. I would like to find a way to use Release as the default value when the user does not specify any build type in the cmake command line. From one of my p

[CMake] How to use different assemblers in single build?

2012-05-11 Thread Alexey Istomin
Is it possible to use different assemblers in single build with CMake? I try to use CMake for building embedded application - statically linked elf file.Main CPU has 2 cores: general-purpose MIPS based core and DSP. Project has simple structure: main dir contains asm and C sources for Mips core, ds

Re: [CMake] Package installation conundrum

2012-05-11 Thread Dave Abrahams
Thanks, everybody, for your help. Eventually the CMake expert I've been working with became available again and he solved the problem easily. Cheers, on Wed May 09 2012, Michael Wild wrote: > On 05/08/2012 11:13 PM, Dave Abrahams wrote: >> >> on Tue May 08 2012, Alexander Neundorf >> wrot

Re: [CMake] Intel compilers

2012-05-11 Thread Rolf Eike Beer
> Hi, > > I have just started using CMake for my projects and have some problems > getting it do exactly the things I want. So these are couple of questions > I > have: > > 1) How can I change the compiler from GNU g++ to my preferred compiler, in > this case intel's icc? I have tried CC=icc; ccmak