mirror of
https://github.com/pocketpy/pocketpy
synced 2025-10-20 19:40:18 +00:00
...
This commit is contained in:
parent
3d5a59bd15
commit
74df367f3c
@ -8,6 +8,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON)
|
|||||||
if(MSVC)
|
if(MSVC)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-")
|
||||||
add_compile_options(/wd4267 /wd4244)
|
add_compile_options(/wd4267 /wd4244)
|
||||||
|
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Ox")
|
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)
|
set(PK_IS_MAIN TRUE)
|
||||||
option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
|
option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
|
||||||
option(PK_BUILD_STATIC_LIB "Build static 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()
|
else()
|
||||||
set(PK_IS_MAIN FALSE)
|
set(PK_IS_MAIN FALSE)
|
||||||
option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
|
option(PK_BUILD_SHARED_LIB "Build shared library" OFF)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user