Re: [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-28 Thread Brad King
On 11/24/2016 01:43 PM, Roman Wüger wrote: > Shouldn't this be done by CMAKE_CXX_STANDARD? Yes, this is a known problem with try_compile. It needs to learn to honor the CMAKE__STANDARD. CMake itself works around this problem in some cases, e.g. *

Re: [cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-24 Thread Roman Wüger
It is working now, after I added -lc++ to CMAKE_REQUIRED_LIBRARIES before the check_cxx_source_compiles() call. Shouldn't this be done by CMAKE_CXX_STANDARD? Best Regards Roman > Am 24.11.2016 um 19:08 schrieb Roman Wüger : > > Hello, > > If I use a small piece of code

[cmake-developers] C++11/C++14 doesn't work in check_cxx_source_compiles

2016-11-24 Thread Roman Wüger
Hello, If I use a small piece of code which uses , then it fails with check_cxx_source_compiles. If I copy the piece of code into a file and run the following on the command line, then it works: clang++ main.cpp -std=c++14 -stdlib=libc++ Here is the piece of code: #include