Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -450,15 +450,16 @@ endif()

# Third-party libraries (tpls)
# ==============================================================================
set(FMT_INSTALL ON)
# Disable fmt's install rules so that no fmt headers/targets get exported
set(FMT_INSTALL OFF CACHE BOOL "Disable installing fmt; keep it private to CUDA-Q." FORCE)
cmake_policy(PUSH)
# CMP0146: The FindCUDA module is removed.
# CMake 3.27 and above no longer provide the modules.
# https://cmake.org/cmake/help/latest/policy/CMP0146.html
if(POLICY CMP0146)
cmake_policy(SET CMP0146 OLD)
endif()
add_subdirectory(tpls/fmt)
add_subdirectory(tpls/fmt EXCLUDE_FROM_ALL)
cmake_policy(POP)
include_directories(SYSTEM tpls/json/include)

Expand Down
2 changes: 1 addition & 1 deletion runtime/cudaq/platform/mqpu/remote/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ target_link_libraries(cudaq-remote-simulator-qpu PUBLIC
cudaq-common
cudaq-mlir-runtime
rest-remote-platform-client
fmt::fmt-header-only
cudaq-platform-mqpu
PRIVATE fmt::fmt-header-only
)

install(TARGETS cudaq-remote-simulator-qpu DESTINATION lib)
Expand Down
3 changes: 2 additions & 1 deletion runtime/nvqir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ set_property(GLOBAL APPEND PROPERTY CUDAQ_RUNTIME_LIBS ${LIBRARY_NAME})
# and by keeping it private, others can specify the
# backend library later on
target_link_libraries(${LIBRARY_NAME}
PUBLIC cudaq-common cudaq-operator dl fmt::fmt-header-only)
PUBLIC cudaq-common cudaq-operator dl
PRIVATE fmt::fmt-header-only)

install(TARGETS ${LIBRARY_NAME}
EXPORT nvqir-targets
Expand Down
4 changes: 2 additions & 2 deletions unittests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ macro (create_tests_with_backend NVQIR_BACKEND EXTRA_BACKEND_TESTER)
nvqir-${NVQIR_BACKEND}
nvqir
cudaq
fmt::fmt-header-only
cudaq-platform-default
cudaq-builder
gtest_main)
gtest_main
PRIVATE fmt::fmt-header-only)
set(TEST_LABELS "")
if (${NVQIR_BACKEND} STREQUAL "qpp")
target_compile_definitions(${TEST_EXE_NAME} PRIVATE -DCUDAQ_SIMULATION_SCALAR_FP64)
Expand Down
Loading