<div dir="ltr">This might be error from `clang -std=c++11 a.c`. I would dump out and see what commands CMake is running to check if it's feeding c++ options to c files.<br><br>Regards,<br>Kevin</div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 26, 2017 at 11:11 PM, SANJAY SRIVALLABH SINGAPURAM via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div>I issued the following command to point the build to use clang and clang++, from a local llvm build directory included in PATH, instead of /usr/bin/{cc,c++},<span style="font-family:monospace"><br><br></span></div><div><font size="4"><span style="font-family:monospace">cmake <font size="4"><span style="font-family:monospace">-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++</span></font> ../llvm_src<br></span></font></div><div><div><br>The configuration failed with the error stating the compiler didn't recognize '-std=c++11' flag, whereas clang compiled a dummy c++ file with warnings.<br><font size="4"><span style="font-family:monospace"><br></span></font></div><div><font size="4"><span style="font-family:monospace">int main(){return 0;} ( which was used during the config, found in build/CMakeFiles/CMakeErrors.<wbr>log )</span></font><br><br></div><div>How can I resolve this ?<br><br></div><div>Thank You,<br></div><div>Sanjay<br></div></div></div>
<br>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>