Skip to content

Commit

Permalink
Merge branch 'maintenance'
Browse files Browse the repository at this point in the history
  • Loading branch information
abma committed Jan 1, 2021
2 parents 6181e6e + 0e219ae commit 575e223
Show file tree
Hide file tree
Showing 1,932 changed files with 139,924 additions and 115,596 deletions.
1 change: 1 addition & 0 deletions .cmakelintrc
@@ -0,0 +1 @@
filter=-whitespace/tabs,-linelength,-whitespace/extra,-whitespace/mismatch
12 changes: 9 additions & 3 deletions .gitmodules
@@ -1,6 +1,3 @@
[submodule "E323AI"]
path = AI/Skirmish/E323AI
url = git://github.com/spring/E323AI.git
[submodule "HughAI"]
path = AI/Skirmish/HughAI
url = git://github.com/spring/HughAI.git
Expand All @@ -13,9 +10,18 @@
[submodule "AI/Skirmish/KAIK"]
path = AI/Skirmish/KAIK
url = git://github.com/spring/KAIK.git
[submodule "AI/Skirmish/CircuitAI"]
path = AI/Skirmish/CircuitAI
url = git://github.com/spring/CircuitAI.git
[submodule "tools/unitsync/python"]
path = tools/unitsync/python
url = git://github.com/spring/pyunitsync.git
[submodule "tools/pr-downloader"]
path = tools/pr-downloader
url = git://github.com/spring/pr-downloader.git
[submodule "tools/SpringMapConvNG"]
path = tools/mapcompile
url = https://github.com/spring/SpringMapConvNG.git
[submodule "AI/Skirmish/AAI"]
path = AI/Skirmish/AAI
url = git://github.com/spring/AAI.git
34 changes: 0 additions & 34 deletions .mailmap

This file was deleted.

17 changes: 15 additions & 2 deletions .travis.yml
Expand Up @@ -26,8 +26,8 @@ env:
# you have to test using a branch in the main repo
- secure: "QSZUdSH72Y+X73FBy6cDdhlMH3ppMewbU/LquXe/sIUdJE0LmcCFHnPayI91TTRgS8r6YXKh3DIhE9XTs1OUxmV+RUL84z85byAtotb+ukHSzlSLSGGZfrqey+/vrCXbYykfaxhazlVDfk5vx63lRYiD5lp5KLL24+PIdK6Qd5E="
matrix:
- TARGET="AAI CppTestAI E323AI HughAI KAIK NullAI NullJavaAI NullOOJavaAI RAI demotool"
- TARGET="engine-headless tests check"
- TARGET="CppTestAI HughAI KAIK NullAI NullJavaAI NullOOJavaAI CircuitAI demotool engine-dedicated"
- TARGET="tests engine-headless check"
matrix:
fast_finish: true

Expand All @@ -51,3 +51,16 @@ notifications:
- chat.freenode.net#taspring
on_success: change
on_failure: change
matrix:
include:
- language: python
name: CMake lint
python: 2.7
compiler: ""
env: ""
before_install: ""
install: ""
before_script:
- pip install cmakelint
script:
- find . \( -name "CMakeLists.txt" -o -name "*.cmake" \) -not -path './rts/lib/*' -exec cmakelint --config=.cmakelintrc {} \;
18 changes: 9 additions & 9 deletions AI/CMakeLists.txt
Expand Up @@ -6,7 +6,7 @@
# * DEPS_AI_ALL
#
# Functions and macros defined in this file:
# * AIMessage
# * ai_message
#

add_definitions(-DBUILDING_AI)
Expand Down Expand Up @@ -54,28 +54,28 @@ set(SKIRMISH_AI_DATA "${AI_DATA_DIR}/AI/Skirmish")
# Display messages on configure, which AIs are found
set(SKIRMISHAI_FIND_QUIETLY ${AI_FIND_QUIETLY})

MakeGlobal(SKIRMISH_AI_LIBS SKIRMISH_AI_DATA SKIRMISHAI_FIND_QUIETLY)
make_global(SKIRMISH_AI_LIBS SKIRMISH_AI_DATA SKIRMISHAI_FIND_QUIETLY)


# Print a message, but only if we are allowed to speak.
macro (AIMessage type msg)
macro (ai_message type msg)
if (NOT AI_FIND_QUIETLY)
message(${type} "${msg}")
endif (NOT AI_FIND_QUIETLY)
endmacro (AIMessage type msg)
endmacro (ai_message type msg)


