Simple check that a system can allocate a large numpy array.
python array_allocate.py
# benchmark download of URL vs. Git | |
# benchmark with CMake 3.28.2 on Windows with gigabit internet connection. | |
# | |
# Python 3.12.2 source | |
# 7 seconds: URL archive 27583112 bytes | |
# 84 seconds GIT_SHALLOW=true | |
# 132 seconds GIT_SHALLOW=false | |
# | |
# CMake 3.28.3 source: |
# copied from https://superuser.com/a/1808022 | |
$procs = Get-Process | |
$ports = netstat -ano | |
$ports[4..$ports.length] | | |
# First column comes back empty, so we set to "ProcessName" as a placeholder for later | |
ConvertFrom-String -PropertyNames ProcessName,Proto,Local,Remote,State,PID | | |
where State -eq 'LISTENING' | | |
foreach { | |
$_.ProcessName = ($procs | where ID -eq $_.PID).ProcessName |
cmake_minimum_required(VERSION 3.19) | |
project(piper LANGUAGES C) | |
enable_testing() | |
add_executable(piper main.c) | |
add_test(NAME piper COMMAND piper) |
# 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) |
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.5) | |
project(demoTgtProps LANGUAGES C) | |
find_package(ZLIB REQUIRED) | |
include(print_target_props.cmake) | |
print_target_props(ZLIB::ZLIB) |
cmake_minimum_required(VERSION 3.19) | |
project(link LANGUAGES CXX Fortran) | |
file(GENERATE OUTPUT lib.cpp CONTENT "extern \"C\" int addtwo(int N){ return N + 2; }") | |
file(GENERATE OUTPUT main.f90 CONTENT "program adder | |
use, intrinsic :: iso_c_binding, only : C_INT |
cmake_minimum_required(VERSION 3.10...3.28) | |
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) | |
message(FATAL_ERROR "In-source builds are not allowed. | |
cmake -Bbuild") | |
endif() | |
project(fs_unc LANGUAGES CXX) | |
enable_testing() |