mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-17 13:38:01 +00:00
Renamed the target and binary for the Boost unit tests from test
to boost_unit_tests
This quells warnings from CMake about reserved target names, and reduces confusion about which `test` is intended: the wesnoth executable or the standard shell command.
This commit is contained in:
parent
9019074182
commit
d091391899
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -133,6 +133,7 @@ userdata
|
|||
|
||||
# testing
|
||||
/test*
|
||||
/boost_unit_tests*
|
||||
!/test_wrapper.sh
|
||||
src/test
|
||||
error*.log
|
||||
|
|
12
SConstruct
12
SConstruct
|
@ -46,7 +46,7 @@ def OptionalPath(key, val, env):
|
|||
|
||||
opts.AddVariables(
|
||||
ListVariable('default_targets', 'Targets that will be built if no target is specified in command line.',
|
||||
"wesnoth,wesnothd", Split("wesnoth wesnothd campaignd test")),
|
||||
"wesnoth,wesnothd", Split("wesnoth wesnothd campaignd boost_unit_tests")),
|
||||
EnumVariable('build', 'Build variant: release, debug, or profile', "release", ["release", "debug", "profile"]),
|
||||
PathVariable('build_dir', 'Build all intermediate files(objects, test programs, etc) under this dir', "build", PathVariable.PathAccept),
|
||||
('extra_flags_config', "Extra compiler and linker flags to use for configuration and all builds. Whether they're compiler or linker is determined by env.ParseFlags. Unknown flags are compile flags by default. This applies to all extra_flags_* variables", ""),
|
||||
|
@ -201,11 +201,11 @@ Important switches include:
|
|||
With no arguments, the recipe builds wesnoth and wesnothd. Available
|
||||
build targets include the individual binaries:
|
||||
|
||||
wesnoth wesnothd campaignd test
|
||||
wesnoth wesnothd campaignd boost_unit_tests
|
||||
|
||||
You can make the following special build targets:
|
||||
|
||||
all = wesnoth wesnothd campaignd test (*).
|
||||
all = wesnoth wesnothd campaignd boost_unit_tests (*).
|
||||
TAGS = build tags for Emacs (*).
|
||||
wesnoth-deps.png = project dependency graph
|
||||
install = install all executables that currently exist, and any data needed
|
||||
|
@ -431,8 +431,8 @@ if env["prereqs"]:
|
|||
have_test_prereqs = have_client_prereqs and conf.CheckBoost('unit_test_framework') \
|
||||
or Warning("Unit tests are disabled because their prerequisites are not met")
|
||||
test_env = conf.Finish()
|
||||
if not have_test_prereqs and "test" in env["default_targets"]:
|
||||
env["default_targets"].remove("test")
|
||||
if not have_test_prereqs and "boost_unit_tests" in env["default_targets"]:
|
||||
env["default_targets"].remove("boost_unit_tests")
|
||||
|
||||
print(" " + env.subst("If any config checks fail, look in $build_dir/config.log for details"))
|
||||
print(" If a check fails spuriously due to caching, use --config=force to force its rerun")
|
||||
|
@ -595,7 +595,7 @@ except:
|
|||
Export(Split("env client_env test_env have_client_prereqs have_server_prereqs have_test_prereqs"))
|
||||
SConscript(dirs = Split("po doc packaging/windows packaging/systemd"))
|
||||
|
||||
binaries = Split("wesnoth wesnothd campaignd test")
|
||||
binaries = Split("wesnoth wesnothd campaignd boost_unit_tests")
|
||||
builds = {
|
||||
"release" : dict(CCFLAGS = Split(rel_comp_flags) , LINKFLAGS = Split(rel_link_flags)),
|
||||
"debug" : dict(CCFLAGS = Split(debug_flags) , CPPDEFINES = Split(glibcxx_debug_flags)),
|
||||
|
|
|
@ -4,6 +4,11 @@ Version 1.13.10+dev:
|
|||
have linger=no in [end_level].
|
||||
* A Tale of Two Brothers:
|
||||
* Added a full set of hints on easy difficulty.
|
||||
* Contiuous Integration (CI) and Unit testing
|
||||
* Renamed the target and binary for the Boost unit tests from `test` to
|
||||
`boost_unit_tests`. This quells warnings from CMake about reserved target
|
||||
names, and reduces confusion about which `test` is intended: the wesnoth
|
||||
executable or the standard shell command.
|
||||
* Language and i18n:
|
||||
* Updated translations: Chinese (Simplified)
|
||||
* Lua API:
|
||||
|
|
|
@ -485,7 +485,7 @@ if(ENABLE_TESTS)
|
|||
|
||||
add_definitions(-DBOOST_TEST_DYN_LINK)
|
||||
|
||||
GetSources("test" test_SRC)
|
||||
GetSources("boost_unit_tests" test_SRC)
|
||||
|
||||
if(ENABLE_GAME)
|
||||
set(test_LIB
|
||||
|
@ -514,16 +514,16 @@ if(ENABLE_TESTS)
|
|||
"${CXX_FLAG_NO_USELESS_CAST}"
|
||||
)
|
||||
|
||||
add_executable(test
|
||||
add_executable(boost_unit_tests
|
||||
${test_SRC}
|
||||
)
|
||||
target_link_libraries(test
|
||||
target_link_libraries(boost_unit_tests
|
||||
${test_LIB}
|
||||
${game-external-libs}
|
||||
boost_unit_test_framework
|
||||
)
|
||||
set_target_properties(test
|
||||
PROPERTIES OUTPUT_NAME ${BINARY_PREFIX}test${BINARY_SUFFIX}
|
||||
set_target_properties(boost_unit_tests
|
||||
PROPERTIES OUTPUT_NAME ${BINARY_PREFIX}boost_unit_tests${BINARY_SUFFIX}
|
||||
)
|
||||
|
||||
endif(ENABLE_TESTS)
|
||||
|
|
|
@ -80,7 +80,7 @@ if env["png"]:
|
|||
libwesnoth_sdl = client_env.Library("wesnoth_sdl", libwesnoth_sdl_sources)
|
||||
|
||||
#---wesnoth---
|
||||
# Used by both 'wesnoth' and 'test' targets
|
||||
# Used by both 'wesnoth' and 'boost_unit_tests' targets
|
||||
|
||||
wesnoth_sources = GetSources("wesnoth")
|
||||
|
||||
|
@ -161,9 +161,9 @@ env.WesnothProgram("wesnothd", wesnothd_sources + [libwesnoth_core, env["wesnoth
|
|||
campaignd_sources = GetSources("campaignd")
|
||||
env.WesnothProgram("campaignd", campaignd_sources + [libwesnoth_core], have_server_prereqs, OBJPREFIX = "campaignd_")
|
||||
|
||||
#---test---
|
||||
test_sources = GetSources("test")
|
||||
test = test_env.WesnothProgram("test", test_sources + [libwesnoth_extras, libwesnoth_core, libwesnoth, libwesnoth_sdl, libwesnoth_extras], have_test_prereqs)
|
||||
#---boost_unit_tests---
|
||||
test_sources = GetSources("boost_unit_tests")
|
||||
boost_unit_tests = test_env.WesnothProgram("boost_unit_tests", test_sources + [libwesnoth_extras, libwesnoth_core, libwesnoth, libwesnoth_sdl, libwesnoth_extras], have_test_prereqs)
|
||||
#---end of getting sources---
|
||||
|
||||
sources = []
|
||||
|
|
Loading…
Reference in New Issue
Block a user