Skip to content

Commit 18f6e5e

Browse files
committed
Fix FreeBSD 11 build
FreeBSD 11 and up has c++11 enabled.
1 parent 00cb31c commit 18f6e5e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ ENDIF(WIN32)
6565

6666
#-----------------
6767
# CPPFLAGS, CXXFLAGS and LDFLAGS from the environment
68+
69+
SET(FreeBSD11Up False)
70+
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" AND
71+
${CMAKE_SYSTEM_VERSION} GREATER "10")
72+
SET(FreeBSD11Up True)
73+
endif()
74+
75+
# c++11 enabled by default only for FreeBSD 11 and up
76+
OPTION(CMAKE_ENABLE_C++11 "Build Connector using c++11" ${FreeBSD11Up})
6877
IF(CMAKE_ENABLE_C++11)
6978
INCLUDE(CheckCXXCompilerFlag)
7079
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)

0 commit comments

Comments
 (0)