Just a simple tar.gz with a text file for testing
This file contains hidden or 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...4.2) | |
| project(InstructionSet LANGUAGES CXX) | |
| set(CMAKE_CXX_SCAN_FOR_MODULES OFF) | |
| enable_testing() | |
| include(CheckIncludeFileCXX) |
This file contains hidden or 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.15) | |
| project(opt LANGUAGES Fortran) | |
| set(CMAKE_EXPORT_COMPILE_COMMANDS ON) | |
| # https://www.intel.com/content/www/us/en/docs/fortran-compiler/developer-guide-reference/2024-2/warn.html | |
| # SHELL: allows using | |
| # * spaces in compiler options (especially important for Intel oneAPI | |
| # * repeated option prefix, that might otherwise get deduplicated incorrectly |
This file contains hidden or 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) | |
| project(min LANGUAGES CXX Fortran) | |
| set(CMAKE_CXX_SCAN_FOR_MODULES OFF) | |
| # set OFF if not using C++ modules, or it can trip similar compiler errors due to "-fmodules-ts" flags auto-added when ON. | |
| message(STATUS "CMAKE_OSX_SYSROOT ${CMAKE_OSX_SYSROOT}") | |
| foreach(i IN ITEMS OS_NAME OS_VERSION OS_RELEASE OS_PLATFORM) |
This file contains hidden or 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) | |
| project(detectChange LANGUAGES Fortran) | |
| add_executable(main.x main.f90 moda.f90 modb.f90) |
This file contains hidden or 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.23...4.2) | |
| # 3.23 for string(TIMESTAMP ... "%f") | |
| if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/CMakeCache.txt) | |
| message(FATAL_ERROR "CMakeCache.txt already exists. Please use --fresh to regenerate the cache.") | |
| endif() | |
| project(BenchmarkCheck LANGUAGES C) | |
| include(CheckIncludeFile) |
This file contains hidden or 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
| .DUMMY | |
| .dummy |
This is a Bash script (macOS, Linux, ...) for building Flang-f18 and LLVM from source. It is adapted from Jeff Hammond
Ninja: recommended for best build efficiency and speed.
In general, a recent GCC would work. On macOS, system AppleClang compiler can be used as well.
This file contains hidden or 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.15) | |
| project(mpitest LANGUAGES Fortran) | |
| enable_testing() | |
| find_package(MPI COMPONENTS Fortran REQUIRED) | |
| include(TestMPILauncher.cmake) |
This file contains hidden or 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
| # 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: |