-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,32 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
project(qasmtools VERSION 1.0 LANGUAGES CXX) | ||
project( | ||
qasmtools | ||
VERSION 1.0 | ||
LANGUAGES CXX) | ||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
enable_testing() | ||
|
||
#### qasmtools root directory | ||
# qasmtools root directory | ||
add_compile_definitions(PROJECT_ROOT_DIR="${PROJECT_SOURCE_DIR}") | ||
|
||
#### Headers | ||
# Headers | ||
add_library(libqasmtools INTERFACE) | ||
target_include_directories(libqasmtools INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>) | ||
target_include_directories( | ||
libqasmtools | ||
INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/>) | ||
|
||
#### Enable OpenQASM 2.0 Specs | ||
option(QASMTOOLS_QASM2_SPECS "Use OpenQASM 2.0 standard instead of Qiskit gate specifications" OFF) | ||
if (${QASMTOOLS_QASM2_SPECS}) | ||
target_compile_definitions(libqasmtools INTERFACE -DQASMTOOLS_QASM2_SPECS=true) | ||
else () | ||
target_compile_definitions(libqasmtools INTERFACE -DQASMTOOLS_QASM2_SPECS=false) | ||
endif () | ||
# Enable OpenQASM 2.0 Specs | ||
option(QASMTOOLS_QASM2_SPECS | ||
"Use OpenQASM 2.0 standard instead of Qiskit gate specifications" OFF) | ||
if(${QASMTOOLS_QASM2_SPECS}) | ||
target_compile_definitions(libqasmtools | ||
INTERFACE -DQASMTOOLS_QASM2_SPECS=true) | ||
else() | ||
target_compile_definitions(libqasmtools | ||
INTERFACE -DQASMTOOLS_QASM2_SPECS=false) | ||
endif() | ||
|
||
#### Unit testing | ||
# Unit testing | ||
add_subdirectory(${CMAKE_SOURCE_DIR}/unit_tests/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters