summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-11-29 22:45:55 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-11-29 22:45:55 (GMT)
commitb56a60d01e8b30dec54b118bc7738ec199a459d4 (patch)
treefcde7271a01841867f2e5d73d0ae999ed88c76b3
parente2a7c9358f24ac98ae7279491f010bd8f82a8692 (diff)
downloadCMake-b56a60d01e8b30dec54b118bc7738ec199a459d4.zip
CMake-b56a60d01e8b30dec54b118bc7738ec199a459d4.tar.gz
CMake-b56a60d01e8b30dec54b118bc7738ec199a459d4.tar.bz2
ENH: fix errors for unix builds
-rw-r--r--Source/CMakeLists.txt8
-rw-r--r--Source/cmake.cxx2
-rw-r--r--Tests/LibName/bar.c6
-rw-r--r--Tests/LibName/foo.c10
-rw-r--r--Tests/LibName/foobar.c5
-rwxr-xr-xbootstrap1
6 files changed, 25 insertions, 7 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index bd27b33..efe2b9f 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -406,7 +406,11 @@ IF(BUILD_TESTING)
IF(CMAKE_CONFIGURATION_TYPES)
SET(LIBNAME_DIR Debug)
ENDIF(CMAKE_CONFIGURATION_TYPES)
-
+ IF(WIN32)
+ SET(RUN_DIR "${CMake_BINARY_DIR}/Tests/LibName/lib/${LIBNAME_DIR}")
+ ELSE(WIN32)
+ SET(RUN_DIR "${CMake_BINARY_DIR}/Tests/LibName/")
+ ENDIF(WIN32)
ADD_TEST(LibName ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/LibName"
@@ -415,7 +419,7 @@ IF(BUILD_TESTING)
--build-generator ${CMAKE_TEST_GENERATOR}
--build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project LibName
- --build-run-dir "${CMake_BINARY_DIR}/Tests/LibName/lib/${LIBNAME_DIR}"
+ --build-run-dir "${RUN_DIR}"
--test-command foobar
)
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 910ce87..db91e21 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -23,11 +23,11 @@
#include "cmCommand.h"
#include "cmFileTimeComparison.h"
#include "cmGeneratedFileStream.h"
+#include "cmVersion.h"
#if defined(CMAKE_BUILD_WITH_CMAKE)
# include "cmDependsFortran.h" // For -E cmake_copy_f90_mod callback.
# include "cmVariableWatch.h"
-# include "cmVersion.h"
# include <cmsys/Terminal.h>
#endif
diff --git a/Tests/LibName/bar.c b/Tests/LibName/bar.c
index c434bf7..eff5acf 100644
--- a/Tests/LibName/bar.c
+++ b/Tests/LibName/bar.c
@@ -1,3 +1,7 @@
-__declspec(dllexport) void foo()
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+
+ void foo()
{
}
diff --git a/Tests/LibName/foo.c b/Tests/LibName/foo.c
index b068b46..c43cde6 100644
--- a/Tests/LibName/foo.c
+++ b/Tests/LibName/foo.c
@@ -1,5 +1,11 @@
-__declspec(dllimport) void foo();
-__declspec(dllexport) void bar()
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+ void foo();
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
+ void bar()
{
foo();
}
diff --git a/Tests/LibName/foobar.c b/Tests/LibName/foobar.c
index ac22ab3..39f3a82 100644
--- a/Tests/LibName/foobar.c
+++ b/Tests/LibName/foobar.c
@@ -1,4 +1,7 @@
-__declspec(dllimport) void bar();
+#ifdef _WIN32
+__declspec(dllimport)
+#endif
+ void bar();
int main(int ac, char** av)
{
diff --git a/bootstrap b/bootstrap
index eecfead..ea601dd 100755
--- a/bootstrap
+++ b/bootstrap
@@ -127,6 +127,7 @@ CMAKE_CXX_SOURCES="\
cmInstallTargetGenerator \
cmSourceFile \
cmSystemTools \
+ cmVersion \
cmFileTimeComparison \
cmGlobalUnixMakefileGenerator3 \
cmLocalUnixMakefileGenerator3 \