<div dir="ltr">Hi Chris.<br><div><div class="gmail_extra"><div class="gmail_quote"><br><div>Try using the the CMAKE_CXX${std}_STANDARD_COMPILE_OPTION variable.  For example, the folowing piece of CMake code:</div><div style="margin-left:40px"><span style="font-family:monospace,monospace">cmake_minimum_required(VERSION 3.9)<br><br>project(foo CXX)<br>    <br>foreach(std IN ITEMS 98 11 14 17)<br>  message("C++${std} std flags: ${CMAKE_CXX${std}_STANDARD_COMPILE_OPTION}")<br>  message("C++${std} ext flags: ${CMAKE_CXX${std}_EXTENSION_COMPILE_OPTION}")<br>endforeach()</span><br><br></div><div>Wll generate for GCC on Linux:</div><div style="margin-left:40px"><span style="font-family:monospace,monospace">-- The CXX compiler identification is GNU 8.1.1<br>-- Check for working CXX compiler: /usr/bin/c++<br>-- Check for working CXX compiler: /usr/bin/c++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>-- Detecting CXX compile features<br>-- Detecting CXX compile features - done<br>C++98 std flags: -std=c++98<br>C++98 ext flags: -std=gnu++98<br>C++11 std flags: -std=c++11<br>C++11 ext flags: -std=gnu++11<br>C++14 std flags: -std=c++14<br>C++14 ext flags: -std=gnu++14<br>C++17 std flags: -std=c++1z<br>C++17 ext flags: -std=gnu++1z<br>-- Configuring done</span><br></div><div><br></div><div>PGI on Linux:</div><div style="margin-left:40px"><span style="font-family:monospace,monospace">-- The CXX compiler identification is PGI 18.4.0<br>-- Check for working CXX compiler: /opt/pgi/linux86-64/18.4/bin/pgc++<br>-- Check for working CXX compiler: /opt/pgi/linux86-64/18.4/bin/pgc++ -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>-- Detecting CXX compile features<br>-- Detecting CXX compile features - done<br>C++98 std flags: -A<br>C++98 ext flags: --gnu_extensions<br>C++11 std flags: --c++11;-A<br>C++11 ext flags: --c++11;--gnu_extensions<br>C++14 std flags: --c++14;-A<br>C++14 ext flags: --c++14;--gnu_extensions<br>C++17 std flags: --c++17;-A<br>C++17 ext flags: --c++17;--gnu_extensions<br>-- Configuring done</span><br><br></div><div><br></div><div>And for IBM XL on AIX:</div><div><div style="margin-left:40px"><span style="font-family:monospace,monospace">-- The CXX compiler identification is XL 13.1.3<br>-- Check for working CXX compiler: /usr/bin/xlC<br>-- Check for working CXX compiler: /usr/bin/xlC -- works<br>-- Detecting CXX compiler ABI info<br>-- Detecting CXX compiler ABI info - done<br>-- Detecting CXX compile features<br>-- Detecting CXX compile features - done<br>C++98 std flags: -qlanglvl=strict98<br>C++98 ext flags: -qlanglvl=extended<br>C++11 std flags: -qlanglvl=extended0x<br>C++11 ext flags: -qlanglvl=extended0x<br>C++14 std flags: <br>C++14 ext flags: <br>C++17 std flags: <br>C++17 ext flags: <br>-- Configuring done<br>-- Generating done</span><br></div></div><br></div>- Chuck<br></div></div></div>