ENH: fix errors for unix builds
This commit is contained in:
parent
e2a7c9358f
commit
b56a60d01e
|
@ -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
|
||||
)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
__declspec(dllexport) void foo()
|
||||
#ifdef _WIN32
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
|
||||
void foo()
|
||||
{
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
__declspec(dllimport) void bar();
|
||||
#ifdef _WIN32
|
||||
__declspec(dllimport)
|
||||
#endif
|
||||
void bar();
|
||||
|
||||
int main(int ac, char** av)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue