Skip to content

Commit

Permalink
Merge pull request #18 from cyclus/cycroot
Browse files Browse the repository at this point in the history
fix for CYCLUS_ROOT_DIR
  • Loading branch information
gidden committed Aug 28, 2014
2 parents 0ccd7e7 + e4d1f59 commit f7bd457
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions cmake/FindCyclus.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,17 @@ IF(DEFINED ENV{CYCLUS_ROOT_DIR})
MESSAGE(STATUS "\t\tThe environment variable CYCLUS_ROOT_DIR: $ENV{CYCLUS_ROOT_DIR}")
ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
ELSE(DEFINED ENV{CYCLUS_ROOT_DIR})
FIND_PROGRAM(CYCLUS_BIN cyclus)
MESSAGE("cyclus bin dir: ${CYCLUS_BIN}")
IF(CYCLUS_BIN)
EXECUTE_PROCESS(COMMAND cyclus --install-path
OUTPUT_VARIABLE CYCLUS_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE(CYCLUS_BIN)
SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
ENDIF(CYCLUS_BIN)
IF(NOT DEFINED CYCLUS_ROOT_DIR)
FIND_PROGRAM(CYCLUS_BIN cyclus)
MESSAGE("cyclus bin dir: ${CYCLUS_BIN}")
IF(CYCLUS_BIN)
EXECUTE_PROCESS(COMMAND cyclus --install-path
OUTPUT_VARIABLE CYCLUS_ROOT_DIR
OUTPUT_STRIP_TRAILING_WHITESPACE)
ELSE(CYCLUS_BIN)
SET(CYCLUS_ROOT_DIR "$ENV{HOME}/.local")
ENDIF(CYCLUS_BIN)
ENDIF(NOT DEFINED CYCLUS_ROOT_DIR)
ENDIF(DEFINED ENV{CYCLUS_ROOT_DIR})

# Let the user know if we're using a hint
Expand Down

0 comments on commit f7bd457

Please sign in to comment.