Skip to content

Commit

Permalink
cmake: remove unused cmake options
Browse files Browse the repository at this point in the history
Remove unused cmake options such as REMOTEPROC_MASTER
as the library allows user to use different libraries sperately.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
  • Loading branch information
wjliang committed Jun 20, 2018
1 parent cdd6ca2 commit 22898d6
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 53 deletions.
2 changes: 0 additions & 2 deletions apps/examples/CMakeLists.txt
Expand Up @@ -7,7 +7,5 @@ if (WITH_LOAD_FW)
add_subdirectory (load_fw)
endif (WITH_LOAD_FW)
if (WITH_PROXY_APPS)
if (NOT WITH_REMOTEPROC_MASTER)
add_subdirectory (rpc_demo)
endif (NOT WITH_REMOTEPROC_MASTER)
endif (WITH_PROXY_APPS)
8 changes: 2 additions & 6 deletions apps/machine/zynq7/CMakeLists.txt
@@ -1,9 +1,5 @@
collect (APP_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")

if (WITH_REMOTEPROC_MASTER)
collect (APP_COMMON_SOURCES platform_info_remoteproc_master.c)
else (WITH_REMOTEPROC_MASTER)
collect (APP_COMMON_SOURCES platform_info.c)
collect (APP_COMMON_SOURCES rsc_table.c)
endif (WITH_REMOTEPROC_MASTER)
collect (APP_COMMON_SOURCES platform_info.c)
collect (APP_COMMON_SOURCES rsc_table.c)

6 changes: 1 addition & 5 deletions apps/system/generic/machine/zynq7/CMakeLists.txt
@@ -1,10 +1,6 @@
collect (APP_COMMON_SOURCES helper.c)

if (WITH_REMOTEPROC_MASTER)
set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_master.ld")
else (WITH_REMOTEPROC_MASTER)
set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_remote.ld")
endif (WITH_REMOTEPROC_MASTER)
set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_remote.ld")

set_property (GLOBAL PROPERTY APP_LINKER_OPT "-Wl,-build-id=none -specs=${CMAKE_CURRENT_SOURCE_DIR}/Xilinx.spec -T\"${_linker_script}\"")

Expand Down
6 changes: 1 addition & 5 deletions apps/system/generic/machine/zynqmp_r5/CMakeLists.txt
@@ -1,10 +1,6 @@
collect (APP_COMMON_SOURCES helper.c)

if (WITH_REMOTEPROC_MASTER)
message(FATAL_ERROR "Remoteproc master is not currently supported on ${MACHINE}/${SYSTEM}.")
else (WITH_REMOTEPROC_MASTER)
set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_remote.ld")
endif (WITH_REMOTEPROC_MASTER)
set (_linker_script "${CMAKE_CURRENT_SOURCE_DIR}/linker_remote.ld")

set_property (GLOBAL PROPERTY APP_LINKER_OPT "-T\"${_linker_script}\"")

Expand Down
4 changes: 0 additions & 4 deletions apps/system/linux/machine/generic/CMakeLists.txt
Expand Up @@ -4,7 +4,3 @@ collect (APP_COMMON_SOURCES platform_info.c)

collect (APP_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}")

if (WITH_REMOTEPROC_MASTER)
message(FATAL_ERROR "Remoteproc master is not currently supported on ${MACHINE}/${SYSTEM}.")
endif (WITH_REMOTEPROC_MASTER)

4 changes: 0 additions & 4 deletions apps/system/linux/machine/zynqmp/CMakeLists.txt
@@ -1,6 +1,2 @@
collect (APP_COMMON_SOURCES helper.c)

if (WITH_REMOTEPROC_MASTER)
message(FATAL_ERROR "Remoteproc master is not currently supported on ${MACHINE}/${SYSTEM}.")
endif (WITH_REMOTEPROC_MASTER)

11 changes: 0 additions & 11 deletions apps/tests/rpmsg-apis/CMakeLists.txt
Expand Up @@ -23,18 +23,7 @@ get_property (_deps GLOBAL PROPERTY APP_LIB_DEPS)
set (_deps "${_deps} ${PLATFORM_LIB_DEPS}")
string (STRIP "${_deps}" _deps)

if (WITH_REMOTEPROC_MASTER)
target_link_libraries(${_app}.out -Wl,-Map=${_app}.map -Wl,--gc-sections ${_linker_opt} -Wl,--start-group ${_fw_dir}/firmware1.o ${_fw_dir}/firmware2.o ${_deps} -Wl,--end-group)
add_custom_target (${_app}.bin ALL
${CROSS_PREFIX}objcopy -O binary ${_app}.out ${_app}.bin
DEPENDS ${_app}.out)

add_dependencies (${_app}.out ${_fw_dir}/firmware1.o ${_fw_dir}/firmware2.o)

install (FILES "${CMAKE_CURRENT_BINARY_DIR}/${_app}.bin" DESTINATION ${CMAKE_INSTALL_BINDIR})
else (WITH_REMOTEPROC_MASTER)
target_link_libraries(${_app}.out -Wl,-Map=${_app}.map -Wl,--gc-sections ${_linker_opt} -Wl,--start-group ${_deps} -Wl,--end-group)

install (TARGETS ${_app}.out RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif (WITH_REMOTEPROC_MASTER)

16 changes: 0 additions & 16 deletions cmake/options.cmake
Expand Up @@ -33,12 +33,6 @@ string (TOUPPER ${CMAKE_SYSTEM_PROCESSOR} PROJECT_PROCESSOR_UPPER)
string (TOLOWER ${MACHINE} PROJECT_MACHINE)
string (TOUPPER ${MACHINE} PROJECT_MACHINE_UPPER)

# Select to build Remote proc master
option (WITH_REMOTEPROC_MASTER "Build as remoteproc master" OFF)
if (WITH_REMOTEPROC_MASTER)
option (WITH_LINUXREMOTE "The remote is Linux" ON)
endif (WITH_REMOTEPROC_MASTER)

# Select which components are in the openamp lib
option (WITH_PROXY "Build with proxy(access device controlled by other processor)" ON)
option (WITH_APPS "Build with sample applicaitons" OFF)
Expand All @@ -47,21 +41,11 @@ if (WITH_APPS)
if (WITH_PROXY)
set (WITH_PROXY_APPS ON)
endif (WITH_PROXY)
option (WITH_BENCHMARK "Build benchmark app" OFF)
endif (WITH_APPS)
option (WITH_OBSOLETE "Build obsolete system libs" OFF)

# Set the complication flags
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")

if (WITH_LINUXREMOTE)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENAMP_REMOTE_LINUX_ENABLE")
endif (WITH_LINUXREMOTE)

if (WITH_BENCHMARK)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DOPENAMP_BENCHMARK_ENABLE")
endif (WITH_BENCHMARK)

option (WITH_STATIC_LIB "Build with a static library" ON)

if ("${PROJECT_SYSTEM}" STREQUAL "linux")
Expand Down

0 comments on commit 22898d6

Please sign in to comment.