Re: [CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-21 Thread fkillus via CMake
Nice, thank you very much! This solves my problem. On Thu, Jan 21, 2016 at 3:56 PM, Nicholas Braden wrote: > Ah, I ran into this quirk too - the issue is that you have the quotes > incorrect: > > -DCMAKE_CXX_FLAGS="-march=native" > > Should be like this instead: > > "-DCMAKE_CXX_FLAGS=-march=nat

Re: [CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-21 Thread Nicholas Braden
Ah, I ran into this quirk too - the issue is that you have the quotes incorrect: -DCMAKE_CXX_FLAGS="-march=native" Should be like this instead: "-DCMAKE_CXX_FLAGS=-march=native" Try that and see if it helps, I am pretty sure I ran into the exact same problem. On Thu, Jan 21, 2016 at 8:27 AM, f

Re: [CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-21 Thread fkillus via CMake
Thanks for your suggestion! I consider trying it soon. On Wed, Jan 20, 2016 at 11:44 PM, Craig Scott wrote: > > From: fkillus >> To: cmake@cmake.org >> Cc: >> Date: Wed, 20 Jan 2016 18:41:26 +0100 >> Subject: [CMake] ExternalProject_Add() macro does not set &g

Re: [CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-21 Thread fkillus via CMake
Thanks for clarifying that external projects are not aware of the project they are embedded in. The CMAKE_COMPILER_IS_GNUCXX variable should be set automatically by CMake as far as I understand it (see https://cmake.org/Wiki/CMake_Useful_Variables). I narrowed down the problem by creating a minima

[CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-20 Thread Craig Scott
> From: fkillus > To: cmake@cmake.org > Cc: > Date: Wed, 20 Jan 2016 18:41:26 +0100 > Subject: [CMake] ExternalProject_Add() macro does not set > CMAKE_COMPILER_IS_GNUCXX > I have been trying to compile Ogre [1] as external dependency with > ExternalProject_Add().

Re: [CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-20 Thread Nicholas Braden
Where/how is that variable normally set? External projects have no awareness of the project they are in, they just run CMake as usual the same way you would. If the variable is normally set by CMake itself, make sure that your containing project and the external project both find the same compiler.

[CMake] ExternalProject_Add() macro does not set CMAKE_COMPILER_IS_GNUCXX

2016-01-20 Thread fkillus via CMake
I have been trying to compile Ogre [1] as external dependency with ExternalProject_Add(). In theory this should be straightforward since Ogre itself also uses CMake as buildsystem. However, in the process I encountered the following problem: Ogre checks the value of the CMAKE_COMPILER_IS_GNUCXX va