Skip to content

Commit 4c57ea4

Browse files
committed
Add test that includes gz/sim.hh
Not all of the needed include paths are exported with the gz-sim target, so including the gz/sim.hh header doesn't work easily. This test fails to build and illustrates the problem. Signed-off-by: Steve Peters <[email protected]>
1 parent df231cb commit 4c57ea4

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

test/integration/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ set(tests
3333
hydrodynamics.cc
3434
hydrodynamics_flags.cc
3535
imu_system.cc
36+
include_sim_hh.cc
3637
joint.cc
3738
joint_controller_system.cc
3839
joint_position_controller_system.cc

test/integration/include_sim_hh.cc

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (C) 2023 Open Source Robotics Foundation
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*
16+
*/
17+
18+
#include <gtest/gtest.h>
19+
20+
#include <gz/sim.hh>
21+
22+
/////////////////////////////////////////////////
23+
// Simple test to make sure it compiles
24+
TEST(Compilation, sim_hh)
25+
{
26+
gz::sim::System system;
27+
}

0 commit comments

Comments
 (0)