File tree Expand file tree Collapse file tree 3 files changed +20
-13
lines changed
Expand file tree Collapse file tree 3 files changed +20
-13
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ find_package(ignition-cmake2 2.8.0 REQUIRED)
1616#============================================================================
1717ign_configure_project ()
1818
19+ if (UNIX AND NOT APPLE )
20+ set (EXTRA_TEST_LIB_DEPS stdc++fs)
21+ else ()
22+ set (EXTRA_TEST_LIB_DEPS)
23+ endif ()
24+
1925#============================================================================
2026# Set project-specific options
2127#============================================================================
@@ -69,11 +75,11 @@ ign_find_package(ignition-math6 REQUIRED)
6975set (IGN_MATH_VER ${ignition-math6_VERSION_MAJOR})
7076
7177#--------------------------------------
72- # Find if ign command is available
78+ # Find if command is available. This is used to enable tests.
79+ # Note that CLI files are installed regardless of whether the dependency is
80+ # available during build time
7381find_program (HAVE_IGN_TOOLS ign )
74- if (HAVE_IGN_TOOLS)
75- set (IGN_TOOLS_VER 1)
76- endif ()
82+ set (IGN_TOOLS_VER 1)
7783
7884#--------------------------------------
7985# Find Tinyxml2
Original file line number Diff line number Diff line change @@ -51,10 +51,8 @@ install(FILES ${cmd_script_generated} DESTINATION lib/ruby/ignition)
5151configure_file (
5252 "msgs.bash_completion.sh"
5353 "${CMAKE_CURRENT_BINARY_DIR} /msgs${PROJECT_VERSION_MAJOR} .bash_completion.sh" @ONLY )
54- if (HAVE_IGN_TOOLS)
55- install (
56- FILES
57- ${CMAKE_CURRENT_BINARY_DIR} /msgs${PROJECT_VERSION_MAJOR} .bash_completion.sh
58- DESTINATION
59- ${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_DATAROOTDIR} /gz/gz${IGN_TOOLS_VER} .completion.d)
60- endif ()
54+ install (
55+ FILES
56+ ${CMAKE_CURRENT_BINARY_DIR} /msgs${PROJECT_VERSION_MAJOR} .bash_completion.sh
57+ DESTINATION
58+ ${CMAKE_INSTALL_PREFIX} /${CMAKE_INSTALL_DATAROOTDIR} /gz/gz${IGN_TOOLS_VER} .completion.d)
Original file line number Diff line number Diff line change @@ -12,7 +12,10 @@ if (MSVC)
1212 list (REMOVE_ITEM test_sources ign_TEST.cc)
1313endif ()
1414
15-
1615if (HAVE_IGN_TOOLS)
17- ign_build_tests (TYPE UNIT SOURCES ${test_sources} )
16+ ign_build_tests (
17+ TYPE UNIT
18+ SOURCES ${test_sources}
19+ LIB_DEPS
20+ ${EXTRA_TEST_LIB_DEPS} )
1821endif ()
You can’t perform that action at this time.
0 commit comments