mirror of
https://github.com/nasa/fprime.git
synced 2025-12-10 00:44:37 -06:00
mstarch: remove superfulous BUILD_SUFFIX
This commit is contained in:
parent
12411b003e
commit
0f3256de2d
@ -2,10 +2,10 @@
|
||||
|
||||
# Port subdirectories
|
||||
add_library(
|
||||
"STest${BUILD_SUFFIX}"
|
||||
"STest"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/STest/Random/bsd_random.c"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/STest/Random/Random.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/STest/Pick/Pick_default.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/STest/Pick/Pick.cpp"
|
||||
)
|
||||
target_include_directories(STest${BUILD_SUFFIX} PUBLIC "${CMAKE_CURRENT_LIST_DIR}")
|
||||
target_include_directories(STest PUBLIC "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
@ -394,11 +394,7 @@ function(register_fprime_ut)
|
||||
message(FATAL_ERROR "'UT_SOURCE_FILES' not defined in '${CMAKE_CURRENT_LIST_FILE}'.")
|
||||
endif()
|
||||
# MOD_DEPS is supplied as an optional second positional -OR- or as the list 'MOD_DEPS'
|
||||
if (NOT BUILD_SUFFIX STREQUAL "")
|
||||
string(REGEX REPLACE "${BUILD_SUFFIX}" "" MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
else()
|
||||
set(MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
endif()
|
||||
set(MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
if (${ARGC} GREATER 2)
|
||||
set(MD_IFS "${ARGV2}")
|
||||
elseif(DEFINED UT_MOD_DEPS)
|
||||
|
||||
@ -8,8 +8,11 @@
|
||||
# @author mstarch
|
||||
####
|
||||
# Libraries that make-up F prime. Hurray!
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/gtest/" "${CMAKE_BINARY_DIR}/F-Prime/gtest")
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/STest/" "${CMAKE_BINARY_DIR}/F-Prime/STest")
|
||||
# Ignore GTest for non-test builds
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "TESTING")
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/gtest/" "${CMAKE_BINARY_DIR}/F-Prime/gtest")
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/STest/" "${CMAKE_BINARY_DIR}/F-Prime/STest")
|
||||
endif()
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/Autocoders/" "${CMAKE_BINARY_DIR}/F-Prime/Autocoders")
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/Fw/" "${CMAKE_BINARY_DIR}/F-Prime/Fw")
|
||||
add_subdirectory("${FPRIME_CORE_DIR}/Svc/" "${CMAKE_BINARY_DIR}/F-Prime/Svc")
|
||||
|
||||
@ -87,4 +87,7 @@ register_fprime_target("${CMAKE_CURRENT_LIST_DIR}/target/coverage.cmake")
|
||||
# Must always include the F prime core directory, as its headers are relative to
|
||||
# that directory.
|
||||
include_directories(SYSTEM "${FPRIME_CORE_DIR}")
|
||||
include_directories(SYSTEM "${FPRIME_CORE_DIR}/gtest/include")
|
||||
# Ignore GTest for non-test builds
|
||||
if (${CMAKE_BUILD_TYPE} STREQUAL "TESTING")
|
||||
include_directories(SYSTEM "${FPRIME_CORE_DIR}/gtest/include")
|
||||
endif()
|
||||
|
||||
@ -128,7 +128,6 @@ MARK_AS_ADVANCED(
|
||||
CMAKE_SHARED_LINKER_FLAGS_TESTING )
|
||||
# Testing setup for UT and coverage builds
|
||||
if (CMAKE_BUILD_TYPE STREQUAL "TESTING" )
|
||||
set(BUILD_SUFFIX "_ut")
|
||||
# These two lines allow for F prime style coverage. They are "unsupported" CMake features, so beware....
|
||||
set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1)
|
||||
set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
|
||||
|
||||
@ -32,9 +32,6 @@ function(get_module_name DIRECTORY_PATH)
|
||||
endif()
|
||||
# Replace slash with underscore to have valid name
|
||||
string(REPLACE "/" "_" TEMP_MODULE_NAME ${TEMP_MODULE_NAME})
|
||||
if (DEFINED BUILD_SUFFIX)
|
||||
set(TEMP_MODULE_NAME "${TEMP_MODULE_NAME}${BUILD_SUFFIX}")
|
||||
endif()
|
||||
set(MODULE_NAME ${TEMP_MODULE_NAME} PARENT_SCOPE)
|
||||
endfunction(get_module_name)
|
||||
|
||||
@ -78,11 +75,7 @@ endfunction(add_generated_sources)
|
||||
# - **PARSER_TYPE:** type of parser to use. Must be one of the prefixes *_xml in cmake/parser/
|
||||
####
|
||||
function(fprime_dependencies XML_PATH MODULE_NAME PARSER_TYPE)
|
||||
if (NOT ${BUILD_SUFFIX} STREQUAL "")
|
||||
string(REGEX REPLACE "${BUILD_SUFFIX}" "" MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
else()
|
||||
set(MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
endif()
|
||||
set(MODULE_NAME_NO_SUFFIX "${MODULE_NAME}")
|
||||
execute_process(
|
||||
COMMAND "${FPRIME_CORE_DIR}/cmake/support/parser/ai_parser.py" "${XML_PATH}" "${MODULE_NAME_NO_SUFFIX}" "${FPRIME_CURRENT_BUILD_ROOT}"
|
||||
RESULT_VARIABLE ERR_RETURN
|
||||
@ -96,8 +89,8 @@ function(fprime_dependencies XML_PATH MODULE_NAME PARSER_TYPE)
|
||||
# Also set the link dependencies on this module. CMake rolls-up link dependencies, and thus
|
||||
# this prevents the need for manually specifying link orders.
|
||||
foreach(TARGET ${TARGETS})
|
||||
add_dependencies(${MODULE_NAME} "${TARGET}${BUILD_SUFFIX}")
|
||||
target_link_libraries(${MODULE_NAME} "${TARGET}${BUILD_SUFFIX}")
|
||||
add_dependencies(${MODULE_NAME} "${TARGET}")
|
||||
target_link_libraries(${MODULE_NAME} "${TARGET}")
|
||||
endforeach()
|
||||
endfunction(fprime_dependencies)
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
|
||||
# set gtest target name
|
||||
set(GTEST_TARGET "gtest${BUILD_SUFFIX}" CACHE INTERNAL "Target for gtest infrastructure")
|
||||
set(GTEST_TARGET "gtest" CACHE INTERNAL "Target for gtest infrastructure")
|
||||
|
||||
# Create gtest static library
|
||||
add_library(
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user