find_package(AWK)

# CUtils has to come first, because the Interfaces use it too
Add_Subdirectory(Wrappers/CUtils)
Add_Subdirectory(Interfaces)
Add_Subdirectory(Wrappers)
Add_Subdirectory(Skirmish)
add_subdirectory(Wrappers/CUtils)
add_subdirectory(Interfaces)
add_subdirectory(Wrappers)
add_subdirectory(Skirmish)

set(DEPS_AI_ALL
${DEPS_AI_INTERFACES}
${DEPS_AI_WRAPPERS}
${DEPS_AI_SKIRMISH}
)
MakeGlobal(DEPS_AI_ALL)
make_global(DEPS_AI_ALL)
36 changes: 18 additions & 18 deletions AI/Interfaces/C/CMakeLists.txt
Expand Up @@ -13,9 +13,9 @@

# Native Skirmish AI configuration macro
# This will be called from native AIs at AI/Skirmish/*/CMakeLists.txt.
macro (ConfigureNativeSkirmishAI mySourceDirRel_var additionalSources_var additionalCompileFlags_var additionalLibraries_var)
macro (configure_native_skirmish_ai mySourceDirRel_var additionalSources_var additionalCompileFlags_var additionalLibraries_var)
set(myDir "${CMAKE_CURRENT_SOURCE_DIR}")
GetLastPathPart(dirName ${myDir})
get_last_path_part(dirName ${myDir})
set(myName "${dirName}")
set(mySourceDirRel "${${mySourceDirRel_var}}") # Common values are "" or "src"
set(additionalSources ${${additionalSources_var}})
Expand All @@ -33,23 +33,23 @@ macro (ConfigureNativeSkirmishAI mySourceDirRel_var additionalSources_var add
# Compile and install
if (BUILD_THIS_SKIRMISHAI)
# Assemble meta data
GetVersionPlusDepFile(myVersion myVersionDepFile)
get_version_plus_dep_file(myVersion myVersionDepFile)
set(myTarget "${myName}")
set(myInstLibsDir "${SKIRMISH_AI_LIBS}/${myName}/${myVersion}")
set(myInstDataDir "${SKIRMISH_AI_DATA}/${myName}/${myVersion}")
MakeAbsolute(mySourceDir "${myDir}" "${mySourceDirRel}")
make_absolute(mySourceDir "${myDir}" "${mySourceDirRel}")

SkirmishAIMessage(STATUS "Found Skirmish AI: ${myName} ${myVersion}")
skirmish_ai_message(STATUS "Found Skirmish AI: ${myName} ${myVersion}")

# Create a list of all the AIs own source files
GetNativeSourcesRecursive(mySources "${mySourceDir}" "${myDir}")
get_native_sources_recursive(mySources "${mySourceDir}" "${myDir}")

# Compile the library
add_library(${myTarget} MODULE ${mySources} ${additionalSources} ${myVersionDepFile})
set_target_properties(${myTarget} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data)
FixLibName(${myTarget})
fix_lib_name(${myTarget})

Add_Dependencies(${myTarget} generateVersionFiles)
add_dependencies(${myTarget} generateVersionFiles)
target_link_libraries(${myTarget} ${additionalLibraries})
set_target_properties(${myTarget} PROPERTIES COMPILE_FLAGS "${additionalCompileFlags}")
set_target_properties(${myTarget} PROPERTIES OUTPUT_NAME "SkirmishAI")
Expand All @@ -60,7 +60,7 @@ macro (ConfigureNativeSkirmishAI mySourceDirRel_var additionalSources_var add
# Install the library
install(TARGETS ${myTarget} DESTINATION "${myInstLibsDir}")
endif (BUILD_THIS_SKIRMISHAI)
endmacro (ConfigureNativeSkirmishAI mySourceDirRel_var additionalSources_var additionalCompileFlags_var additionalLibraries_var)
endmacro (configure_native_skirmish_ai mySourceDirRel_var additionalSources_var additionalCompileFlags_var additionalLibraries_var)

### END: MACROS_AND_FUNCTIONS
################################################################################
Expand All @@ -85,25 +85,25 @@ endif (AI_TYPES_NATIVE AND myName MATCHES "${AI_EXCLUDE_REGEX}")

# Check dependencies of the interface are met
if (AI_TYPES_NATIVE)
SetGlobal(BUILD_${myName}_AIINTERFACE TRUE)
set_global(BUILD_${myName}_AIINTERFACE TRUE)
else (AI_TYPES_NATIVE)
SetGlobal(BUILD_${myName}_AIINTERFACE FALSE)
set_global(BUILD_${myName}_AIINTERFACE FALSE)
message ("warning: C & C++ AI Interface will not be built!")
endif (AI_TYPES_NATIVE)


# Build
if (BUILD_${myName}_AIINTERFACE)
GetVersionPlusDepFile(myVersion myVersionDepFile)
get_version_plus_dep_file(myVersion myVersionDepFile)
set(myTarget "${myName}-AIInterface")
set(myInstLibsDir ${AI_INTERFACES_LIBS}/${myName}/${myVersion})
set(myInstDataDir ${AI_INTERFACES_DATA}/${myName}/${myVersion})
MakeAbsolute(mySourceDir "${myDir}" "${mySourceDirRel}")
make_absolute(mySourceDir "${myDir}" "${mySourceDirRel}")

AIInterfaceMessage(STATUS "Found AI Interface: ${myTarget} ${myVersion}")
ai_interface_message(STATUS "Found AI Interface: ${myTarget} ${myVersion}")

SetGlobal(${myName}_AIINTERFACE_VERS ${myVersion})
SetGlobal(${myName}_AIINTERFACE_TARGET ${myTarget})
set_global(${myName}_AIINTERFACE_VERS ${myVersion})
set_global(${myName}_AIINTERFACE_TARGET ${myTarget})

set(mySources
"${mySourceDir}/Interface.cpp"
Expand All @@ -113,9 +113,9 @@ if (BUILD_${myName}_AIINTERFACE)
add_library(${myTarget} MODULE ${mySources} ${ai_common_SRC} ${myVersionDepFile})
set_target_properties(${myTarget} PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/data)
target_link_libraries(${myTarget} CUtils)
FixLibName(${myTarget})
fix_lib_name(${myTarget})

Add_Dependencies(${myTarget} generateVersionFiles)
add_dependencies(${myTarget} generateVersionFiles)
set_target_properties(${myTarget} PROPERTIES OUTPUT_NAME "AIInterface")

# Install the data files
Expand Down
18 changes: 10 additions & 8 deletions AI/Interfaces/CMakeLists.txt
@@ -1,7 +1,7 @@
### AI Interfaces
#
# Functions and macros defined in this file:
# * AIInterfaceMessage
# * ai_interface_message
#

add_definitions(-DBUILDING_AI_INTERFACE)
Expand All @@ -13,22 +13,24 @@ set(AIINTERFACE_FIND_QUIETLY ${AI_FIND_QUIETLY})


# Print a message, but only if we are allowed to speak.
macro (AIInterfaceMessage type msg)
macro (ai_interface_message type msg)
if (NOT AIINTERFACE_FIND_QUIETLY)
message(${type} "${msg}")
endif (NOT AIINTERFACE_FIND_QUIETLY)
endmacro (AIInterfaceMessage type msg)
endmacro (ai_interface_message type msg)


# Add all AI Interface submodules
GetListOfSubModules(AI_INTERFACE_DIRS)
get_list_of_submodules(AI_INTERFACE_DIRS)
set(DEPS_AI_INTERFACES "")
foreach (aiInterfaceDir ${AI_INTERFACE_DIRS})
if (NOT "${aiInterfaceDir}" STREQUAL "Python")
Add_Subdirectory(${aiInterfaceDir})
list(APPEND DEPS_AI_INTERFACES ${aiInterfaceDir}-AIInterface)
add_subdirectory(${aiInterfaceDir})
if(TARGET ${aiInterfaceDir}-AIInterface)
list(APPEND DEPS_AI_INTERFACES ${aiInterfaceDir}-AIInterface)
endif()
elseif (NOT "${aiInterfaceDir}" STREQUAL "Python")
AIInterfaceMessage(STATUS "Python AI Interface is not yet compatible with pureint changes -> temporarily disabled")
ai_interface_message(STATUS "Python AI Interface is not yet compatible with pureint changes -> temporarily disabled")
endif (NOT "${aiInterfaceDir}" STREQUAL "Python")
endforeach (aiInterfaceDir)
MakeGlobal(DEPS_AI_INTERFACES)
make_global(DEPS_AI_INTERFACES)

0 comments on commit 575e223

Please sign in to comment.