diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f6638c7..865ab2c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON) if(MSVC) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-") add_compile_options(/wd4267 /wd4244) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox") @@ -44,23 +45,6 @@ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_SOURCE_DIR}") set(PK_IS_MAIN TRUE) option(PK_BUILD_SHARED_LIB "Build shared library" OFF) option(PK_BUILD_STATIC_LIB "Build static library" OFF) - - # @szdytom favored testing - # disabled by default because @blueloveTH doesn't like it :C - option(BUILD_TESTING "Build the testing tree." OFF) - if (BUILD_TESTING) - option(BUILD_TESTING_SANITIZE "Build the source with sanitizers" OFF) - if (BUILD_TESTING_SANITIZE) - if (MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /fsanitize=address /fno-omit-frame-pointer") - else() - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=address,leak,undefined") - endif() - endif() - - enable_testing() - add_subdirectory(tests/) - endif() else() set(PK_IS_MAIN FALSE) option(PK_BUILD_SHARED_LIB "Build shared library" OFF)