Skip to content
Merged
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
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@ project(
LANGUAGES CXX C
)

# Set default build type to Release if not specified
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose build type" FORCE)
endif()

set(BLT_CXX_STD "c++14" CACHE STRING "Version of C++ standard")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")

set(ENABLE_MPI ON CACHE BOOL "")

################################
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ pip install -e .
#### Optional Spack environment variations
The Spack environment used to build Quandary is defined in `.spack_env/spack.yaml`.
You can add or remove packages from the `specs` list as needed or use different variants of these.
For instance, if you want to use the debug variant (which builds Petsc in debug mode) you can use `quandary@develop+test+debug`.
For instance, if you want to use the debug variant (which builds Quandary and Petsc in debug mode) you can use `quandary@develop+test build_type=Debug`.
To build with `PetscInt`s set to 64-bit integers, use `quandary+int64`.
To use a specific version of Petsc instead of the latest release, you can do e.g. `quandary@develop^petsc@3.22.1`.
The `+test` variant (by default on in `.spack_env/spack.yaml`) adds python and pip to the Spack environment.
This allows `pip install` to install python packages to your Spack virtual environment rather than a global one.
Expand Down Expand Up @@ -89,6 +90,7 @@ cmake ..
make
```

To build in debug mode use `cmake -DCMAKE_BUILD_TYPE=Debug ..`.
Add the path to Quandary to your `PATH` variable with `export PATH=/path/to/quandary/:$PATH`, so your binary can be found.
Alternatively, you can install the Quandary executable in a specific path (such as the default `/usr/local/bin` to have it in your `PATH` automatically):
```
Expand Down