-
Notifications
You must be signed in to change notification settings - Fork 6
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 #6 from vbertone/IntrinsicHeavyFlavours
Intrinsic heavy flavours
- Loading branch information
Showing
159 changed files
with
6,756 additions
and
4,428 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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
machine: true | ||
machine: | ||
image: ubuntu-1604:202004-01 | ||
steps: | ||
- checkout | ||
- run: sudo apt-get update | ||
- run: sudo apt-get install g++ cmake valgrind | ||
- run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -fsanitize=address -std=c++11" . && make | ||
- run: cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_FLAGS_DEBUG="-g -fsanitize=address -std=c++11" . && make -j8 | ||
- run: ctest -V |
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 |
---|---|---|
@@ -1,57 +1,66 @@ | ||
cmake_minimum_required (VERSION 2.6) | ||
# Set a default build type if none was specified | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to 'Release' as none was specified.") | ||
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) | ||
# Set the possible values of build type for cmake-gui | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" | ||
"MinSizeRel" "RelWithDebInfo") | ||
endif() | ||
# BASIC DEFINITIONS ======================================================================== | ||
|
||
if (NOT DEFINED CMAKE_MACOSX_RPATH) | ||
set(CMAKE_MACOSX_RPATH 0) | ||
endif() | ||
# define minimum version of cmake | ||
cmake_minimum_required (VERSION 3.5) | ||
|
||
# the project name | ||
# define project name and its language | ||
project(apfel CXX Fortran) | ||
|
||
# activating some global properties for the project | ||
set(apfel_VERSION 4.3.0) | ||
# define c++ standard and issue all the warning demanded by this standard | ||
set(CMAKE_BUILD_TYPE Release) | ||
set(CMAKE_CXX_STANDARD 11) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC") | ||
#set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -Wall -Wextra -fPIC") | ||
set(CMAKE_Fortran_FLAGS "${CMAKE_Fortran_FLAGS} -fPIC") | ||
set(CMAKE_SHARED_LINKER_FLAGS -w) | ||
|
||
if (NOT DEFINED CMAKE_MACOSX_RPATH) | ||
set(CMAKE_MACOSX_RPATH 0) | ||
endif() | ||
|
||
# VERSION ============================================================================== | ||
|
||
set(apfel_VERSION 4.4.0) | ||
|
||
# export version to file | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/inc/apfel/version.h.in" | ||
"${PROJECT_BINARY_DIR}/inc/apfel/version.h" | ||
"${PROJECT_SOURCE_DIR}/inc/apfel/version.h" | ||
) | ||
|
||
# CONFIG SCRIPT ========================================================================= | ||
|
||
# Configuration script | ||
set(prefix ${CMAKE_INSTALL_PREFIX}) | ||
set(exec_prefix "${prefix}") | ||
set(includedir "${prefix}/include") | ||
set(libdir "${prefix}/lib") | ||
configure_file( | ||
"${PROJECT_SOURCE_DIR}/bin/apfelxx-config.in" | ||
"${PROJECT_SOURCE_DIR}/bin/apfelxx-config" | ||
) | ||
configure_file("${PROJECT_SOURCE_DIR}/bin/apfelxx-config.in" "${PROJECT_SOURCE_DIR}/bin/apfelxx-config") | ||
|
||
# FINALIZE ================================================================================== | ||
|
||
# include directory | ||
include_directories(${PROJECT_SOURCE_DIR}/inc) | ||
|
||
# build target library | ||
add_subdirectory(src) | ||
# generate list of source files | ||
file(GLOB_RECURSE source_files src/*) | ||
|
||
# build test codes | ||
enable_testing() | ||
add_subdirectory(tests) | ||
|
||
# define target library | ||
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/lib) | ||
|
||
add_library(apfelxx SHARED ${source_files}) | ||
|
||
option(BUILD_TESTS "Build tests code" ON) | ||
if(BUILD_TESTS) | ||
enable_testing() | ||
add_subdirectory(tests) | ||
endif(BUILD_TESTS) | ||
# define libraries to be linked | ||
target_link_libraries(apfelxx) | ||
|
||
install(FILES ${PROJECT_SOURCE_DIR}/bin/apfelxx-config | ||
DESTINATION bin | ||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) | ||
# install | ||
install(TARGETS apfelxx | ||
RUNTIME DESTINATION bin | ||
LIBRARY DESTINATION lib) | ||
install(DIRECTORY inc/apfel DESTINATION include) | ||
install(FILES ${PROJECT_SOURCE_DIR}/bin/apfelxx-config DESTINATION bin | ||
PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) |
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
Oops, something went wrong.