RINUTILS_SET_UP_FLAGS()
-IF ("$ENV{FCS_GCC}")
+IF (ENV{FCS_GCC})
ADD_DEFINITIONS("-W -Wabi=11 -Waddress -Waggressive-loop-optimizations -Wall -Wattributes -Wbad-function-cast -Wbool-compare -Wbool-operation -Wbuiltin-declaration-mismatch -Wbuiltin-macro-redefined -Wcast-align -Wchar-subscripts -Wclobbered -Wcomment -Wcomments -Wcoverage-mismatch -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdesignated-init -Wdisabled-optimization -Wdiscarded-array-qualifiers -Wdiscarded-qualifiers -Wdiv-by-zero -Wdouble-promotion -Wduplicated-branches -Wduplicated-cond -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-contains-nul -Wformat-extra-args -Wformat-nonliteral -Wformat-security -Wformat-signedness -Wformat-y2k -Wformat-zero-length -Wframe-address -Wfree-nonheap-object -Whsa -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Winline -Wint-conversion -Wint-in-bool-context -Wint-to-pointer-cast -Winvalid-memory-model -Winvalid-pch -Wjump-misses-init -Wlogical-not-parentheses -Wlogical-op -Wmain -Wmaybe-uninitialized -Wmemset-elt-size -Wmemset-transposed-args -Wmisleading-indentation -Wmissing-braces -Wmissing-declarations -Wmissing-field-initializers -Wmissing-include-dirs -Wmissing-parameter-type -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnonnull-compare -Wnull-dereference -Wodr -Wold-style-declaration -Wold-style-definition -Wopenmp-simd -Woverflow -Woverlength-strings -Woverride-init -Wpacked -Wpacked-bitfield-compat -Wparentheses -Wpointer-arith -Wpointer-compare -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wpsabi -Wrestrict -Wreturn-local-addr -Wreturn-type -Wscalar-storage-order -Wsequence-point -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstack-protector -Wstrict-aliasing -Wstrict-prototypes -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure -Wsuggest-final-methods -Wsuggest-final-types -Wswitch -Wswitch-bool -Wswitch-default -Wswitch-unreachable -Wsync-nand -Wtautological-compare -Wtrampolines -Wtrigraphs -Wtype-limits -Wuninitialized -Wunknown-pragmas -Wunsafe-loop-optimizations -Wunused -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-macros -Wunused-parameter -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wvolatile-register-var -Wwrite-strings -Walloc-size-larger-than=9223372036854775807 -Warray-bounds=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wnormalized=nfc -Wshift-overflow=2 -Wunused-const-variable=2 -Wstrict-overflow=1 -Wno-switch-default -Wno-vla -Wno-inline -Wno-jump-misses-init -Wno-unsafe-loop-optimizations")
# -Wimplicit-fallthrough=5
# -Wno-vla-larger-than
INCLUDE(CheckIncludeFiles)
SET(_r "stdbool.h" "stdio.h" "recode.h")
CHECK_INCLUDE_FILES("${_r}" HAVE_RECODE_H)
-IF (NOT "${HAVE_RECODE_H}")
+IF (NOT HAVE_RECODE_H)
IF (NOT WIN32)
MESSAGE(WARNING "Cannot find recode.h anywhere; it is usually unnecessary, but you may opt to install a source release tarball of the recode library from https://github.com/rrthomas/recode")
ENDIF ()
SET (_my_man_gen "${CMAKE_CURRENT_SOURCE_DIR}/fortune/process-fortune-man-template.pl")
SET (_my_args)
LIST(APPEND _my_args "--cookiedir" "${COOKIEDIR}" "--ocookiedir" "${OCOOKIEDIR}" "--output" "${_my_man_page}")
-IF ("${NO_OFFENSIVE}")
+IF (NO_OFFENSIVE)
LIST(APPEND _my_args "--without-offensive")
SET(_MY_IN "${CMAKE_CURRENT_SOURCE_DIR}/fortune/fortune_with_offensive.template.man")
ELSE()
ENDFOREACH()
ENDIF()
-IF ("${NO_OFFENSIVE}")
+IF (NO_OFFENSIVE)
ADD_DEFINITIONS("-DNO_OFFENSIVE=1")
ENDIF()
CHECK_INCLUDE_FILE("regex.h" HAVE_REGEX_H)
-IF ("${HAVE_REGEX_H}")
+IF (HAVE_REGEX_H)
ADD_DEFINITIONS("-DHAVE_REGEX_H")
ADD_DEFINITIONS("-DPOSIX_REGEX")
ENDIF()
# See: https://github.com/shlomif/fortune-mod/issues/58
-if ("${IS_CROSS}")
+if (IS_CROSS)
SET (_strfile "strfile")
find_program(_found "${_strfile}")
- if (NOT "${_found}")
+ if (NOT _found)
MESSAGE(FATAL_ERROR "\"strfile\" must be in the executables' path for cross-compiling builds. You can get it from a native install of fortune-mod: https://superuser.com/questions/284342/what-are-path-and-other-environment-variables-and-how-can-i-set-or-use-them . Also see https://github.com/shlomif/fortune-mod/issues/58 .")
endif()
else()
DESTINATION "${LOCALDIR}"
)
-IF (NOT "${NO_OFFENSIVE}")
+IF (NOT NO_OFFENSIVE)
ADD_SUBDIRECTORY("off")
ENDIF()
# See: https://github.com/shlomif/fortune-mod/issues/58
SET (_target_rot "${CMAKE_CURRENT_BINARY_DIR}/../../rot")
-if ("${IS_CROSS}")
+if (IS_CROSS)
SET (_rot ${PERL_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/../../util/rot.pl")
else()
SET (_rot "${_target_rot}")
SET(LINK "${c}.u8")
SET(rot_LINK "${rot_dir}/${LINK}")
if (WIN32)
- ADD_CUSTOM_COMMAND(
- OUTPUT "${rot_LINK}"
- COMMAND ${CMAKE_COMMAND} -E copy "${rot_dest}" "${rot_LINK}"
- DEPENDS "${rot_dest}"
- )
+ ADD_CUSTOM_COMMAND(
+ OUTPUT "${rot_LINK}"
+ COMMAND ${CMAKE_COMMAND} -E copy "${rot_dest}" "${rot_LINK}"
+ DEPENDS "${rot_dest}"
+ )
else()
ADD_CUSTOM_COMMAND(
OUTPUT "${rot_LINK}"