qbsp: add testqbsp target
This commit is contained in:
parent
7656d5c2f1
commit
34a6bf7876
|
|
@ -31,6 +31,8 @@ build_script:
|
||||||
msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj
|
msbuild /p:Configuration=Release /p:Platform=$cmakePlatform /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" PACKAGE.vcxproj
|
||||||
|
|
||||||
.\light\Release\testlight.exe
|
.\light\Release\testlight.exe
|
||||||
|
|
||||||
|
.\qbsp\Release\testqbsp.exe
|
||||||
artifacts:
|
artifacts:
|
||||||
- path: cmakebuild\*.zip
|
- path: cmakebuild\*.zip
|
||||||
deploy:
|
deploy:
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,12 @@ tar xf embree.tgz
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$(pwd)/embree-2.15.0.x86_64.linux"
|
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$(pwd)/embree-2.15.0.x86_64.linux"
|
||||||
make -j8 VERBOSE=1
|
make -j8 VERBOSE=1
|
||||||
make -j8 VERBOSE=1 testlight
|
make -j8 VERBOSE=1 testlight
|
||||||
|
make -j8 VERBOSE=1 testqbsp
|
||||||
cpack
|
cpack
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
./light/testlight || exit 1
|
./light/testlight || exit 1
|
||||||
|
./qbsp/testqbsp || exit 1
|
||||||
|
|
||||||
# check rpath
|
# check rpath
|
||||||
readelf -d ./light/light
|
readelf -d ./light/light
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,9 @@ EMBREE_CMAKE_DIR="$(pwd)/$EMBREE_DIR_NAME"
|
||||||
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$EMBREE_CMAKE_DIR"
|
cmake .. -DCMAKE_BUILD_TYPE=Release -Dembree_DIR="$EMBREE_CMAKE_DIR"
|
||||||
make -j8
|
make -j8
|
||||||
make -j8 testlight
|
make -j8 testlight
|
||||||
|
make -j8 testqbsp
|
||||||
cpack
|
cpack
|
||||||
|
|
||||||
# run tests
|
# run tests
|
||||||
./light/testlight || exit 1
|
./light/testlight || exit 1
|
||||||
|
./qbsp/testqbsp || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,3 +6,20 @@ add_definitions(-DDOUBLEVEC_T)
|
||||||
add_executable(qbsp ${QBSP_SOURCES} main.cc)
|
add_executable(qbsp ${QBSP_SOURCES} main.cc)
|
||||||
target_link_libraries(qbsp ${CMAKE_THREAD_LIBS_INIT})
|
target_link_libraries(qbsp ${CMAKE_THREAD_LIBS_INIT})
|
||||||
install(TARGETS qbsp RUNTIME DESTINATION bin)
|
install(TARGETS qbsp RUNTIME DESTINATION bin)
|
||||||
|
|
||||||
|
# test (copied from light/CMakeLists.txt)
|
||||||
|
|
||||||
|
set(GOOGLETEST_SOURCES ${CMAKE_SOURCE_DIR}/3rdparty/googletest/src/gtest-all.cc)
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest/include)
|
||||||
|
include_directories(${CMAKE_SOURCE_DIR}/3rdparty/googletest)
|
||||||
|
|
||||||
|
set(QBSP_TEST_SOURCE
|
||||||
|
${QBSP_SOURCES}
|
||||||
|
${GOOGLETEST_SOURCES}
|
||||||
|
test.cc
|
||||||
|
test_qbsp.cc)
|
||||||
|
|
||||||
|
add_executable(testqbsp EXCLUDE_FROM_ALL ${QBSP_TEST_SOURCE})
|
||||||
|
add_test(testqbsp testqbsp)
|
||||||
|
|
||||||
|
target_link_libraries (testqbsp ${CMAKE_THREAD_LIBS_INIT})
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
int main(int argc, char **argv) {
|
||||||
|
::testing::InitGoogleTest(&argc, argv);
|
||||||
|
return RUN_ALL_TESTS();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,10 @@
|
||||||
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
#include <qbsp/qbsp.hh>
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
TEST(qbsp, test) {
|
||||||
|
FAIL();
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Reference in New Issue