Skip to content

Commit c74d159

Browse files
committed
Add PDO_CONTRACTS_PATH to the project variables for builds
This will help with more flexible inclusion of 3rd party contracts. Signed-off-by: Mic Bowman <mic.bowman@intel.com>
1 parent d9025c1 commit c74d159

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cmake/ProjectVariables.cmake

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
# * PDO_INSTALL_ROOT
1818
# * PDO_CONTRACT_VERSION
1919

20+
SET(PDO_CONTRACTS_ROOT ${CMAKE_SOURCE_DIR})
21+
IF (DEFINED ENV{PDO_CONTRACTS_ROOT})
22+
SET(PDO_CONTRACTS_ROOT $ENV{PDO_CONTRACTS_ROOT})
23+
ENDIF()
24+
2025
IF (NOT DEFINED ENV{PDO_SOURCE_ROOT})
2126
MESSAGE(FATAL_ERROR "PDO_SOURCE_ROOT not defined")
2227
ENDIF()
@@ -35,7 +40,7 @@ SET(PDO_JUPYTER_ROOT ${PDO_INSTALL_ROOT}/opt/pdo/notebooks)
3540
# without any annotated version tags)
3641
EXECUTE_PROCESS(
3742
COMMAND ./get_version
38-
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin
43+
WORKING_DIRECTORY ${PDO_CONTRACTS_ROOT}/bin
3944
OUTPUT_VARIABLE PDO_CONTRACT_VERSION
4045
ERROR_QUIET
4146
OUTPUT_STRIP_TRAILING_WHITESPACE

0 commit comments

Comments
 (0)