summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2021-10-28 17:48:41 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2021-10-28 17:48:41 -0400
commit3410f561c2d883c0dfd3f870e2e318991ceeec7d (patch)
tree14fdd4613c3a4bca2252f2ec6f29e0125cd97958
parent0828f365c5c20f1fabe45f16b9c799d40b347a84 (diff)
downloadorcus-3410f561c2d883c0dfd3f870e2e318991ceeec7d.tar.gz
Fix cmake build for 'check' target.
-rw-r--r--src/CMakeLists.txt8
-rw-r--r--src/liborcus/CMakeLists.txt6
-rw-r--r--src/test/CMakeLists.txt2
3 files changed, 14 insertions, 2 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ab896e30..07e46012 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,5 @@
+add_subdirectory(test)
add_subdirectory(parser)
add_subdirectory(liborcus)
add_subdirectory(spreadsheet)
@@ -123,7 +124,12 @@ set(_TESTS
)
foreach(_TEST ${_TESTS})
- target_link_libraries(${_TEST} orcus-parser-${ORCUS_API_VERSION} orcus-spreadsheet-model-${ORCUS_API_VERSION} orcus-${ORCUS_API_VERSION})
+ target_link_libraries(${_TEST}
+ orcus-parser-${ORCUS_API_VERSION}
+ orcus-spreadsheet-model-${ORCUS_API_VERSION}
+ orcus-${ORCUS_API_VERSION}
+ orcus-test
+ )
target_compile_definitions(${_TEST} PRIVATE
SRCDIR="${PROJECT_SOURCE_DIR}"
diff --git a/src/liborcus/CMakeLists.txt b/src/liborcus/CMakeLists.txt
index b5bd5073..aa432bc6 100644
--- a/src/liborcus/CMakeLists.txt
+++ b/src/liborcus/CMakeLists.txt
@@ -134,7 +134,11 @@ foreach(_TEST ${_TESTS})
set(_TEST_FILE ${_TEST}.cpp)
string(REPLACE "-" "_" _TEST_FILE ${_TEST_FILE})
add_executable(${_TEST} EXCLUDE_FROM_ALL ${_TEST_FILE})
- target_link_libraries(${_TEST} orcus-${ORCUS_API_VERSION} orcus-parser-${ORCUS_API_VERSION})
+ target_link_libraries(${_TEST}
+ orcus-${ORCUS_API_VERSION}
+ orcus-parser-${ORCUS_API_VERSION}
+ orcus-test
+ )
target_compile_definitions(${_TEST} PRIVATE
SRCDIR="${PROJECT_SOURCE_DIR}"
)
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
new file mode 100644
index 00000000..8189209e
--- /dev/null
+++ b/src/test/CMakeLists.txt
@@ -0,0 +1,2 @@
+
+add_library(orcus-test STATIC test_global.cpp)