Skip to content

Commit b0c3e36

Browse files
authored
fix bug in CMake preventing user from disabling testing (#506)
1 parent 9c818c5 commit b0c3e36

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ set(CMAKE_CXX_EXTENSIONS NO)
5959
include(GNUInstallDirs)
6060
option(CPPINTEROP_USE_CLING "Use Cling as backend" OFF)
6161
option(CPPINTEROP_USE_REPL "Use clang-repl as backend" ON)
62+
option(CPPINTEROP_ENABLE_TESTING "Enable the CppInterOp testing infrastructure." ON)
6263

6364
if (CPPINTEROP_USE_CLING AND CPPINTEROP_USE_REPL)
6465
message(FATAL_ERROR "We can only use Cling (CPPINTEROP_USE_CLING=On) or Repl (CPPINTEROP_USE_REPL=On), but not both of them.")
@@ -453,10 +454,7 @@ option(CPPINTEROP_ENABLE_SPHINX "Use sphinx to generage CppInterOp user document
453454

454455
if(EMSCRIPTEN)
455456
message("Build with emscripten")
456-
option(CPPINTEROP_ENABLE_TESTING "Enables the testing infrastructure." OFF)
457-
else()
458-
message("Build with cmake")
459-
option(CPPINTEROP_ENABLE_TESTING "Enables the testing infrastructure." ON)
457+
set(CPPINTEROP_ENABLE_TESTING OFF)
460458
endif()
461459

462460
if(MSVC)

0 commit comments

Comments
 (0)