Browse files

Add 2 slides about language features

  • Loading branch information...
1 parent 948198f commit f1a93dd35db305b4e37e193b4dacf93ca53b8b93 @TheErk committed Dec 2, 2016
Showing with 27 additions and 0 deletions.
  1. +27 −0 CMake-tutorial.tex
@@ -2197,6 +2197,33 @@ \subsection{Cross-compiling with CMake}
+\subsection{Handling standard language features}
+\frametitle{Selecting language standard}
+Sometimes one needs to select a required programming language standard level like C99 or C++11.
+The command line option used to select the appropriate standard vary from one compiler to another.
+There exist CMake variables controlling this are:
+\item for C++: \lstinline!CMAKE_CXX_STANDARD!, \lstinline!CMAKE_CXX_STANDARD_REQUIRED!
+\item for C: \lstinline!CMAKE_C_STANDARD!, \lstinline!CMAKE_C_STANDARD_REQUIRED!
+See a nice tutorial
+{\small \url{}}
+giving more detailed usage example for C++11.
+\frametitle{Enabling/selecting language feature}
+Sometimes requiring a whole standard support is too constraining since one only requires a specific langage feature
+which may be supported by the compiler long before it supports the whole standard requirements.
+Since CMake 3.1 one can inspect and enable language features:
\subsection{Export your project}
\frametitle{Exporting/Import your project}

0 comments on commit f1a93dd

Please sign in to comment.