Skip to content
Snippets Groups Projects
Commit 54f8fcc4 authored by athatheo's avatar athatheo
Browse files

Merge branch 'ecss-configuration-platform-specific' into 'master'

Ecss configuration platform specific

Closes #209

See merge request acubesat/obc/ecss-services!162
parents 67862e4e bce09118
No related branches found
No related tags found
No related merge requests found
...@@ -11,10 +11,6 @@ add_custom_target(check ...@@ -11,10 +11,6 @@ add_custom_target(check
COMMAND ./cppcheck-misra.sh COMMAND ./cppcheck-misra.sh
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci") WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}/ci")
# Allow the user to set the ECSS Configuration directory using the -DECSS_CONFIGURATION=... command line argument
set(ECSS_CONFIGURATION "${PROJECT_SOURCE_DIR}/inc/Platform/x86" CACHE PATH
"The include directory for the platform-specific ECSS configuration headers"
)
add_compile_options(-Wvla) add_compile_options(-Wvla)
include_directories(${ECSS_CONFIGURATION}) include_directories(${ECSS_CONFIGURATION})
add_library(common STATIC) add_library(common STATIC)
...@@ -48,6 +44,7 @@ target_sources(common PRIVATE ...@@ -48,6 +44,7 @@ target_sources(common PRIVATE
) )
target_link_libraries(common PRIVATE etl log_common log_x86) target_link_libraries(common PRIVATE etl log_common log_x86)
# Specify the .cpp files for the executables # Specify the .cpp files for the executables
IF (X86_BUILD) IF (X86_BUILD)
file(GLOB_RECURSE x86_main_SRC "src/Platform/x86/*.cpp") file(GLOB_RECURSE x86_main_SRC "src/Platform/x86/*.cpp")
......
...@@ -18,8 +18,8 @@ class ECSSServicesRecipe(ConanFile): ...@@ -18,8 +18,8 @@ class ECSSServicesRecipe(ConanFile):
# Binary configuration # Binary configuration
settings = "os", "compiler", "build_type", "arch" settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]} options = {"shared": [True, False], "fPIC": [True, False], "ecss_config_file_path": ["ANY"]}
default_options = {"shared": False, "fPIC": True} default_options = {"shared": False, "fPIC": True, "ecss_config_file_path":"inc/Platform/x86/"}
# Sources are located in the same place as this recipe, copy them to the recipe # Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "CMakeLists.txt", "src/*", "inc/*" exports_sources = "CMakeLists.txt", "src/*", "inc/*"
...@@ -36,6 +36,9 @@ class ECSSServicesRecipe(ConanFile): ...@@ -36,6 +36,9 @@ class ECSSServicesRecipe(ConanFile):
tc = CMakeToolchain(self) tc = CMakeToolchain(self)
if self.settings.arch != 'armv7': if self.settings.arch != 'armv7':
tc.variables["X86_BUILD"] = True tc.variables["X86_BUILD"] = True
tc.variables["ECSS_CONFIGURATION"]="inc/Platform/x86/"
else:
tc.variables["ECSS_CONFIGURATION"]=self.options.ecss_config_file_path
tc.generate() tc.generate()
def build(self): def build(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment