Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Update how to add components for v8 #8

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:

- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-${{ matrix.build_bit }}
path: ./s2e-core/ExtLibraries
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:

- name: cache extlib
id: cache-extlib
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}-${{ matrix.build_bit }}
path: ./s2e-core/ExtLibraries
Expand Down
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ CMakeBuilds/
.vscode/

# Log files
data/logs/
**/logs/

# ExtLibraries
ExtLibraries/
Expand All @@ -31,3 +31,9 @@ build/
# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Setting files
settings/environment/cspice
settings/environment/space_weather
settings/environment/gravity_field
settings/environment/star_catalogue
26 changes: 15 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ cmake_minimum_required(VERSION 3.13)
project(S2E_USER_EXAMPLE
LANGUAGES CXX
DESCRIPTION "s2e-user-example: An example of S2E user side repository"
VERSION 0.0.0
VERSION 1.0.0
)

# build config
option(USE_HILS "Use HILS" OFF)
option(USE_C2A "Use C2A" OFF)
option(BUILD_64BIT "Build 64bit" OFF)
option(GOOGLE_TEST "Execute GoogleTest" OFF)

# Mac user setting
option(APPLE_SILICON "Build with Apple Silicon" OFF)
Expand Down Expand Up @@ -44,7 +43,7 @@ endif()

## Directory path for ini files
if(NOT DEFINED INI_FILE_DIR_FROM_EXE)
set(INI_FILE_DIR_FROM_EXE ../../data/initialize_files)
set(SETTINGS_DIR_FROM_EXE ../../settings)
endif()

if(NOT DEFINED EXT_LIB_DIR_FROM_EXE)
Expand Down Expand Up @@ -90,8 +89,12 @@ add_subdirectory(${S2E_CORE_DIR}/src/disturbances s2e_core/disturbances)
add_subdirectory(${S2E_CORE_DIR}/src/dynamics s2e_core/dynamics)
add_subdirectory(${S2E_CORE_DIR}/src/environment/global s2e_core/environment/global)
add_subdirectory(${S2E_CORE_DIR}/src/environment/local s2e_core/environment/local)
add_subdirectory(${S2E_CORE_DIR}/src/library s2e_core/library)
add_subdirectory(${S2E_CORE_DIR}/src/logger s2e_core/logger)
add_subdirectory(${S2E_CORE_DIR}/src/math_physics s2e_core/math_physics)
add_subdirectory(${S2E_CORE_DIR}/src/setting_file_reader s2e_core/setting_file_reader)
add_subdirectory(${S2E_CORE_DIR}/src/simulation s2e_core/simulation)
add_subdirectory(${S2E_CORE_DIR}/src/utilities s2e_core/utilities)
add_subdirectory(${S2E_CORE_DIR}/ExtLibraries/inih)

# Add all cpp files as SOURCE_FILES
file(GLOB_RECURSE SOURCE_FILES ${CMAKE_CURRENT_LIST_DIR}/src/*.cpp)
Expand Down Expand Up @@ -178,13 +181,14 @@ set(S2E_LIBRARIES
IGRF WRAPPER_NRLMSISE00 INIH SGP4 UTIL OPTICS RELATIVE_ORBIT_MODELS ORBIT_MODELS GEODESY MATH
)
# Initialize link
target_link_libraries(COMPONENT DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT LIBRARY)
target_link_libraries(DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT SIMULATION LIBRARY)
target_link_libraries(DISTURBANCE DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT LIBRARY)
target_link_libraries(SIMULATION DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT DISTURBANCE LIBRARY)
target_link_libraries(GLOBAL_ENVIRONMENT ${CSPICE_LIB} LIBRARY)
target_link_libraries(LOCAL_ENVIRONMENT GLOBAL_ENVIRONMENT ${CSPICE_LIB} LIBRARY)
target_link_libraries(LIBRARY ${NRLMSISE00_LIB})
target_link_libraries(COMPONENT DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT MATH_PHYSICS SETTING_FILE_READER LOGGER UTILITIES)
target_link_libraries(DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT SIMULATION MATH_PHYSICS)
target_link_libraries(DISTURBANCE DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT MATH_PHYSICS)
target_link_libraries(SIMULATION DYNAMICS GLOBAL_ENVIRONMENT LOCAL_ENVIRONMENT DISTURBANCE MATH_PHYSICS)
target_link_libraries(GLOBAL_ENVIRONMENT ${CSPICE_LIB} MATH_PHYSICS)
target_link_libraries(LOCAL_ENVIRONMENT GLOBAL_ENVIRONMENT ${CSPICE_LIB} MATH_PHYSICS)
target_link_libraries(MATH_PHYSICS ${NRLMSISE00_LIB})
target_link_libraries(SETTING_FILE_READER INIH)

target_link_libraries(${PROJECT_NAME} DYNAMICS)
target_link_libraries(${PROJECT_NAME} DISTURBANCE)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ This repository provides the following samples.

## How to use this branch

- This branch is a sample code for [How To Make New Simulation Scenario](https://github.com/ut-issl/s2e-documents/blob/develop/Tutorials/HowToMakeNewSimulationScenario.md) in the `s2e-documents`.
- This branch is a sample code for [How To Add Components](https://github.com/ut-issl/s2e-documents/blob/develop/Tutorials/HowToAddComponents.md) in the `s2e-documents`.
- Please follow the tutorial to learn how to use the sample code.
File renamed without changes.
2 changes: 1 addition & 1 deletion s2e-core
Submodule s2e-core updated 454 files
Empty file.
Empty file.
Loading
Loading