From fc9ff057ef159daec736ffcba52a7ae4bfa37bb9 Mon Sep 17 00:00:00 2001 From: Florian Abele Date: Sun, 25 Mar 2018 17:37:40 +0200 Subject: [PATCH 1/3] Port per-major-release cmake install from v2.2.1 The cmake file from current master branch is reused and adjusted to allow several OSI versions on the same computer. The main idea is to install into a directory that takes the version into account. This draft uses the major version described inside the version file to configure the installation path. --- CMakeLists.txt | 6 ++++-- VERSION | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 765f7c2f6..7f65c5313 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,9 @@ foreach(LINE ${VERSION_CONTENTS}) endforeach() set(OPEN_SIMULATION_INTERFACE_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}) +set(INSTALL_LIB_DIR ${INSTALL_LIB_DIR}/osi${VERSION_MAJOR}) +set(INSTALL_INCLUDE_DIR ${INSTALL_INCLUDE_DIR}/osi${VERSION_MAJOR}) + configure_file(osi_version.proto.in ${CMAKE_CURRENT_SOURCE_DIR}/osi_version.proto) find_package(Protobuf 2.6.1 REQUIRED) @@ -105,7 +108,6 @@ install(TARGETS ${PROJECT_NAME}_pic EXPORT ${PROJECT_NAME}_targets ARCHIVE DESTINATION "${INSTALL_LIB_DIR}" COMPONENT lib) - add_library(${PROJECT_NAME} SHARED $) target_include_directories(${PROJECT_NAME} PUBLIC @@ -141,7 +143,7 @@ install(FILES # Header files install(FILES ${PROTO_HEADERS} - DESTINATION "${CMAKE_INSTALL_PREFIX}/${INSTALL_INCLUDE_DIR}") + DESTINATION "${INSTALL_INCLUDE_DIR}") # Install the export set for use with the install-tree install(EXPORT ${PROJECT_NAME}_targets diff --git a/VERSION b/VERSION index 9bd69d4eb..acc700dd0 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ -VERSION_MAJOR = 2 -VERSION_MINOR = 2 -VERSION_PATCH = 0 \ No newline at end of file +VERSION_MAJOR = 3 +VERSION_MINOR = 0 +VERSION_PATCH = 0 From 6fbaad7d3ab7f6171fcd0a1ea6e04c53ff292b24 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Tue, 27 Mar 2018 23:52:10 +0200 Subject: [PATCH 2/3] Enhance Travis CI builds to do test installs This change improves CI builds to also test the installation cmake targets for proper completion. --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0c05ddd5b..d113e625e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,8 @@ cache: # Handle dependencies in separate directory. before_install: + - TESTINST_DIR="${HOME}/dummy" + - mkdir -p "${TESTINST_DIR}" - DEPS_DIR="${HOME}/deps" - mkdir -p "${DEPS_DIR}" - cd "${DEPS_DIR}" @@ -40,9 +42,11 @@ before_script: script: - mkdir -p build - cd build - - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install .. + - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install -D CMAKE_INSTALL_PREFIX:PATH=${TESTINST_DIR} .. - cmake --build . - cd .. - python test_cases.py - python setup.py build - python setup.py sdist + - cd build + - cmake --build . --target install From 725f182fffe4dce6c7220dfde945939fc07e7f10 Mon Sep 17 00:00:00 2001 From: "Pierre R. Mai" Date: Tue, 27 Mar 2018 15:17:53 +0200 Subject: [PATCH 3/3] Change OSI package name to osi3 for new release This is done to enable users to run OSI 2.x (package osi) and OSI 3.x (package osi3) side-by-side. --- osi_common.proto | 2 +- osi_datarecording.proto | 2 +- osi_detectedlandmark.proto | 2 +- osi_detectedlane.proto | 2 +- osi_detectedobject.proto | 2 +- osi_detectedoccupant.proto | 2 +- osi_environment.proto | 2 +- osi_featuredata.proto | 2 +- osi_groundtruth.proto | 2 +- osi_hostvehicledata.proto | 2 +- osi_landmark.proto | 2 +- osi_lane.proto | 2 +- osi_modelinternal.proto | 2 +- osi_object.proto | 2 +- osi_occupant.proto | 2 +- osi_sensordata.proto | 2 +- osi_sensorspecific.proto | 2 +- osi_sensorview.proto | 4 ++-- osi_sensorviewconfiguration.proto | 2 +- osi_version.proto.in | 2 +- setup.py | 2 +- 21 files changed, 22 insertions(+), 22 deletions(-) diff --git a/osi_common.proto b/osi_common.proto index 6516ce5b7..4a43a6c55 100644 --- a/osi_common.proto +++ b/osi_common.proto @@ -2,7 +2,7 @@ syntax = "proto2"; option optimize_for = SPEED; -package osi; +package osi3; // diff --git a/osi_datarecording.proto b/osi_datarecording.proto index 44fef0704..a986d03f8 100644 --- a/osi_datarecording.proto +++ b/osi_datarecording.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_sensordata.proto"; -package osi; +package osi3; // // \brief (Time) Series of \c SensorData messages that may be used for data diff --git a/osi_detectedlandmark.proto b/osi_detectedlandmark.proto index 7aad06749..9ce6b93d1 100644 --- a/osi_detectedlandmark.proto +++ b/osi_detectedlandmark.proto @@ -6,7 +6,7 @@ import "osi_common.proto"; import "osi_landmark.proto"; import "osi_detectedobject.proto"; -package osi; +package osi3; // // \brief A traffic sign in the environment as detected by the sensor. diff --git a/osi_detectedlane.proto b/osi_detectedlane.proto index 3961b74d2..0fb64c9b1 100644 --- a/osi_detectedlane.proto +++ b/osi_detectedlane.proto @@ -6,7 +6,7 @@ import "osi_common.proto"; import "osi_lane.proto"; import "osi_detectedobject.proto"; -package osi; +package osi3; // // \brief A lane segment as detected by the sensor. diff --git a/osi_detectedobject.proto b/osi_detectedobject.proto index d20a6712a..edd8c69f0 100644 --- a/osi_detectedobject.proto +++ b/osi_detectedobject.proto @@ -7,7 +7,7 @@ import "osi_modelinternal.proto"; import "osi_object.proto"; import "osi_sensorspecific.proto"; -package osi; +package osi3; // // \brief Object in the environment as detected and perceived by the sensor. diff --git a/osi_detectedoccupant.proto b/osi_detectedoccupant.proto index 61da11fc8..c4ff6f380 100644 --- a/osi_detectedoccupant.proto +++ b/osi_detectedoccupant.proto @@ -6,7 +6,7 @@ import "osi_common.proto"; import "osi_occupant.proto"; import "osi_detectedobject.proto"; -package osi; +package osi3; // // \brief A vehicle occupant as detected and perceived by an interior sensor. diff --git a/osi_environment.proto b/osi_environment.proto index 969214c03..87d095316 100644 --- a/osi_environment.proto +++ b/osi_environment.proto @@ -2,7 +2,7 @@ syntax = "proto2"; option optimize_for = SPEED; -package osi; +package osi3; // // \brief The conditions of the environment. diff --git a/osi_featuredata.proto b/osi_featuredata.proto index d89b1e31b..863cca525 100644 --- a/osi_featuredata.proto +++ b/osi_featuredata.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief Interface for sensor data, in contrast to interpreted data after diff --git a/osi_groundtruth.proto b/osi_groundtruth.proto index 8067129ef..01ab3da3f 100644 --- a/osi_groundtruth.proto +++ b/osi_groundtruth.proto @@ -10,7 +10,7 @@ import "osi_lane.proto"; import "osi_object.proto"; import "osi_occupant.proto"; -package osi; +package osi3; // // \brief The ground truth information from the simulation environment. diff --git a/osi_hostvehicledata.proto b/osi_hostvehicledata.proto index 77461d7df..957ddb8ff 100644 --- a/osi_hostvehicledata.proto +++ b/osi_hostvehicledata.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief Interface for host vehicle data that is available to sensors and diff --git a/osi_landmark.proto b/osi_landmark.proto index 186232072..548c9af1c 100644 --- a/osi_landmark.proto +++ b/osi_landmark.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief A traffic sign. diff --git a/osi_lane.proto b/osi_lane.proto index b1797ae8c..d34fbd0d7 100644 --- a/osi_lane.proto +++ b/osi_lane.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief A lane in the road network. diff --git a/osi_modelinternal.proto b/osi_modelinternal.proto index 8da961b0b..caff713b8 100644 --- a/osi_modelinternal.proto +++ b/osi_modelinternal.proto @@ -5,7 +5,7 @@ option optimize_for = SPEED; import "osi_featuredata.proto"; import "osi_object.proto"; -package osi; +package osi3; // // \brief Additional internal data and state flags for \c SensorData objects. diff --git a/osi_object.proto b/osi_object.proto index 59cabcdee..b09da2c2c 100644 --- a/osi_object.proto +++ b/osi_object.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief A vehicle (host or other). diff --git a/osi_occupant.proto b/osi_occupant.proto index f4dea97f8..67d91419d 100644 --- a/osi_occupant.proto +++ b/osi_occupant.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief An occupant of a host vehicle, especially the driver of the vehicle. diff --git a/osi_sensordata.proto b/osi_sensordata.proto index 32501cf3a..ea1b1de0f 100644 --- a/osi_sensordata.proto +++ b/osi_sensordata.proto @@ -11,7 +11,7 @@ import "osi_detectedoccupant.proto"; import "osi_sensorview.proto"; import "osi_featuredata.proto"; -package osi; +package osi3; // // \brief The sensor information derived from \c GroundTruth and processed by diff --git a/osi_sensorspecific.proto b/osi_sensorspecific.proto index b1dc5cf54..f17038c7e 100644 --- a/osi_sensorspecific.proto +++ b/osi_sensorspecific.proto @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "osi_common.proto"; -package osi; +package osi3; // // \brief Message encapsulates all data for detected objects that is specific to diff --git a/osi_sensorview.proto b/osi_sensorview.proto index 6100f9d83..f566cd9ae 100644 --- a/osi_sensorview.proto +++ b/osi_sensorview.proto @@ -8,7 +8,7 @@ import "osi_groundtruth.proto"; import "osi_sensorviewconfiguration.proto"; import "osi_hostvehicledata.proto"; -package osi; +package osi3; // // \brief The sensor view as derived from \c GroundTruth and used as @@ -292,4 +292,4 @@ message UltrasonicSensorView // Ultrasonic Input Configuration valid at the time the data was created. // optional UltrasonicSensorViewConfiguration view_configuration = 1; -} \ No newline at end of file +} diff --git a/osi_sensorviewconfiguration.proto b/osi_sensorviewconfiguration.proto index 7eec04c21..fa56e1421 100644 --- a/osi_sensorviewconfiguration.proto +++ b/osi_sensorviewconfiguration.proto @@ -5,7 +5,7 @@ option optimize_for = SPEED; import "osi_common.proto"; import "osi_version.proto"; -package osi; +package osi3; // // \brief The configuration settings for the \c SensorView to be provided diff --git a/osi_version.proto.in b/osi_version.proto.in index 3cf8e80f5..c807dbc1b 100644 --- a/osi_version.proto.in +++ b/osi_version.proto.in @@ -4,7 +4,7 @@ option optimize_for = SPEED; import "google/protobuf/descriptor.proto"; -package osi; +package osi3; // // \brief The interface version number. diff --git a/setup.py b/setup.py index 43b5d67d7..751d8b46d 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ lineConfigured = lineConfigured.replace('@VERSION_PATCH@',str(VERSION_PATCH)) fout.write(lineConfigured) -package_name = 'osi' +package_name = 'osi3' package_path = os.path.join(os.getcwd(), package_name) class GenerateProtobuf(install):