mirror of
https://github.com/ArashPartow/exprtk.git
synced 2025-06-22 16:28:57 +00:00
Add compile options for different compilers
This commit is contained in:
@ -36,6 +36,17 @@ include(GitDetermineVersion)
|
|||||||
# ExprTk_VERSION_PATCH, ExprTk_VERSION_PATCH_EXTRA, ExprTk_VERSION_FULL
|
# ExprTk_VERSION_PATCH, ExprTk_VERSION_PATCH_EXTRA, ExprTk_VERSION_FULL
|
||||||
determine_version("${CMAKE_CURRENT_SOURCE_DIR}" "${GIT_EXECUTABLE}" "ExprTk")
|
determine_version("${CMAKE_CURRENT_SOURCE_DIR}" "${GIT_EXECUTABLE}" "ExprTk")
|
||||||
|
|
||||||
|
# compiling options
|
||||||
|
if (MSVC)
|
||||||
|
add_definitions(/bigobj)
|
||||||
|
add_compile_definitions(_SECURE_SCL=0)
|
||||||
|
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
|
||||||
|
add_compile_definitions(_SCL_SECURE_NO_WARNINGS)
|
||||||
|
add_compile_definitions(_HAS_ITERATOR_DEBUGGING=0)
|
||||||
|
else ()
|
||||||
|
add_compile_options(-pedantic-errors -Wall -Wextra -Werror)
|
||||||
|
endif ()
|
||||||
|
|
||||||
# create an ExprTk option for building the library with a sanitizer
|
# create an ExprTk option for building the library with a sanitizer
|
||||||
option(ExprTk_USE_SANITiZER "Use a sanitizer. The sanitizer is specified by ExprTk_SANITIZER" OFF)
|
option(ExprTk_USE_SANITiZER "Use a sanitizer. The sanitizer is specified by ExprTk_SANITIZER" OFF)
|
||||||
# define the requested sanitizer
|
# define the requested sanitizer
|
||||||
|
Reference in New Issue
Block a user