-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
140 changed files
with
3,308 additions
and
365,417 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
{ | ||
"version": 6, | ||
|
||
"configurePresets": [ | ||
{ | ||
"name": "default", | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
"CMAKE_COMPILE_WARNING_AS_ERROR": true | ||
} | ||
}, | ||
{ | ||
"name": "msvc", "inherits": "default", | ||
"generator": "Visual Studio 17 2022", | ||
"cacheVariables": { | ||
"CMAKE_COMPILE_WARNING_AS_ERROR": false | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "default", | ||
"configurePreset": "default" | ||
}, | ||
{ | ||
"name": "release", | ||
"configurePreset": "default", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "msvc-debug", | ||
"configurePreset": "msvc", | ||
"configuration": "Debug" | ||
} | ||
], | ||
"testPresets": [ | ||
{ | ||
"name": "default", | ||
"configurePreset": "default", | ||
"output": { | ||
"outputOnFailure": true, | ||
"verbosity": "verbose" | ||
}, | ||
"execution": { | ||
"noTestsAction": "error", | ||
"scheduleRandom": true, | ||
"stopOnFailure": false, | ||
"timeout": 60 | ||
} | ||
}, | ||
{ | ||
"name": "release", "inherits": "default", | ||
"configuration": "Release" | ||
}, | ||
{ | ||
"name": "msvc-debug", "inherits": "default", | ||
"configurePreset": "msvc", | ||
"configuration": "Debug" | ||
} | ||
], | ||
"workflowPresets": [ | ||
{ | ||
"name": "default", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "default" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "default" | ||
}, | ||
{ | ||
"type": "test", | ||
"name": "default" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "msvc", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "msvc" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "msvc-debug" | ||
}, | ||
{ | ||
"type": "test", | ||
"name": "msvc-debug" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "default" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "release" | ||
}, | ||
{ | ||
"type": "test", | ||
"name": "release" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
# Helper modules. | ||
include(CheckFunctionExists) | ||
include(CheckIncludeFile) | ||
|
||
# Setup options. | ||
option(OPENMP "enable OpenMP support" OFF) | ||
option(PCRE "enable PCRE support" OFF) | ||
option(GKREGEX "enable GKREGEX support" OFF) | ||
option(GKRAND "enable GKRAND support" OFF) | ||
|
||
|
||
# Add compiler flags. | ||
if(MSVC) | ||
set(GKlib_COPTIONS WIN32 MSC _CRT_SECURE_NO_DEPRECATE USE_GKREGEX) | ||
elseif(WIN32) | ||
set(GKlib_COPTIONS USE_GKREGEX) | ||
else() | ||
set(GKlib_COPTIONS LINUX FILE_OFFSET_BITS=64) | ||
endif(MSVC) | ||
|
||
if(CYGWIN) | ||
list(APPEND GKlib_COPTIONS CYGWIN) | ||
endif() | ||
|
||
if(APPLE) | ||
list(APPEND GKlib_COPTIONS MACOS) | ||
endif() | ||
|
||
if(CMAKE_C_COMPILER_ID STREQUAL "GNU") | ||
list(APPEND GKlib_COPTS -fno-strict-aliasing -Werror -Wall -pedantic -Wno-unused-function -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unknown-pragmas -Wno-unused-label) | ||
endif() | ||
|
||
if(UNIX) | ||
include(CheckPIESupported) | ||
check_pie_supported() | ||
set(CMAKE_POSITION_INDEPENDENT_CODE true) | ||
endif() | ||
|
||
# Find OpenMP if it is requested. | ||
if(OPENMP) | ||
find_package(OpenMP REQUIRED) | ||
list(APPEND GKlib_COPTIONS __OPENMP__) | ||
endif() | ||
|
||
# Set the CPU type | ||
if(NOT CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64") | ||
list(APPEND GKlib_COPTIONS NO_X86=1) | ||
endif() | ||
|
||
# Add various options | ||
if(PCRE) | ||
list(APPEND GKlib_COPTIONS __WITHPCRE__) | ||
endif() | ||
|
||
if(GKREGEX) | ||
list(APPEND GKlib_COPTIONS USE_GKREGEX) | ||
endif() | ||
|
||
if(GKRAND) | ||
list(APPEND GKlib_COPTIONS USE_GKRAND) | ||
endif() | ||
|
||
|
||
# Check for features. | ||
check_include_file(execinfo.h HAVE_EXECINFO_H) | ||
if(HAVE_EXECINFO_H) | ||
list(APPEND GKlib_COPTIONS HAVE_EXECINFO_H) | ||
endif(HAVE_EXECINFO_H) | ||
|
||
check_function_exists(getline HAVE_GETLINE) | ||
if(HAVE_GETLINE) | ||
list(APPEND GKlib_COPTIONS HAVE_GETLINE) | ||
endif(HAVE_GETLINE) | ||
|
||
|
||
# Custom check for TLS. | ||
if(MSVC) | ||
list(APPEND GKlib_COPTIONS __thread=__declspec(thread)) | ||
|
||
# This if checks if that value is cached or not. | ||
if("${HAVE_THREADLOCALSTORAGE}" MATCHES "^${HAVE_THREADLOCALSTORAGE}$") | ||
message(CHECK_START "checking for thread-local storage") | ||
try_compile(HAVE_THREADLOCALSTORAGE | ||
${CMAKE_BINARY_DIR} | ||
${CMAKE_CURRENT_LIST_DIR}/check_thread_storage.c) | ||
if(HAVE_THREADLOCALSTORAGE) | ||
message(CHECK_PASS "found") | ||
else() | ||
message(CHECK_FAIL "not found") | ||
endif() | ||
endif() | ||
if(NOT HAVE_THREADLOCALSTORAGE) | ||
list(APPEND GKlib_COPTIONS __thread=) | ||
endif() | ||
endif() | ||
|
||
# Finally set the official C flags. | ||
add_compile_options("$<$<COMPILE_LANGUAGE:C>:${GKlib_COPTS}>") | ||
add_compile_definitions("$<$<COMPILE_LANGUAGE:C>:${GKlib_COPTIONS}>") |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.