fixed flag error and made option nounistd in lexer depend on compiler used
This commit is contained in:
parent
8cd1f2fb0d
commit
df927cf7d6
|
@ -36,6 +36,11 @@ add_custom_command(OUTPUT ${LEX_GENERATED_SOURCE_FILE}
|
|||
COMMENT "generate C source file for lexer"
|
||||
VERBATIM)
|
||||
|
||||
# remove dependency when compiling with MSVC on windows
|
||||
if (MSVC)
|
||||
add_compile_definitions(YY_NO_UNISTD_H)
|
||||
endif()
|
||||
|
||||
# ------------------------------------------------ #
|
||||
# Yacc #
|
||||
# ------------------------------------------------ #
|
||||
|
@ -140,7 +145,7 @@ set_target_properties(check
|
|||
if (MSVC)
|
||||
set(CHECK_FLAGS /DEBUG /WX)
|
||||
else()
|
||||
set(DEBUG_FLAGS -g /Werror)
|
||||
set(DEBUG_FLAGS -g -Werror)
|
||||
endif()
|
||||
|
||||
# compiler flags targeting a GCC debug environment
|
||||
|
|
|
@ -12,9 +12,6 @@
|
|||
%option nounput
|
||||
%option noinput
|
||||
|
||||
/* prevent depency of unistd.h */
|
||||
%option nounistd
|
||||
|
||||
%%
|
||||
"\n" yyLineNumber++;
|
||||
|
||||
|
|
Loading…
Reference in New Issue