summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindCXX11.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
committermanuel <manuel@mausz.at>2017-06-04 16:57:49 +0200
commitf44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch)
treed8de60fc7e17edeb6f0921726c038ee54b281445 /cmake/modules/FindCXX11.cmake
parentae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff)
downloadkodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2
kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip
sync with upstream
Diffstat (limited to 'cmake/modules/FindCXX11.cmake')
-rw-r--r--cmake/modules/FindCXX11.cmake18
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/FindCXX11.cmake b/cmake/modules/FindCXX11.cmake
new file mode 100644
index 0000000..c0b9a52
--- /dev/null
+++ b/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()
15endif()
16
17include(FindPackageHandleStandardArgs)
18find_package_handle_standard_args(CXX11 DEFAULT_MSG CXX_STD11_FLAGS)