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