Skip to content

Commit

Permalink
Can't make --target and --library-mode mutually exclusive (yet).
Browse files Browse the repository at this point in the history
  • Loading branch information
schweitzpgi committed Dec 11, 2023
1 parent 1021a19 commit 917f2b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/sphinx/examples/cpp/providers/photonics.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Compile and run with:
// ```
// nvq++ --target photonics photonics.cpp
// nvq++ --library-mode --target photonics photonics.cpp
// ./a.out
// ```

Expand Down
11 changes: 7 additions & 4 deletions tools/nvqpp/nvq++.in
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,14 @@ while [ $# -ne 0 ]; do
LIBRARY_MODE=false
;;
--library-mode)
if [-z "${TARGET_CONFIG}"]; then
LIBRARY_MODE=true
else
echo "cannot use --library-mode with --target" >&2
if [-n "${TARGET_CONFIG}"]; then
# Leave this commented out, since this combination is used
# in photonics.cpp
#echo "cannot use --library-mode with --target" >&2
#exit 2
true
fi
LIBRARY_MODE=true
;;
--clang-verbose | -clang-verbose)
CLANG_VERBOSE="-v"
Expand Down

0 comments on commit 917f2b1

Please sign in to comment.