diff --git a/cmake/support_kokkos.cmake b/cmake/support_kokkos.cmake index e37daa6a20..59c75c4ed6 100644 --- a/cmake/support_kokkos.cmake +++ b/cmake/support_kokkos.cmake @@ -13,8 +13,8 @@ set(KOKKOS_VERSION 4.0.01) # 3. Not installed, so fall back to building from source. macro(FindKokkos target_name) find_package(Kokkos - HINTS ${CMAKE_SOURCE_DIR}/kokkos - ${CMAKE_SOURCE_DIR}/Kokkos + HINTS ${pennylane_lightning_SOURCE_DIR}/kokkos + ${pennylane_lightning_SOURCE_DIR}/Kokkos ${Kokkos_Core_DIR} /usr /usr/local @@ -30,7 +30,7 @@ macro(FindKokkos target_name) find_library(Kokkos_core_lib NAME kokkoscore.a libkokkoscore.a kokkoscore.so libkokkoscore.so - HINTS ${CMAKE_SOURCE_DIR}/Kokkos/lib + HINTS ${pennylane_lightning_SOURCE_DIR}/Kokkos/lib ${Kokkos_Core_DIR}/lib ${Kokkos_Core_DIR}/lib64 /usr/lib diff --git a/cmake/support_simulators.cmake b/cmake/support_simulators.cmake index 002dc61299..1fc3a2752b 100644 --- a/cmake/support_simulators.cmake +++ b/cmake/support_simulators.cmake @@ -9,7 +9,7 @@ include_guard() # All simulators have their own directory in "simulators" # This macro will extract this list of directories. MACRO(FIND_SIMULATORS_LIST RESULT) - set(SIMULATORS_DIR ${CMAKE_SOURCE_DIR}/pennylane_lightning/core/src/simulators) + set(SIMULATORS_DIR ${pennylane_lightning_SOURCE_DIR}/pennylane_lightning/core/src/simulators) FILE(GLOB FULL_LIST RELATIVE ${SIMULATORS_DIR} ${SIMULATORS_DIR}/*) SET(${RESULT} "") FOREACH(ITEM ${FULL_LIST}) diff --git a/pennylane_lightning/core/src/CMakeLists.txt b/pennylane_lightning/core/src/CMakeLists.txt index 9f20a182f0..0423cf6c7d 100644 --- a/pennylane_lightning/core/src/CMakeLists.txt +++ b/pennylane_lightning/core/src/CMakeLists.txt @@ -19,7 +19,7 @@ endforeach() if (BUILD_TESTS) # Include macros supporting tests. - include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") + include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() include(CTest) diff --git a/pennylane_lightning/core/src/algorithms/tests/CMakeLists.txt b/pennylane_lightning/core/src/algorithms/tests/CMakeLists.txt index 8ec128d61b..1586aa865e 100644 --- a/pennylane_lightning/core/src/algorithms/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/algorithms/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/measurements/tests/CMakeLists.txt b/pennylane_lightning/core/src/measurements/tests/CMakeLists.txt index 454807b107..2ceb0fd05d 100644 --- a/pennylane_lightning/core/src/measurements/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/measurements/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/observables/tests/CMakeLists.txt b/pennylane_lightning/core/src/observables/tests/CMakeLists.txt index c46795a156..4aceed37f7 100644 --- a/pennylane_lightning/core/src/observables/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/observables/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/CMakeLists.txt b/pennylane_lightning/core/src/simulators/CMakeLists.txt index 70e57de8d1..84ecdf3b99 100644 --- a/pennylane_lightning/core/src/simulators/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/CMakeLists.txt @@ -7,7 +7,7 @@ add_subdirectory(base) ############################################################################### # Determine simulator and include its directory ############################################################################### -include("${CMAKE_SOURCE_DIR}/cmake/support_simulators.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_simulators.cmake") FIND_AND_ADD_SIMULATOR() if (BUILD_TESTS) diff --git a/pennylane_lightning/core/src/simulators/base/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/base/tests/CMakeLists.txt index e982dac079..19e7845b5a 100644 --- a/pennylane_lightning/core/src/simulators/base/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/base/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/CMakeLists.txt index 8d91d29aa7..aa11400553 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/CMakeLists.txt @@ -37,7 +37,7 @@ option(PLKOKKOS_ENABLE_SANITIZER "Enable address sanitizer" OFF) option(PLKOKKOS_ENABLE_WARNINGS "Enable warnings" ON) # Include macro and functions supporting Kokkos libraries. -include("${CMAKE_SOURCE_DIR}/cmake/support_kokkos.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_kokkos.cmake") FindKokkos(lightning_external_libs) if(PLKOKKOS_ENABLE_SANITIZER) diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/algorithms/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/algorithms/tests/CMakeLists.txt index 253696ca3a..ada10fab91 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/algorithms/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/algorithms/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/CMakeLists.txt index 5d2f7b2c89..e8bed25a69 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/gates/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/tests/CMakeLists.txt index 17f331c2af..853419669f 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/measurements/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/observables/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/observables/tests/CMakeLists.txt index 044fab580b..57669f5030 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/observables/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/observables/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/tests/CMakeLists.txt index fd8912ed31..1523600aa0 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_kokkos/utils/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_kokkos/utils/tests/CMakeLists.txt index 8d1b3ec1f0..8cafa7c717 100644 --- a/pennylane_lightning/core/src/simulators/lightning_kokkos/utils/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_kokkos/utils/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/CMakeLists.txt index 732351e87c..876341e331 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/algorithms/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/gates/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/gates/tests/CMakeLists.txt index 67f80c4e3d..b9459c416e 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/gates/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/gates/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/measurements/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/measurements/tests/CMakeLists.txt index f0a1dc1310..1ea6861b8a 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/measurements/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/measurements/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/observables/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/observables/tests/CMakeLists.txt index c34e7a6558..967aaedd24 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/observables/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/observables/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/tests/CMakeLists.txt index d0c0ea21eb..b7a2af2ebc 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/simulators/lightning_qubit/utils/tests/CMakeLists.txt b/pennylane_lightning/core/src/simulators/lightning_qubit/utils/tests/CMakeLists.txt index 973649c216..c7be747810 100644 --- a/pennylane_lightning/core/src/simulators/lightning_qubit/utils/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/simulators/lightning_qubit/utils/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################ diff --git a/pennylane_lightning/core/src/utils/tests/CMakeLists.txt b/pennylane_lightning/core/src/utils/tests/CMakeLists.txt index 1925f53181..2d194b4090 100644 --- a/pennylane_lightning/core/src/utils/tests/CMakeLists.txt +++ b/pennylane_lightning/core/src/utils/tests/CMakeLists.txt @@ -7,7 +7,7 @@ if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Debug) endif() -include("${CMAKE_SOURCE_DIR}/cmake/support_tests.cmake") +include("${pennylane_lightning_SOURCE_DIR}/cmake/support_tests.cmake") FetchAndIncludeCatch() ################################################################################