1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-09-18 16:32:32 +02:00
openrw/tests/test_globals.cpp
Anonymous Maarten 7a86c199b0 tests: only include GameConfig.hpp in source file (no header file)
This reduces compile time from 1m19s to 9s when touching GameConfig.hpp.

(Executed from rwgame/build/tests)
before:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	1m18.643s
user	1m13.069s
sys	0m5.266s

after:
$ make >/dev/null
$ touch ../../rwgame/GameConfig.hpp
$ time make>/dev/null

real	0m9.247s
user	0m8.374s
sys	0m0.836s
2017-08-15 15:58:01 +01:00

10 lines
178 B
C++

#include "test_globals.hpp"
#include <GameConfig.hpp>
#if RW_TEST_WITH_DATA
std::string Global::getGamePath() {
return GameConfig("openrw.ini").getGameDataPath();
}
#endif