summaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
diff options
context:
space:
mode:
authorJosh Blum2013-07-17 22:15:23 -0700
committerJosh Blum2013-07-17 22:15:23 -0700
commit356a1d290297bf72a574876de0404512266ec845 (patch)
tree1409002a1f26217ded47ef0883ed4c031008425c /tests/CMakeLists.txt
parent6d07c50dafbe38049dbede7241e9e66eea0a699e (diff)
downloadsandhi-356a1d290297bf72a574876de0404512266ec845.tar.gz
sandhi-356a1d290297bf72a574876de0404512266ec845.tar.bz2
sandhi-356a1d290297bf72a574876de0404512266ec845.zip
gras: module loading is recursive and takes files
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r--tests/CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index f72dfab..5c76dbe 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -58,10 +58,10 @@ GR_ADD_TEST(time_tags_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/time
add_library(example_module MODULE example_module.cpp)
target_link_libraries(example_module ${GRAS_LIBRARIES})
-set(CURRENT_LIBRARY_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
-if(WIN32)
-set(CURRENT_LIBRARY_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_BUILD_TYPE})
-endif()
-file(TO_NATIVE_PATH "${CURRENT_LIBRARY_BUILD_DIR}" CURRENT_LIBRARY_BUILD_DIR)
-list(APPEND GR_TEST_ENVIRONS "GRAS_MODULE_PATH=${CURRENT_LIBRARY_BUILD_DIR}")
+get_target_property(example_module_location example_module LOCATION)
+string(REPLACE "$(Configuration)" ${CMAKE_BUILD_TYPE} example_module_location ${example_module_location})
+file(TO_NATIVE_PATH "${example_module_location}" example_module_location)
+message(STATUS "example_module_location: ${example_module_location}")
+
+list(APPEND GR_TEST_ENVIRONS "GRAS_MODULE_PATH=${example_module_location}")
GR_ADD_TEST(module_loader_test ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/module_loader_test.py)