Moved: https://github.com/scivision/detect-windows-subsystem-for-linux
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
# NOTE: Safari doesn't work from the command line, so Safari is omitted from the search. | |
find_program(browser | |
NAMES | |
"Microsoft Edge" msedge | |
"Google Chrome" google-chrome chrome | |
Chromimum chromium-browser chromium | |
Firefox firefox firefox-bin | |
PATHS | |
"$ENV{PROGRAMFILES\(x86\)}/Microsoft/Edge/Application" | |
"$ENV{PROGRAMFILES}/Google/Chrome/Application" |
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
cmake_minimum_required(VERSION 3.6) | |
set(url https://hsts.badssl.com/hsts-test/status.svg) | |
set(file ${CMAKE_CURRENT_BINARY_DIR}/status.svg) | |
file(DOWNLOAD ${url} ${file} LOG log STATUS status TLS_VERIFY true) | |
message(VERBOSE "log: ${log}") | |
message(STATUS "status: ${status}") |
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
#!/usr/bin/env python3 | |
""" | |
Collect all images (.png) into a single HTML document | |
Create a PDF from your web browser as usual. | |
Example: | |
python images2pdf.py ~/my_plot_folder |
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
cmake_minimum_required(VERSION 3.10) | |
project(LotOfModules LANGUAGES Fortran) | |
message(STATUS "CMake ${CMAKE_VERSION}") | |
add_library(m1 OBJECT m1.f90) | |
add_library(m2 OBJECT m2.f90) | |
target_link_libraries(m2 PRIVATE m1) |
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
cmake_minimum_required(VERSION 3.14...3.27) | |
if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) | |
message(FATAL_ERROR "please use out-of-source build | |
cmake -Bbuild") | |
endif() | |
project(otherSource LANGUAGES C) | |
set(NRF_SDK_NAME nRF5_SDK_17.1.0_ddde560) |
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
cmake_minimum_required(VERSION 3.19) | |
project(OpenMPdemo LANGUAGES C) | |
find_package(OpenMP COMPONENTS C REQUIRED) | |
add_executable(hello hello_openmp.c) | |
target_link_libraries(hello PRIVATE OpenMP::OpenMP_C) |
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
cmake_minimum_required(VERSION 3.20.2...3.27) | |
project(LapackMKL LANGUAGES Fortran) | |
message(STATUS "ENV{MKLROOT}: $ENV{MKLROOT}") | |
# this find_package() isn't required, but we do it here | |
# to discover if MKL is missing | |
find_package(MKL CONFIG REQUIRED) |
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
cmake_minimum_required(VERSION 3.20.2...3.27) | |
project(ScalapackMKL LANGUAGES Fortran) | |
message(STATUS "ENV{MKLROOT}: $ENV{MKLROOT}") | |
# this find_package() isn't required, but we do it here | |
# to discover if Scalapack is missing | |
set(ENABLE_BLACS true) | |
set(ENABLE_SCALAPACK true) |