mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
chore(CMake/Tests): use conventional CMake flag to enable tests (#3809)
This commit is contained in:
@@ -142,7 +142,7 @@ add_subdirectory(src)
|
|||||||
|
|
||||||
CU_RUN_HOOK("AFTER_SRC_LOAD")
|
CU_RUN_HOOK("AFTER_SRC_LOAD")
|
||||||
|
|
||||||
if( UNIT_TESTS )
|
if( BUILD_TESTING )
|
||||||
# we use these flags to get code coverage
|
# we use these flags to get code coverage
|
||||||
set(UNIT_TEST_CXX_FLAGS "-fprofile-arcs -ftest-coverage -fno-inline")
|
set(UNIT_TEST_CXX_FLAGS "-fprofile-arcs -ftest-coverage -fno-inline")
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ CWARNINGS=ON
|
|||||||
CDEBUG=OFF
|
CDEBUG=OFF
|
||||||
CTYPE=Release
|
CTYPE=Release
|
||||||
CSCRIPTS=ON
|
CSCRIPTS=ON
|
||||||
CUNIT_TESTS=ON
|
CBUILD_TESTING=ON
|
||||||
CSERVERS=ON
|
CSERVERS=ON
|
||||||
CTOOLS=ON
|
CTOOLS=ON
|
||||||
CSCRIPTPCH=OFF
|
CSCRIPTPCH=OFF
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ mkdir var/build/obj && cd var/build/obj;
|
|||||||
|
|
||||||
time cmake ../../../ \
|
time cmake ../../../ \
|
||||||
-DTOOLS=1 \
|
-DTOOLS=1 \
|
||||||
-DUNIT_TESTS=1 \
|
-DBUILD_TESTING=1 \
|
||||||
-DSCRIPTS=1 \
|
-DSCRIPTS=1 \
|
||||||
-DCMAKE_BUILD_TYPE=Debug \
|
-DCMAKE_BUILD_TYPE=Debug \
|
||||||
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
|
-DMYSQL_ADD_INCLUDE_PATH=/usr/local/include \
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ function comp_configure() {
|
|||||||
|
|
||||||
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
|
cmake $SRCPATH -DCMAKE_INSTALL_PREFIX=$BINPATH $DCONF -DSERVERS=$CSERVERS \
|
||||||
-DSCRIPTS=$CSCRIPTS \
|
-DSCRIPTS=$CSCRIPTS \
|
||||||
-DUNIT_TESTS=$CUNIT_TESTS \
|
-DBUILD_TESTING=$CBUILD_TESTING \
|
||||||
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
|
-DTOOLS=$CTOOLS -DUSE_SCRIPTPCH=$CSCRIPTPCH -DUSE_COREPCH=$CCOREPCH -DWITH_COREDEBUG=$CDEBUG -DCMAKE_BUILD_TYPE=$CTYPE -DWITH_WARNINGS=$CWARNINGS \
|
||||||
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
|
-DCMAKE_C_COMPILER=$CCOMPILERC -DCMAKE_CXX_COMPILER=$CCOMPILERCXX "-DDISABLED_AC_MODULES=$CDISABLED_AC_MODULES" $CCUSTOMOPTIONS
|
||||||
|
|
||||||
|
|||||||
2
conf/dist/config.cmake
vendored
2
conf/dist/config.cmake
vendored
@@ -1,6 +1,6 @@
|
|||||||
option(SERVERS "Build worldserver and authserver" 1)
|
option(SERVERS "Build worldserver and authserver" 1)
|
||||||
option(SCRIPTS "Build core with scripts included" 1)
|
option(SCRIPTS "Build core with scripts included" 1)
|
||||||
option(UNIT_TESTS "Build unit tests" 0)
|
option(BUILD_TESTING "Build unit tests" 0)
|
||||||
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
|
option(TOOLS "Build map/vmap/mmap extraction/assembler tools" 0)
|
||||||
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
|
option(USE_SCRIPTPCH "Use precompiled headers when compiling scripts" 1)
|
||||||
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
|
option(USE_COREPCH "Use precompiled headers when compiling servers" 1)
|
||||||
|
|||||||
2
conf/dist/config.sh
vendored
2
conf/dist/config.sh
vendored
@@ -48,7 +48,7 @@ CTYPE=Release
|
|||||||
# compile scripts
|
# compile scripts
|
||||||
CSCRIPTS=ON
|
CSCRIPTS=ON
|
||||||
# compile unit tests
|
# compile unit tests
|
||||||
CUNIT_TESTS=OFF
|
CBUILD_TESTING=OFF
|
||||||
# compile server
|
# compile server
|
||||||
CSERVERS=ON
|
CSERVERS=ON
|
||||||
# compile tools
|
# compile tools
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ else()
|
|||||||
message("* Build map/vmap tools : No (default)")
|
message("* Build map/vmap tools : No (default)")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( UNIT_TESTS )
|
if( BUILD_TESTING )
|
||||||
message("* Build unit tests : Yes")
|
message("* Build unit tests : Yes")
|
||||||
else()
|
else()
|
||||||
message("* Build unit tests : No (default)")
|
message("* Build unit tests : No (default)")
|
||||||
|
|||||||
Reference in New Issue
Block a user