summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindCXX11.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
committermanuel <manuel@mausz.at>2016-03-08 21:02:53 +0100
commit9fc8b732737f139d3e466510d75668ab45578960 (patch)
tree76db9bf5cb8cc869be908a5ed3d6f4cca3e3608a /project/cmake/modules/FindCXX11.cmake
parentb75e2659df11c23aa921d2eed83c23adc282ed27 (diff)
downloadkodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.gz
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.tar.bz2
kodi-pvr-build-9fc8b732737f139d3e466510d75668ab45578960.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindCXX11.cmake')
-rw-r--r--project/cmake/modules/FindCXX11.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/project/cmake/modules/FindCXX11.cmake b/project/cmake/modules/FindCXX11.cmake
new file mode 100644
index 0000000..f1b7346
--- /dev/null
+++ b/project/cmake/modules/FindCXX11.cmake
@@ -0,0 +1,18 @@
1include(TestCXXAcceptsFlag)
2
3# try to use compiler flag -std=c++11
4check_cxx_accepts_flag("-std=c++11" CXX_FLAG_CXX11)
5if(CXX_FLAG_CXX11)
6 add_options (CXX ALL_BUILDS "-std=c++11")
7 set(CXX_STD11_FLAGS "-std=c++11")
8else()
9 # try to use compiler flag -std=c++0x for older compilers
10 check_cxx_accepts_flag("-std=c++0x" CXX_FLAG_CXX0X)
11 if(CXX_FLAG_CXX0X)
12 add_options (CXX ALL_BUILDS "-std=c++0x")
13 set(CXX_STD11_FLAGS "-std=c++0x")
14 endif(CXX_FLAG_CXX0X)
15endif(CXX_FLAG_CXX11)
16
17include(FindPackageHandleStandardArgs)
18find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX_STD11_FLAGS)