@@ -60,10 +60,10 @@ get_filename_component(REAL_PROJECT_BINARY_DIR "${PROJECT_BINARY_DIR}" REALPATH)
6060
6161if ("${REAL_PROJECT_SOURCE_DIR} " STREQUAL "${REAL_PROJECT_BINARY_DIR} " )
6262 message (FATAL_ERROR
63- "In-source builds are not permitted. You must run cmake in a separeted "
63+ "In-source builds are not permitted. You must run cmake in a separated "
6464 "directory, e.g.:\n "
6565 " mkdir build && cd build && cmake ..\n "
66- "NOTE: Remeber to clean up the source tree by deleting the files already "
66+ "NOTE: Remember to clean up the source tree by deleting the files already "
6767 "created by CMake, e.g, CMakeCache.txt and cmake.check_cache" )
6868endif ()
6969
@@ -73,7 +73,7 @@ set(CMAKE_CXX_STANDARD 20)
7373set (CMAKE_CXX_STANDARD_REQUIRED ON )
7474set (CMAKE_POSITION_INDEPENDENT_CODE TRUE )
7575
76- # Set warnings as errors by default.
76+ # Set warnings as errors by default.
7777# Individual targets and the command line invocation can override this behavior.
7878if (NOT DEFINED CMAKE_COMPILE_WARNING_AS_ERROR)
7979 set (CMAKE_COMPILE_WARNING_AS_ERROR ON )
@@ -95,7 +95,7 @@ endif()
9595
9696# Enable Amazon Braket backends by default.
9797if (NOT DEFINED CUDAQ_ENABLE_BRAKET_BACKEND)
98- set (CUDAQ_ENABLE_BRAKET_BACKEND ON CACHE BOOL "Enable building AWS SDK for Amazon Braket backends." )
98+ set (CUDAQ_ENABLE_BRAKET_BACKEND ON CACHE BOOL "Enable building AWS SDK for Amazon Bracket backends." )
9999endif ()
100100
101101# Enable Pasqal target by default.
@@ -108,6 +108,11 @@ if (NOT DEFINED CUDAQ_ENABLE_QCI_BACKEND)
108108 set (CUDAQ_ENABLE_QCI_BACKEND ON CACHE BOOL "Enable building the Quantum Circuits, Inc. target." )
109109endif ()
110110
111+ # Enable TII target by default.
112+ if (NOT DEFINED CUDAQ_ENABLE_TII_BACKEND)
113+ set (CUDAQ_ENABLE_TII_BACKEND ON CACHE BOOL "Enable building the TII target." )
114+ endif ()
115+
111116# Enable Quantum Machines target by default.
112117if (NOT DEFINED CUDAQ_ENABLE_QUANTUM_MACHINES_BACKEND)
113118 set (CUDAQ_ENABLE_QUANTUM_MACHINES_BACKEND ON CACHE BOOL "Enable building the Quantum Machines target." )
@@ -173,7 +178,7 @@ if(NOT LLVM_DIR AND EXISTS "$ENV{LLVM_INSTALL_PREFIX}/lib/cmake/llvm")
173178endif ()
174179if (NOT BLAS_LIBRARIES AND EXISTS "$ENV{BLAS_INSTALL_PREFIX} /libblas.a" )
175180 # CACHE INTERNAL is needed due to how FindBLAS.cmake works...
176- SET (BLAS_LIBRARIES "$ENV{BLAS_INSTALL_PREFIX} /libblas.a" CACHE INTERNAL "" )
181+ SET (BLAS_LIBRARIES "$ENV{BLAS_INSTALL_PREFIX} /libblas.a" CACHE INTERNAL "" )
177182endif ()
178183if (NOT CUSTATEVEC_ROOT)
179184 SET (CUSTATEVEC_ROOT "$ENV{CUQUANTUM_INSTALL_PREFIX} " CACHE PATH "Path to cuStateVec installation" )
@@ -190,7 +195,7 @@ endif()
190195if (NOT ZLIB_ROOT)
191196 SET (ZLIB_ROOT "$ENV{ZLIB_INSTALL_PREFIX} " CACHE PATH "Path to zlib installation" )
192197endif ()
193- if (NOT OPENSSL_ROOT_DIR)
198+ if (NOT OPENSSL_ROOT_DIR)
194199 SET (OPENSSL_ROOT_DIR "$ENV{OPENSSL_INSTALL_PREFIX} " CACHE PATH "Path to OpenSSL installation" )
195200endif ()
196201if (NOT crypto_LIBRARY AND CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" AND EXISTS "$ENV{OPENSSL_INSTALL_PREFIX} /lib64/libcrypto.a" )
@@ -249,9 +254,9 @@ else()
249254 # flat_namespace makes all symbols global, allowing shared libraries to see
250255 # each other's registrations. This is not a very graceful fix.
251256 # Alternatives might be:
252- # A. Restructuring libraries to avoid multiple symbol definitions
257+ # A. Restructuring libraries to avoid multiple symbol definitions
253258 # (but this still might struggle due to how plugin systems are used).
254- # B. Using LLVM/MLIR dylibs. This won't work until later versions of LLVM are used as
259+ # B. Using LLVM/MLIR dylibs. This won't work until later versions of LLVM are used as
255260 # the first versions of this setting did not appropriately link all libraries to the dylibs.
256261 add_link_options ("-Wl,-flat_namespace" )
257262endif ()
@@ -275,7 +280,7 @@ if (CUDAQ_ENABLE_STATIC_LINKING)
275280 # then using -static (for exe) and -staic-pie (for linker).
276281 # At the time of writing, there wasn't any benefit to using those over -static.
277282 # When we only link libstdc++ and libgcc statically, we still have a dependency
278- # on GLIBC on the target system, but linking it statically is likely to cause issues.
283+ # on GLIBC on the target system, but linking it statically is likely to cause issues.
279284 # A better option might be to include the required GNU C Library and have the nvq++
280285 # compiler dynamically pick the newer one of the included or system one.
281286 # See also these posts:
@@ -284,10 +289,10 @@ if (CUDAQ_ENABLE_STATIC_LINKING)
284289 # If the final application loads multiple dynamic libraries, and two or more
285290 # of those dynamic libraries are linked to different versions of the same static
286291 # libraries, then the different copies of those static libraries will conflict with
287- # each other. If we were to link everything statically, it is probably advisable to
288- # set CMAKE_<LANG>_VISIBILITY_PRESET to hidden and CMAKE_VISIBILITY_INLINES_HIDDEN
292+ # each other. If we were to link everything statically, it is probably advisable to
293+ # set CMAKE_<LANG>_VISIBILITY_PRESET to hidden and CMAKE_VISIBILITY_INLINES_HIDDEN
289294 # to 1, to avoid some of these issues.
290- # We don't set these configurations here, since the LLVM runtime libraries that we
295+ # We don't set these configurations here, since the LLVM runtime libraries that we
291296 # build from source are already configured to hide symbols and include dependencies.
292297 SET (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc" )
293298 SET (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libstdc++ -static-libgcc" )
@@ -299,7 +304,7 @@ else()
299304 message (STATUS "CUDA Quantum static linking disabled." )
300305endif ()
301306
302- # ZLIB is required when we build LLVM with zlib support.
307+ # ZLIB is required when we build LLVM with zlib support.
303308# ZLIB support in LLVM is good to have e.g. for the linker,
304309# since some binaries will use zlib compression to store symbols.
305310find_package (ZLIB REQUIRED)
@@ -394,7 +399,7 @@ if(NOT Clang_DIR)
394399endif ()
395400
396401find_package (Clang CONFIG)
397- if (NOT Clang_FOUND)
402+ if (NOT Clang_FOUND)
398403 message (STATUS "Clang not found, turning off C++ Frontend." )
399404 set (CUDAQ_DISABLE_CPP_FRONTEND ON )
400405endif ()
@@ -508,7 +513,7 @@ execute_process(COMMAND git rev-parse --verify HEAD
508513 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
509514 OUTPUT_VARIABLE CUDA_QUANTUM_COMMIT_SHA OUTPUT_STRIP_TRAILING_WHITESPACE)
510515
511- configure_file ("${CMAKE_SOURCE_DIR} /include/cudaq/Support/Version.h.in"
516+ configure_file ("${CMAKE_SOURCE_DIR} /include/cudaq/Support/Version.h.in"
512517 "${CUDAQ_BINARY_DIR} /include/cudaq/Support/Version.h" @ONLY)
513518
514519# Check optional dependencies
@@ -538,7 +543,7 @@ add_subdirectory(tpls/fmt)
538543cmake_policy (POP)
539544include_directories (SYSTEM tpls/json/include )
540545
541- # Add spdlog
546+ # Add spdlog
542547set (SPDLOG_BUILD_SHARED OFF )
543548set (SPDLOG_FMT_EXTERNAL ON )
544549set (SPDLOG_BUILD_PIC ON )
@@ -663,7 +668,7 @@ endif()
663668
664669if (CUDAQ_ENABLE_PYTHON)
665670 find_package (Python 3 COMPONENTS Interpreter Development)
666-
671+
667672 # Apply specific patch to pybind11 for our documentation.
668673 # Only apply the patch if not already applied.
669674 execute_process (COMMAND ${GIT_EXECUTABLE} -C tpls/pybind11/ apply ../customizations/pybind11/pybind.h.diff --ignore -whitespace --reverse --check
@@ -693,8 +698,8 @@ if (CUDAQ_ENABLE_PYTHON)
693698 message (FATAL_ERROR "Applying LTO patch to submodule failed with ${GIT_PATCH_RESULT} , please update patch" )
694699 endif ()
695700
696- # Regarding the use of PyBind, we need to be careful that the same STL is used for any
697- # Python bindings generated as part of the CUDA-Q build and bindings generated for
701+ # Regarding the use of PyBind, we need to be careful that the same STL is used for any
702+ # Python bindings generated as part of the CUDA-Q build and bindings generated for
698703 # third party CUDA-Q libraries; see also https://github.com/pybind/pybind11/issues/1262
699704 add_subdirectory (tpls/pybind11)
700705 add_subdirectory (python)
@@ -706,8 +711,8 @@ if(CUDAQ_BUILD_TESTS AND NOT CUDAQ_DISABLE_CPP_FRONTEND)
706711 add_subdirectory (tpls/googletest-src)
707712 # Bug in GCC 12 leads to spurious warnings (-Wrestrict)
708713 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
709- if (CMAKE_COMPILER_IS_GNUCXX
710- AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0.0
714+ if (CMAKE_COMPILER_IS_GNUCXX
715+ AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 12.0.0
711716 AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.0.0)
712717 target_compile_options (gtest PUBLIC --param=evrp-mode=legacy)
713718 endif ()
@@ -725,7 +730,7 @@ if(CUDAQ_BUILD_TESTS AND NOT CUDAQ_DISABLE_CPP_FRONTEND)
725730 umbrella_lit_testsuite_end(check-all )
726731endif ()
727732
728- if (CUDAQ_EXTERNAL_NVQIR_SIMS)
733+ if (CUDAQ_EXTERNAL_NVQIR_SIMS)
729734 while (CUDAQ_EXTERNAL_NVQIR_SIMS)
730735 list (POP_FRONT CUDAQ_EXTERNAL_NVQIR_SIMS LIB_SO_OR_CONFIG_FILE)
731736 add_target_libs_to_wheel(${LIB_SO_OR_CONFIG_FILE} )
0 commit comments