ENH: fix errors for unix builds

This commit is contained in:
Bill Hoffman 2006-11-29 17:45:55 -05:00
parent e2a7c9358f
commit b56a60d01e
6 changed files with 25 additions and 7 deletions

View File

@ -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
)

View File

@ -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

View File

@ -1,3 +1,7 @@
__declspec(dllexport) void foo()
#ifdef _WIN32
__declspec(dllexport)
#endif
void foo()
{
}

View File

@ -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();
}

View File

@ -1,4 +1,7 @@
__declspec(dllimport) void bar();
#ifdef _WIN32
__declspec(dllimport)
#endif
void bar();
int main(int ac, char** av)
{

View File

@ -127,6 +127,7 @@ CMAKE_CXX_SOURCES="\
cmInstallTargetGenerator \
cmSourceFile \
cmSystemTools \
cmVersion \
cmFileTimeComparison \
cmGlobalUnixMakefileGenerator3 \
cmLocalUnixMakefileGenerator3 \