From bd0075c29996fe8a30098ca9339b0f2699307922 Mon Sep 17 00:00:00 2001 From: Vlad Gheorghiu Date: Thu, 30 Nov 2023 12:38:36 -0500 Subject: [PATCH] update --- .github/workflows/cmake.yml | 4 ++-- CMakeLists.txt | 6 +++--- INSTALL.md | 4 ++-- cmake/staq_uninstall.cmake.in | 2 +- docker/Dockerfile | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 6a6e4ce..5e8fea7 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -46,10 +46,10 @@ jobs: if [ "$RUNNER_OS" == "Windows" ]; then cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake \ - -DSTAQ_INSTALL_SOURCES=ON + -DINSTALL_SOURCES=ON else cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \ - -DSTAQ_INSTALL_SOURCES=ON + -DINSTALL_SOURCES=ON fi - name: Build staq diff --git a/CMakeLists.txt b/CMakeLists.txt index 6033fe4..6b6295d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,10 +93,10 @@ endif () #### Installation (binaries) install(TARGETS ${COMPILER} DESTINATION ${CMAKE_INSTALL_BINDIR}) -option(STAQ_INSTALL_SOURCES "Enable staq's source code installation" OFF) +option(INSTALL_SOURCES "Enable staq's source code installation" OFF) #### Installation (source) -if (STAQ_INSTALL_SOURCES) +if (INSTALL_SOURCES) set(STAQ_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}") install(DIRECTORY include/ DESTINATION ${STAQ_INSTALL_DIR}) install(DIRECTORY qasmtools/include/ DESTINATION ${STAQ_INSTALL_DIR}) @@ -122,7 +122,7 @@ if (NOT TARGET uninstall) "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) if (NOT MSVC) - if (STAQ_INSTALL_SOURCES) + if (INSTALL_SOURCES) add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" COMMAND ${CMAKE_COMMAND} -E remove_directory "${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME}" diff --git a/INSTALL.md b/INSTALL.md index 2ed625b..fa836ed 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -37,7 +37,7 @@ To be able to install staq's source code in addition to the binaries, configure the system with ```shell -cmake -B build -DSTAQ_INSTALL_SOURCES=ON +cmake -B build -DINSTALL_SOURCES=ON ``` **Important**: If you want to build the grid synth tools `staq_grid_synth` @@ -94,7 +94,7 @@ or in an Administrator Command Prompt (Windows) cmake --build build --target (un)install ``` -If you configured the system with `-DSTAQ_INSTALL_SOURCES=ON`, staq's source +If you configured the system with `-DINSTALL_SOURCES=ON`, staq's source code will be installed in `/usr/local/include/staq` (UNIX/UNIX-like systems), or in `C:\Program Files (x86)\staq` on Windows systems. The paths may differ on your system. To use staq's source code, precede all include paths by `staq` in diff --git a/cmake/staq_uninstall.cmake.in b/cmake/staq_uninstall.cmake.in index 573bb1d..ce34c3d 100644 --- a/cmake/staq_uninstall.cmake.in +++ b/cmake/staq_uninstall.cmake.in @@ -26,7 +26,7 @@ endforeach() if(NOT "@MSVC@") message(STATUS "Removing @CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@") - if("@STAQ_INSTALL_SOURCES@") + if("@INSTALL_SOURCES@") message(STATUS "Removing @STAQ_INSTALL_DIR@") endif() else() diff --git a/docker/Dockerfile b/docker/Dockerfile index b3ddd46..bb702cf 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -23,7 +23,7 @@ USER sq WORKDIR /home/sq RUN git clone --depth 1 --branch main https://github.com/softwareqinc/staq WORKDIR /home/sq/staq -RUN cmake -B build -DSTAQ_INSTALL_SOURCES=ON && \ +RUN cmake -B build -DINSTALL_SOURCES=ON && \ cmake --build build --target all --parallel 4 && \ sudo cmake --build build --target install USER sq