summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Maher <maherb@brimworks.com>2010-01-30 21:17:41 -0800
committerBrian Maher <maherb@brimworks.com>2010-01-30 21:17:41 -0800
commitb0eeb6cb0c4aeb6009b9eaa03fc599513f9a4268 (patch)
treea6b7407f1c57c84a465e8012f99a7f75b3372408
parent87660482d0a28824afbe20868feb85b5ac550b30 (diff)
downloadyajl-b0eeb6cb0c4aeb6009b9eaa03fc599513f9a4268.tar.gz
Mark project as 'C' project so C++ compiler is not required to be
installed. Also, on Ubuntu, when I explicitly set the build output directory, the tests don't run because the run_tests.sh script assumes that ../build is where the build output directory is.
-rw-r--r--CMakeLists.txt4
-rwxr-xr-xtest/run_tests.sh4
2 files changed, 6 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8dead9e..fded928 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
-PROJECT(YetAnotherJSONParser)
+PROJECT(YetAnotherJSONParser C)
SET (YAJL_MAJOR 1)
SET (YAJL_MINOR 0)
@@ -78,6 +78,6 @@ INCLUDE(YAJLDoc.cmake)
# a test target
ADD_CUSTOM_TARGET(test
- ./run_tests.sh
+ ./run_tests.sh ${CMAKE_CURRENT_BINARY_DIR}/test/yajl_test
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test)
diff --git a/test/run_tests.sh b/test/run_tests.sh
index 174932f..f5063ed 100755
--- a/test/run_tests.sh
+++ b/test/run_tests.sh
@@ -5,6 +5,10 @@ if [[ `uname` == *W32* ]] ; then
DIFF_FLAGS="-wu"
fi
+if [ -z "$testBin" ]; then
+ testBin="$1"
+fi
+
# find test binary on both platforms. allow the caller to force a
# particular test binary (useful for non-cmake build systems).
if [ -z "$testBin" ]; then