-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
77 additions
and
36 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 |
---|---|---|
|
@@ -6,3 +6,6 @@ doc/ | |
|
||
singularity.def | ||
Dockerfile | ||
|
||
# clang files. | ||
.cache |
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[submodule "deps/toml++"] | ||
path = src/deps/toml++ | ||
path = extern/toml++ | ||
url = https://github.com/marzer/tomlplusplus |
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,60 @@ | ||
cmake_minimum_required(VERSION 3.9..3.22) | ||
|
||
project(decx VERSION 0.21.0 LANGUAGES C CXX Fortran) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED TRUE) | ||
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE) | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) | ||
|
||
# Check C++/Fortran compatibility according to: | ||
# https://enccs.github.io/cmake-workshop/cxx-fortran/ | ||
include(FortranCInterface) | ||
fortrancinterface_verify(CXX) | ||
# Some warnings have turned into a hard error since gfortran > 10. | ||
# Ignore and compile anyway (https://forum.abinit.org/viewtopic.php?f=2&t=5205). | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fallow-argument-mismatch") | ||
|
||
# Dependencies. | ||
find_package(GSL REQUIRED) | ||
find_package(Boost 1.59.0 REQUIRED) | ||
find_package(BLAS REQUIRED) | ||
find_package(LAPACK REQUIRED) | ||
|
||
# Optimize release build. | ||
if(CMAKE_BUILD_TYPE STREQUAL "Release") | ||
|
||
# Inter-procedural optimization. | ||
include(CheckIPOSupported) | ||
check_ipo_supported(RESULT IPO_SUPPORTED OUTPUT IPO_ERROR) | ||
if(IPO_SUPPORTED) | ||
message(STATUS "IPO / LTO supported..") | ||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) | ||
message(STATUS "IPO / LTO enabled for all targets.") | ||
else() | ||
message(STATUS "IPO / LTO not supported: <${IPO_ERROR}>") | ||
endif() | ||
|
||
# Optimize for local architecture. | ||
set(flag "-march=native") | ||
foreach(LG IN ITEMS C CXX Fortran) | ||
string(TOLOWER ${LG} lg) | ||
include(Check${LG}CompilerFlag) | ||
cmake_language( | ||
CALL check_${lg}_compiler_flag | ||
${flag} ${LG}_MARCH_NATIVE_SUPPORTED | ||
) | ||
if(${LG}_MARCH_NATIVE_SUPPORTED) | ||
string(APPEND CMAKE_${LG}_FLAGS_RELEASE " ${flag}") | ||
message(STATUS "${LG}: ${flag} enabled for all targets.") | ||
endif() | ||
endforeach() | ||
|
||
# -O3 and -DNDebug are automatically passed in release mode. | ||
endif() | ||
|
||
# External source code dependencies. | ||
add_subdirectory(extern) | ||
|
||
# Main application. | ||
add_subdirectory(src) |
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,6 @@ | ||
# Third-party header library to parse TOML files. | ||
add_library(toml++ INTERFACE) | ||
target_include_directories( | ||
toml++ INTERFACE | ||
"${CMAKE_CURRENT_SOURCE_DIR}/toml++/include" | ||
) |
File renamed without changes.
Submodule toml++
updated
from 000000 to fe28ec
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
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