Skip to content

Commit 25496ec

Browse files
committed
CDRIVER-4158 make CXX enablement optional
1 parent 2135897 commit 25496ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,13 @@ option (ENABLE_DEBUG_ASSERTIONS "Turn on runtime debug assertions" OFF)
5555
project (mongo-c-driver C)
5656

5757
# Optionally enable C++ to do some C++-specific tests
58-
enable_language (CXX OPTIONAL)
58+
include (CheckLanguage)
59+
check_language (CXX)
60+
if (CMAKE_CXX_COMPILER)
61+
enable_language (CXX)
62+
else ()
63+
message (STATUS "No CXX support")
64+
endif ()
5965

6066
if (NOT CMAKE_BUILD_TYPE)
6167
set (CMAKE_BUILD_TYPE "RelWithDebInfo")

0 commit comments

Comments
 (0)