forked from evaleev/libint
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request evaleev#299 from loriab/extras
full cmake 1/N: git and ref in configuration.cc
- Loading branch information
Showing
8 changed files
with
670 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
cmake_minimum_required(VERSION 3.19) # string(json | ||
cmake_policy(SET CMP0074 NEW) | ||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") | ||
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: | ||
cmake_policy(SET CMP0135 NEW) | ||
endif() | ||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.25.0") | ||
# needed by DynamicVersion | ||
cmake_policy(SET CMP0140 NEW) | ||
endif() | ||
|
||
############################# Version and Metadata ############################# | ||
|
||
# can't use PROJECT_SOURCE_DIR etc. before project() call | ||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules) | ||
include(DynamicVersion) | ||
dynamic_version( | ||
PROJECT_PREFIX Libint2Compiler_ | ||
GIT_ARCHIVAL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/.git_archival.txt | ||
OUTPUT_COMMIT LibintRepository_COMMIT | ||
OUTPUT_VERSION LibintRepository_VERSION | ||
OUTPUT_DESCRIBE LibintRepository_DESCRIBE | ||
OUTPUT_DISTANCE LibintRepository_DISTANCE | ||
) | ||
|
||
project( | ||
Libint2Compiler | ||
VERSION ${LibintRepository_VERSION} | ||
DESCRIPTION | ||
"A library for the evaluation of molecular integrals of many-body operators over Gaussian functions" | ||
HOMEPAGE_URL "http://libint.valeyev.net" | ||
LANGUAGES CXX | ||
) | ||
# * http://libint.valeyev.net/ redirects to https://github.com/evaleev/libint | ||
|
||
set(${PROJECT_NAME}_AUTHORS "Edward F. Valeev") | ||
set(${PROJECT_NAME}_LICENSE "GPL-3.0 for generator; LGPL-3.0 for generated") | ||
|
||
# along with project(... VERSION) above scanned by dynamic_version() from `git | ||
# describe`, these are the authoritative version source (formerly in configure.ac) | ||
set(LIBINT_BUILDID "post999") | ||
set(LIBINT_SOVERSION "2:3:0") | ||
set(LIBINT_DOI "10.5281/zenodo.10369117") # 2.8.0 | ||
|
||
include(int_versions) | ||
|
||
set(L2 Libint2) # Namespace | ||
set(pnv libint2) # projectnameversion | ||
|
||
################################### Overview ################################### | ||
|
||
# CMake build overview: | ||
# | ||
# >>> ls | ||
# cmake/ COPYING src/ tests/ ... | ||
# >>> cmake -S. -Bbuild -GNinja -DCMAKE_INSTALL_PREFIX=/path/to/install-libint ... | ||
# ... | ||
# -- Generating done | ||
# -- Build files have been written to: /current/dir/build | ||
# >>> cmake --build build --target install | ||
|
||
################################## Main Project ################################# | ||
|
||
# STRICTLY TEMPORARY FOR DEMONSTRATION PURPOSES | ||
configure_file(src/lib/libint/configuration.cc configuration.cc @ONLY) |
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,4 @@ | ||
node: $Format:%H$ | ||
node-date: $Format:%cI$ | ||
describe-name: $Format:%(describe:tags=true,match=?[0-9.]*)$ | ||
ref-names: $Format:%D$ |
Oops, something went wrong.