forked from nakidai/csnake
Change way to handle arguments in configure
parent
49bd6ee329
commit
cf8fe181a2
|
@ -14,7 +14,7 @@ add_executable(csnake
|
|||
src/sleep.c
|
||||
)
|
||||
|
||||
set_target_properties(csnake PROPERTIES C_STANDARD 99)
|
||||
set_target_properties(csnake PROPERTIES C_STANDARD 11)
|
||||
set_target_properties(csnake PROPERTIES C_EXTENSIONS FALSE)
|
||||
target_include_directories(csnake PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
if [[ "$*" == *"--help"* ]] || [[ "$*" == *"-h"* ]]
|
||||
then
|
||||
usage()
|
||||
{
|
||||
echo "Use environment variables to pass values:
|
||||
CC - compiler (default: cc)
|
||||
CFLAGS - flags for compiler
|
||||
|
@ -11,7 +11,17 @@ then
|
|||
DEFX - start x
|
||||
DEFY - start y"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-h) usage
|
||||
;;
|
||||
--help) usage
|
||||
;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
CC=${CC:-cc}
|
||||
CFLAGS=${CFLAGS:-}
|
||||
|
|
Loading…
Reference in New Issue