[Insight-developers] Problems building ITK against llvm libc++ (in C++11 mode)

Sean McBride sean at rogue-research.com
Thu Oct 17 14:11:58 EDT 2013


On Thu, 17 Oct 2013 14:00:50 -0400, Bradley Lowekamp said:

>Did you compile with a clean CMake cache?

Yes.

>What is defined in the Configure header?
>
>What is the result and output of the try compile?

In CMakeCache.txt I see:

//Have include tr1/type_traits
ITK_HAS_STLTR1_TR1_TYPE_TRAITS:INTERNAL=1
//Have include type_traits
ITK_HAS_STLTR1_TYPE_TRAITS:INTERNAL=

In itkConfigure.h I see:

// defined if the system has <tr1/type_traits> header
#define ITK_HAS_STLTR1_TR1_TYPE_TRAITS
// defined if the system has <type_traits> header
/* #undef ITK_HAS_STLTR1_TYPE_TRAITS */

If I create a simple test file that does nothing but include the two header varieties, ie:

-----------------
#include <tr1/type_traits>
#include <type_traits>

int main (void)
{
  return 0;
}
-----------------

then try with various flags:

$ xcrun clang++ -fsyntax-only -std=c++11 test.cxx
test.cxx:2:10: fatal error: 'type_traits' file not found
#include <type_traits>
         ^

$ xcrun clang++ -fsyntax-only -std=c++11 -stdlib=libc++ test.cxx
test.cxx:1:10: fatal error: 'tr1/type_traits' file not found
#include <tr1/type_traits>
         ^

So I guess the -stdlib=libc++ is not reaching the try compile?

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the Insight-developers mailing list