@@ -57,11 +57,11 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
5757enable_language (CXX)
5858set (CMAKE_CXX_EXTENSIONS NO )
5959include (GNUInstallDirs)
60- option (USE_CLING "Use Cling as backend" OFF )
61- option (USE_REPL "Use clang-repl as backend" ON )
60+ option (CPPINTEROP_USE_CLING "Use Cling as backend" OFF )
61+ option (CPPINTEROP_USE_REPL "Use clang-repl as backend" ON )
6262
63- if (USE_CLING AND USE_REPL )
64- message (FATAL_ERROR "We can only use Cling (USE_CLING =On) or Repl (USE_REPL =On), but not both of them." )
63+ if (CPPINTEROP_USE_CLING AND CPPINTEROP_USE_REPL )
64+ message (FATAL_ERROR "We can only use Cling (CPPINTEROP_USE_CLING =On) or Repl (CPPINTEROP_USE_REPL =On), but not both of them." )
6565 endif ()
6666
6767 ## Define supported version of clang and llvm
@@ -102,12 +102,12 @@ include(GNUInstallDirs)
102102
103103 ## Find supported LLVM
104104
105- if (USE_CLING )
106- message (STATUS "Mode USE_CLING = ON" )
105+ if (CPPINTEROP_USE_CLING )
106+ message (STATUS "Mode CPPINTEROP_USE_CLING = ON" )
107107 find_package (LLVM REQUIRED CONFIG ${llvm_search_hints} NO_DEFAULT_PATH)
108108 find_package (Clang REQUIRED CONFIG ${clang_search_hints} NO_DEFAULT_PATH)
109109 find_package (Cling REQUIRED CONFIG ${cling_search_hints} NO_DEFAULT_PATH)
110- endif (USE_CLING )
110+ endif (CPPINTEROP_USE_CLING )
111111
112112 if (LLVM_FOUND)
113113 if (LLVM_PACKAGE_VERSION VERSION_LESS LLVM_MIN_SUPPORTED OR LLVM_PACKAGE_VERSION VERSION_GREATER_EQUAL LLVM_VERSION_UPPER_BOUND)
@@ -248,7 +248,7 @@ endif()
248248
249249 ## Find supported Cling
250250
251- if (USE_CLING )
251+ if (CPPINTEROP_USE_CLING )
252252 if (NOT Cling_FOUND AND DEFINED Cling_DIR)
253253 find_package (Cling REQUIRED CONFIG ${cling_extra_hints} NO_DEFAULT_PATH)
254254 endif ()
@@ -292,24 +292,24 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
292292# In rare cases we might want to have clang installed in a different place
293293# than llvm and the header files should be found first (even though the
294294# LLVM_INCLUDE_DIRS) contain clang headers, too.
295- if (USE_CLING )
296- add_definitions (-DUSE_CLING )
295+ if (CPPINTEROP_USE_CLING )
296+ add_definitions (-DCPPINTEROP_USE_CLING )
297297 include_directories (SYSTEM ${CLING_INCLUDE_DIRS} )
298298 else ()
299- if (NOT USE_REPL )
300- message (FATAL_ERROR "We need either USE_CLING or USE_REPL " )
299+ if (NOT CPPINTEROP_USE_REPL )
300+ message (FATAL_ERROR "We need either CPPINTEROP_USE_CLING or CPPINTEROP_USE_REPL " )
301301 endif ()
302- add_definitions (-DUSE_REPL )
302+ add_definitions (-DCPPINTEROP_USE_REPL )
303303
304- endif (USE_CLING )
304+ endif (CPPINTEROP_USE_CLING )
305305include_directories (SYSTEM ${CLANG_INCLUDE_DIRS} )
306306include_directories (SYSTEM ${LLVM_INCLUDE_DIRS} )
307307separate_arguments (LLVM_DEFINITIONS_LIST NATIVE_COMMAND ${LLVM_DEFINITIONS} )
308308add_definitions (${LLVM_DEFINITIONS_LIST} )
309309
310- if (USE_CLING )
310+ if (CPPINTEROP_USE_CLING )
311311 message (STATUS "CLING_INCLUDE_DIRS: ${CLING_INCLUDE_DIRS} " )
312- endif (USE_CLING )
312+ endif (CPPINTEROP_USE_CLING )
313313message (STATUS "CLANG_INCLUDE_DIRS: ${CLANG_INCLUDE_DIRS} " )
314314message (STATUS "LLVM_INCLUDE_DIRS: ${LLVM_INCLUDE_DIRS} " )
315315message (STATUS "LLVM_DEFINITIONS_LIST: ${LLVM_DEFINITIONS_LIST} " )
0 commit comments