# CMake (www.cmake.org) build configuration. # C++0x support may be required. CMAKE_MINIMUM_REQUIRED (VERSION 2.8) PROJECT (IOMappedFile) IF ( NOT WIN32 ) # Check to see if the compiler has -std=c++11 or -std=gnu++0x INCLUDE (CheckCXXCompilerFlag) check_cxx_compiler_flag("-std=c++11" HAVE_STD_CPP11) IF ( HAVE_STD_CPP11 ) ADD_DEFINITIONS("-std=c++11") ELSE ( ) check_cxx_compiler_flag("-std=gnu++0x" HAVE_STD_GPP0X) IF ( HAVE_STD_GPP0X ) ADD_DEFINITIONS("-std=gnu++0x") ELSE ( ) MESSAGE(FATAL_ERROR "Requires a compiler with -std=c++11 or -std=gnu++0x") ENDIF ( ) ENDIF ( ) ENDIF ( ) ADD_EXECUTABLE ( io_mapped_file_example io_mapped_file_example.cpp io_mapped_file.cpp )