[CMake] [cmake-developers] check_cxx_source_compiles and include directories
Roman Wüger
roman.wueger at gmx.at
Tue Jul 28 15:38:36 EDT 2015
Thanks Brad
yes, and that's the point.
I've found my mistake, I had set the CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT between the check_cxx_source_compiles() calls and the add_subdirectory() calls.
I moved the CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT initialization on top of the check_cxx_source_compiles() calls and everthing is working as expected.
So, in my situation the order is:
1.) CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT
2.) check_cxx_source_compiles() and other platform checks
3.) add_subdirectory() and other stuff
Best Regards
Roman
> -----Ursprüngliche Nachricht-----
> Von: Brad King [mailto:brad.king at kitware.com]
> Gesendet: Dienstag, 28. Juli 2015 18:50
> An: Roman Wüger <roman.wueger at gmx.at>
> Cc: CMake MailingList <cmake at cmake.org>; CMake Developer MailingList
> <cmake-developers at cmake.org>
> Betreff: Re: [cmake-developers] check_cxx_source_compiles and include
> directories
>
> On 07/28/2015 12:23 PM, Roman Wüger wrote:
> > I've tried it on Mac OS 10.10.4 with clang 6.1.0.6020053 from XCode 6
> > using "Unix Makefiles" as the generator.
>
> Is that using the Xcode Command Line Tools or the /usr/bin/c++ stub that
> uses the /Applications/Xcode.app/.../bin/clang++ compiler underneath?
> Is CMAKE_OSX_SYSROOT set? Does -isysroot appear on the compilation
> command line?
>
> Thanks,
> -Brad
More information about the CMake
mailing list