Simple check that a system can allocate a large numpy array.
python array_allocate.py
cmake_minimum_required(VERSION 3.19) | |
option(CMAKE_TLS_VERIFY "Check cert" ON) | |
function(user_agent url fn) | |
file(DOWNLOAD ${url} ${fn} | |
STATUS stat | |
) |
cmake_minimum_required(VERSION 3.19) | |
project(piper LANGUAGES C) | |
enable_testing() | |
add_executable(piper main.c) | |
add_test(NAME piper COMMAND piper) |
import ephem | |
import datetime | |
Boston=ephem.Observer() | |
Boston.lat='42.3462' | |
Boston.lon='-71.0978' | |
Boston.date = datetime.datetime.now() | |
# %% these parameters are for super-precise estimates, not necessary. | |
Boston.elevation = 3 # meters | |
Boston.pressure = 1010 # millibar |
# force use of presets via sentinel environment variable set in presets only | |
cmake_minimum_required(VERSION 3.21) | |
project(envpre LANGUAGES C) | |
message(STATUS "sentinel: $ENV{sentinel}") | |
include(CheckSentinel.cmake) | |
add_executable(main main.c) |
cmake_minimum_required(VERSION 3.14) | |
project(demo Fortran) | |
# --- static flags avoid users needing libgfortran etc. on their Windows system | |
# MacOS and Linux needs more caution as true static linking is an advanced topic. | |
# this does not guarantee a portable executable, careful testing is needed and possibly further options | |
set(static_link_flags) | |
if(MINGW AND CMAKE_Fortran_COMPILER_ID STREQUAL "GNU") | |
set(static_link_flags -static -static-libgfortran) | |
# MinGW / MSYS2 special considerations: https://www.msys2.org/news/#2021-01-31-aslr-enabled-by-default |
function(dll_test_path libs test_names) | |
# if shared lib on Windows, need DLL on PATH | |
if(NOT WIN32) | |
return() | |
endif() | |
if(CMAKE_VERSION VERSION_LESS 3.22) | |
message(VERBOSE " CMake ${CMAKE_VERSION} < 3.22: cannot apply ENVIRONMENT_MODIFICATION to ${test_names}") | |
return() |
cmake_minimum_required(VERSION 3.12...3.29) | |
project(mods LANGUAGES Fortran) | |
if(CMAKE_GENERATOR MATCHES "Ninja") | |
execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} --version | |
OUTPUT_VARIABLE ninja_version OUTPUT_STRIP_TRAILING_WHITESPACE) | |
endif() | |
message(STATUS "CMake ${CMAKE_VERSION} CMAKE_GENERATOR ${CMAKE_GENERATOR} ${ninja_version}") |
cmake_minimum_required(VERSION 3.19) | |
project(Connect LANGUAGES NONE) | |
enable_testing() | |
add_test(NAME InternetConnection COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_LIST_DIR}/connection.cmake) | |
set_property(TEST InternetConnection PROPERTY FIXTURES_SETUP InternetOK) | |
add_test(NAME NeedsInternet COMMAND ...) |
Unlike cached approach, this is simpler but takes much longer to setup on each run.