Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VACore
Commits
f9b1bd37
Commit
f9b1bd37
authored
Jan 16, 2017
by
Dipl.-Ing. Jonas Stienen
Browse files
CMake config cleanup and adding (yet unused) generic path test
parent
2566a468
Changes
2
Show whitespace changes
Inline
Side-by-side
tests/CMakeLists.txt
View file @
f9b1bd37
cmake_minimum_required
(
VERSION 2.8
)
if
(
NOT VACORE_COMMON_BUILD
)
project
(
VACoreTest
)
list
(
APPEND CMAKE_MODULE_PATH
"$ENV{VISTA_CMAKE_COMMON}"
)
include
(
VistaCommon
)
endif
()
project
(
VACoreTest
)
list
(
APPEND CMAKE_MODULE_PATH
"$ENV{VISTA_CMAKE_COMMON}"
)
include
(
VistaCommon
)
vista_use_package
(
VACore REQUIRED FIND_DEPENDENCIES
)
if
(
ITA_VA_BUILD_STATIC AND DEFINED ITA_VA_BUILD_STATIC
)
add_definitions
(
-DVABASE_STATIC -DVACORE_STATIC
)
endif
(
ITA_VA_BUILD_STATIC AND DEFINED ITA_VA_BUILD_STATIC
)
add_executable
(
CoreTest CoreTest.cpp
)
target_link_libraries
(
CoreTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
...
...
@@ -43,3 +35,13 @@ vista_install( SceneConfigTest )
vista_create_default_info_file
(
SceneConfigTest
)
set_property
(
TARGET SceneConfigTest PROPERTY FOLDER
"VA/Tests/VACore"
)
add_executable
(
GenericPathRendererTest GenericPathRendererTest.cpp
)
target_link_libraries
(
GenericPathRendererTest
${
VISTA_USE_PACKAGE_LIBRARIES
}
)
vista_configure_app
(
GenericPathRendererTest
)
vista_install
(
GenericPathRendererTest
)
vista_create_default_info_file
(
GenericPathRendererTest
)
set_property
(
TARGET GenericPathRendererTest PROPERTY FOLDER
"VA/Tests/VACore"
)
tests/GenericPathRendererTest.cpp
0 → 100644
View file @
f9b1bd37
#include
<VACore.h>
#include
<VACoreFactory.h>
#include
<VAException.h>
#include
<iostream>
using
namespace
std
;
IVACore
*
core
=
NULL
;
void
TestModuleInterface
()
{
std
::
vector
<
CVAModuleInfo
>
viModuleInfos
;
core
->
EnumerateModules
(
viModuleInfos
);
if
(
viModuleInfos
.
size
()
)
cout
<<
"Found "
<<
viModuleInfos
.
size
()
<<
" modules"
<<
endl
;
for
(
size_t
i
=
0
;
i
<
viModuleInfos
.
size
();
i
++
)
{
cout
<<
" + Module #"
<<
i
+
1
<<
": "
<<
viModuleInfos
[
i
].
sName
<<
" ( "
<<
viModuleInfos
[
i
].
sDesc
<<
" )"
<<
endl
;
}
}
int
main
()
{
try
{
core
=
VACore
::
CreateCoreInstance
();
core
->
Initialize
();
TestModuleInterface
();
int
iListenerID
=
core
->
CreateListener
(
"MyGPListener"
);
core
->
SetListenerPosition
(
iListenerID
,
0
,
0
,
0
);
int
iSourceID
=
core
->
CreateSoundSource
(
"MyGPSoundSource"
);
core
->
SetSoundSourcePosition
(
iSourceID
,
0
,
0
,
-
2
);
cout
<<
"q+Enter to close."
<<
endl
;
char
cIn
;
cin
>>
cIn
;
core
->
Finalize
();
}
catch
(
CVAException
&
e
)
{
cerr
<<
"Error: "
<<
e
<<
endl
;
int
iErrorCode
=
e
.
GetErrorCode
();
delete
core
;
return
iErrorCode
;
}
delete
core
;
return
0
;
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment