Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Core/Cmake: Allow settings to detach custom scripts #11617

Closed
wants to merge 1 commit into from

4 participants

Ascathor jackpoz Carl Hjerpe Shauren
Ascathor

Allow to remove coupled custom scripts to regular scripts on build.
Meaning, if you change custom scripts and have this enabled, only custom scripts are rebuilt and core scripts are untouched. Disabled by default.
Original Code by @LilleCarl.

Ascathor Ascathor Core/Cmake: Allow settings to detach custom scripts
Allow to remove coupled custom scripts to regular scripts on build.
Meaning, if you change custom scripts and have this enabled, only custom scripts are rebuilt and core scripts are untouched. Disabled by default.
Original Code by @LilleCarl.
66c0aa5
jackpoz
Collaborator

Is there a purpose for this ? We already have:

  • PCH with scripts
  • PCH without scripts
  • no-PCH with scripts
  • no-PCH without scripts

In which case these configurations aren't enough already and a new cmake option is required ?

Carl Hjerpe

@jackpoz If we do not want to build all instance scripts, but wants to build custom scripts..

jackpoz
Collaborator

Then would it make more sense to just move Custom scripts cmake file into "game" project ? it's empty by default anyway

Carl Hjerpe

Game project is not empty at all :P

Shauren
Owner

"Custom" is empty

On the other hand, spell scripts are also always included, even if SCRIPTS was not chosen

Ascathor Ascathor closed this
Ascathor

I assume this is not entirely valid anymore, so I close this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 20, 2014
  1. Ascathor

    Core/Cmake: Allow settings to detach custom scripts

    Ascathor authored
    Allow to remove coupled custom scripts to regular scripts on build.
    Meaning, if you change custom scripts and have this enabled, only custom scripts are rebuilt and core scripts are untouched. Disabled by default.
    Original Code by @LilleCarl.
This page is out of date. Refresh to see the latest.
19 cmake/options.cmake
View
@@ -8,12 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-option(SERVERS "Build worldserver and authserver" 1)
-option(SCRIPTS "Build core with scripts included" 1)
-option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
-option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
-option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
-option(WITH_WARNINGS "Show all warnings during compile" 0)
-option(WITH_COREDEBUG "Include additional debug-code in core" 0)
-option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
-option(WITHOUT_GIT "Disable the GIT testing routines" 0)
+option(SERVERS "Build worldserver and authserver" 1)
+option(SCRIPTS "Build core with scripts included" 1)
+option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
+option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
+option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
+option(DETACH_CSCRIPTS "Detach custom scripts to compile individually to core scripts" 0)
+option(WITH_WARNINGS "Show all warnings during compile" 0)
+option(WITH_COREDEBUG "Include additional debug-code in core" 0)
+option(WITH_MESHEXTRACTOR "Build meshextractor (alpha)" 0)
+option(WITHOUT_GIT "Disable the GIT testing routines" 0)
6 cmake/showoptions.cmake
View
@@ -49,6 +49,12 @@ else()
message("* Build scripts w/PCH : No")
endif()
+if( DETACH_CSCRIPTS )
+ message("* Detach custom scripts : Yes")
+else()
+ message("* Detach custom scripts : No (default)")
+endif()
+
if( WITH_WARNINGS )
message("* Show all warnings : Yes")
else()
10 src/server/scripts/CMakeLists.txt
View
@@ -22,6 +22,10 @@ include(Commands/CMakeLists.txt)
include(Examples/CMakeLists.txt)
+if (DETACH_CSCRIPTS)
+ include(Custom/CMakeLists.txt)
+endif()
+
set(scripts_STAT_SRCS
${scripts_STAT_SRCS}
../game/AI/ScriptedAI/ScriptedEscortAI.cpp
@@ -29,8 +33,10 @@ set(scripts_STAT_SRCS
../game/AI/ScriptedAI/ScriptedFollowerAI.cpp
)
-if(SCRIPTS)
- include(Custom/CMakeLists.txt)
+if (SCRIPTS)
+ if(NOT DETACH_CSCRIPTS)
+ include(Custom/CMakeLists.txt)
+ endif()
include(World/CMakeLists.txt)
include(OutdoorPvP/CMakeLists.txt)
include(EasternKingdoms/CMakeLists.txt)
Something went wrong with that request. Please try again.