-
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.
Merge branch 'main' into package-compiler-in-cmake
- Loading branch information
Showing
9 changed files
with
113 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 |
---|---|---|
|
@@ -10,4 +10,4 @@ jobs: | |
- name: Checkout Actions Repository | ||
uses: actions/checkout@v4 | ||
- name: Check spelling | ||
uses: crate-ci/[email protected].13 | ||
uses: crate-ci/[email protected].17 |
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,7 +1,7 @@ | ||
name = "LibTrixi" | ||
uuid = "7e097bd5-a775-4bc1-90b6-ad92bd7220c1" | ||
authors = ["Michael Schlottke-Lakemper <[email protected]>", "Benedict Geihe <[email protected]>"] | ||
version = "0.1.4-pre" | ||
version = "0.1.5-pre" | ||
|
||
[deps] | ||
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" | ||
|
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,28 @@ | ||
# | ||
# Stop if already found | ||
# | ||
if ( LIBTRIXI_FOUND ) | ||
return() | ||
endif() | ||
|
||
# | ||
# Look for include, libs, version file | ||
# | ||
find_path ( LIBTRIXI_INCLUDE_DIR trixi.h PATHS ${LIBTRIXI_PREFIX}/include ) | ||
find_library ( LIBTRIXI_LIBRARY trixi PATHS ${LIBTRIXI_PREFIX}/lib ) | ||
find_file ( LIBTRIXI_VERSION_FILE LIBTRIXI_VERSION PATHS ${LIBTRIXI_PREFIX}/share/julia ) | ||
|
||
# | ||
# Extract version | ||
# | ||
file ( STRINGS ${LIBTRIXI_VERSION_FILE} LIBTRIXI_VERSION_STRING ) | ||
|
||
# | ||
# Finalize | ||
# | ||
include ( FindPackageHandleStandardArgs ) | ||
find_package_handle_standard_args( | ||
LibTrixi | ||
REQUIRED_VARS LIBTRIXI_LIBRARY LIBTRIXI_INCLUDE_DIR | ||
VERSION_VAR LIBTRIXI_VERSION_STRING | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Specify the minimum version | ||
cmake_minimum_required ( VERSION 3.9 ) | ||
|
||
# Specify a project name | ||
project(ExternalLibTrixi) | ||
|
||
# Additional cmake modules (should contain FindLibTrixi.cmake) | ||
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/../../cmake" ) | ||
|
||
# Find MPI | ||
find_package( MPI REQUIRED ) | ||
|
||
# Find LibTrixi | ||
find_package( LibTrixi REQUIRED ) | ||
|
||
# Set sources | ||
set ( TARGET_NAME simple_trixi_controller_c ) | ||
add_executable ( ${TARGET_NAME} ${CMAKE_SOURCE_DIR}/../simple_trixi_controller.c ) | ||
|
||
# Set libraries to link | ||
target_link_libraries( | ||
${TARGET_NAME} | ||
PRIVATE MPI::MPI_C ${LIBTRIXI_LIBRARY} | ||
) | ||
|
||
# Set include directories | ||
target_include_directories( | ||
${TARGET_NAME} | ||
PRIVATE ${LIBTRIXI_INCLUDE_DIR} | ||
) | ||
|
||
# Set compiler flag for position independent code | ||
target_compile_options( ${TARGET_NAME} PRIVATE "-fPIC" ) |
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 @@ | ||
#!/bin/bash | ||
|
||
mkdir build | ||
cd build | ||
cmake -DLIBTRIXI_PREFIX=$PWD/../../../install .. | ||
make |