Skip to content

Commit

Permalink
Merge pull request #19 from ut-issl/feature/fix-ci
Browse files Browse the repository at this point in the history
Fix CI
  • Loading branch information
200km authored Jul 25, 2022
2 parents 3133c86 + b9b2ca7 commit 97a6e57
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: cache-extlib
uses: actions/cache@v3
with:
key: extlib-${{ runner.os }}-${{ hashFiles('./ExtLibraries/**') }}
key: extlib-${{ runner.os }}-${{ hashFiles('./s2e-core/ExtLibraries/**') }}
path: ExtLibraries

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

- name: build extlib
Expand Down
35 changes: 25 additions & 10 deletions s2e-ff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ project(S2E_FF

cmake_minimum_required(VERSION 3.13)

# build config
option(BUILD_64BIT "Build 64bit" OFF)

# preprocessor
if(WIN32)
add_definitions(-DWIN32)
Expand Down Expand Up @@ -89,18 +92,24 @@ add_executable(${PROJECT_NAME} ${SOURCE_FILES})
## cspice library
if(CYGWIN)
SET (CMAKE_FIND_LIBRARY_SUFFIXES ".so" ".a")
find_library(CSPICE_LIB
NAMES cspice.a csupport.a
PATHS ${CSPICE_DIR}/cspice_cygwin/lib)
set(CSPICE_LIB_DIR ${CSPICE_DIR}/cspice_cygwin/lib)
elseif(UNIX)
find_library(CSPICE_LIB
NAMES cspice.a csupport.a
PATHS ${CSPICE_DIR}/cspice_unix/lib)
elseif(WIN32)
if(BUILD_64BIT)
set(CSPICE_LIB_DIR ${CSPICE_DIR}/cspice_unix64/lib)
else()
set(CSPICE_LIB_DIR ${CSPICE_DIR}/cspice_unix/lib)
endif()
endif()

if(WIN32)
SET (CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
find_library(CSPICE_LIB
NAMES cspice.lib csupport.lib
PATHS ${CSPICE_DIR}/cspice_msvs/lib)
else()
find_library(CSPICE_LIB
NAMES cspice.a csupport.a
PATHS ${CSPICE_LIB_DIR})
endif()
if(NOT CSPICE_LIB)
message(FATAL_ERROR "cspice not found in ${EXT_LIB_DIR}")
Expand All @@ -113,9 +122,15 @@ if(CYGWIN)
NAMES libnrlmsise00.a
PATHS ${NRLMSISE00_DIR}/lib)
elseif(UNIX)
find_library(NRLMSISE00_LIB
NAMES libnrlmsise00.a
PATHS ${NRLMSISE00_DIR}/lib)
if(BUILD_64BIT)
find_library(NRLMSISE00_LIB
NAMES libnrlmsise00.a
PATHS ${NRLMSISE00_DIR}/lib64)
else()
find_library(NRLMSISE00_LIB
NAMES libnrlmsise00.a
PATHS ${NRLMSISE00_DIR}/lib)
endif()
elseif(WIN32)
SET (CMAKE_FIND_LIBRARY_SUFFIXES ".lib")
find_library(NRLMSISE00_LIB
Expand Down

0 comments on commit 97a6e57

Please sign in to comment.