summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-01-17 15:21:45 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-01-17 15:21:45 (GMT)
commit9891260a6dab66c9ea44b5c2e244f3128625baf5 (patch)
tree930651e4383fe1d904cc9c493bd859cb97b530af /Source
parent2694ad76c538333d3ff45613bd1201f97af003cd (diff)
downloadCMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.zip
CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.gz
CMake-9891260a6dab66c9ea44b5c2e244f3128625baf5.tar.bz2
ENH: add support for watcom wmake and wcl386
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt271
-rw-r--r--Source/cmCPluginAPI.cxx104
-rw-r--r--Source/cmCPluginAPI.h121
-rw-r--r--Source/cmGlobalUnixMakefileGenerator3.cxx38
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.cxx65
-rw-r--r--Source/cmGlobalWatcomWMakeGenerator.h50
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx108
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.h7
-rw-r--r--Source/cmStringCommand.h1
-rw-r--r--Source/cmake.cxx3
-rw-r--r--Source/kwsys/Directory.cxx2
-rw-r--r--Source/kwsys/EncodeExecutable.c7
-rw-r--r--Source/kwsys/Glob.cxx2
-rw-r--r--Source/kwsys/ProcessWin32.c3
-rw-r--r--Source/kwsys/Registry.cxx15
-rw-r--r--Source/kwsys/SystemTools.cxx30
-rw-r--r--Source/kwsys/SystemTools.hxx.in1
-rw-r--r--Source/kwsys/kwsysPlatformCxxTests.cxx11
-rw-r--r--Source/kwsys/testRegistry.cxx1
19 files changed, 564 insertions, 276 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 8fdf3f3..52cf699 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -175,6 +175,7 @@ IF (WIN32)
SET(SRCS ${SRCS}
cmGlobalBorlandMakefileGenerator.cxx
cmGlobalNMakeMakefileGenerator.cxx
+ cmGlobalWatcomWMakeGenerator.cxx
cmGlobalMSYSMakefileGenerator.cxx
cmGlobalMinGWMakefileGenerator.cxx
cmGlobalVisualStudio6Generator.cxx
@@ -316,6 +317,15 @@ IF (NOT DART_ROOT)
ENDIF (NOT DART_ROOT)
IF(BUILD_TESTING)
+ SET(CMAKE_TEST_GENERATOR "" CACHE STRING "Generator used when running tests")
+ SET(CMAKE_TEST_MAKEPROGRAM "" CACHE FILEPATH "Generator used when running tests")
+ IF(NOT CMAKE_TEST_GENERATOR)
+ SET(CMAKE_TEST_GENERATOR "${CMAKE_GENERATOR}")
+ SET(CMAKE_TEST_MAKEPROGRAM "${MAKEPROGRAM}")
+ ELSE(NOT CMAKE_TEST_GENERATOR)
+ SET(CMAKE_TEST_DIFFERENT_GENERATOR TRUE)
+ ENDIF(NOT CMAKE_TEST_GENERATOR)
+
# This variable is set by cmake, however to
# test cmake we want to make sure that
# the ctest from this cmake is used for testing
@@ -332,8 +342,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/CommandLineTest"
"${CMake_BINARY_DIR}/Tests/CommandLineTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project CommandLineTest
--test-command CommandLineTest)
@@ -342,8 +352,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/TarTest"
"${CMake_BINARY_DIR}/Tests/TarTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project TestTar
--test-command TestTarExec)
@@ -352,9 +362,9 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/CustomCommand"
"${CMake_BINARY_DIR}/Tests/CustomCommand"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project CustomCommand
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/CustomCommand/bin"
--test-command CustomCommand
)
@@ -364,9 +374,9 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/FindPackageTest"
"${CMake_BINARY_DIR}/Tests/FindPackageTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project FindPackageTest
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command FindPackageTest)
ADD_TEST(SystemInformation ${CMAKE_CTEST_COMMAND}
@@ -374,9 +384,9 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/SystemInformation"
"${CMake_BINARY_DIR}/Tests/SystemInformation"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project DumpInformation
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command DumpInformation)
ADD_TEST(StringFileTest ${CMAKE_CTEST_COMMAND}
@@ -384,9 +394,9 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/StringFileTest"
"${CMake_BINARY_DIR}/Tests/StringFileTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project StringFileTest
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command StringFileTest)
ADD_TEST(MathTest ${CMAKE_CTEST_COMMAND}
@@ -394,18 +404,18 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/MathTest"
"${CMake_BINARY_DIR}/Tests/MathTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project MathTest
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command MathTestExec)
ADD_TEST(TryCompile ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/TryCompile"
"${CMake_BINARY_DIR}/Tests/TryCompile"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project TryCompile
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command TryCompile)
@@ -413,9 +423,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Simple"
"${CMake_BINARY_DIR}/Tests/Simple"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project Simple
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command simple)
@@ -423,9 +433,9 @@ IF(BUILD_TESTING)
# --build-and-test
# "${CMake_SOURCE_DIR}/Tests/SameName"
# "${CMake_BINARY_DIR}/Tests/SameName"
-# --build-generator ${CMAKE_GENERATOR}
+# --build-generator ${CMAKE_TEST_GENERATOR}
# --build-project SameName
-# --build-makeprogram ${MAKEPROGRAM}
+# --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
# --build-two-config
# --test-command
# "${CMake_BINARY_DIR}/Tests/SameName/Exe1/mytest2")
@@ -434,9 +444,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/OutOfSource"
"${CMake_BINARY_DIR}/Tests/OutOfSource"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project OutOfSource
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command
"${CMake_BINARY_DIR}/Tests/OutOfSource/SubDir/OutOfSourceSubdir/simple")
@@ -445,9 +455,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/PreOrder"
"${CMake_BINARY_DIR}/Tests/PreOrder"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project PreOrder
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command simple)
@@ -455,9 +465,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/COnly"
"${CMake_BINARY_DIR}/Tests/COnly"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project conly
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command conly)
@@ -465,9 +475,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/MacroTest"
"${CMake_BINARY_DIR}/Tests/MacroTest"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project littleMacroTest
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command miniMacroTest)
@@ -477,9 +487,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SimpleInstall"
"${CMake_BINARY_DIR}/Tests/SimpleInstall"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project TestSimpleInstall
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
@@ -488,9 +498,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/SimpleInstallS2"
"${CMake_BINARY_DIR}/Tests/SimpleInstallS2"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project TestSimpleInstall
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--build-options
"-DCMAKE_INSTALL_PREFIX:PATH=${SimpleInstallInstallDir}"
@@ -501,9 +511,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/X11"
"${CMake_BINARY_DIR}/Tests/X11"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project UseX11
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command UseX11)
@@ -511,9 +521,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/LoadCommand"
"${CMake_BINARY_DIR}/Tests/LoadCommand"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project LoadedCommand
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command LoadedCommand)
@@ -521,9 +531,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/LoadCommandOneConfig"
"${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project LoadedCommand
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command LoadedCommand
)
@@ -538,10 +548,12 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Complex"
"${CMake_BINARY_DIR}/Tests/Complex"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project complex
- --build-makeprogram ${MAKEPROGRAM}
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Complex/bin"
+ --build-options
+ -DCMAKE_TEST_DIFFERENT_GENERATOR:BOOL=${CMAKE_TEST_DIFFERENT_GENERATOR}
--test-command complex
)
@@ -549,9 +561,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/ComplexOneConfig"
"${CMake_BINARY_DIR}/Tests/ComplexOneConfig"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project complex
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexOneConfig/bin"
--test-command complex)
@@ -559,9 +571,9 @@ IF(BUILD_TESTING)
# --build-and-test
# "${CMake_SOURCE_DIR}/Tests/ComplexRelativePaths"
# "${CMake_BINARY_DIR}/Tests/ComplexRelativePaths"
-# --build-generator ${CMAKE_GENERATOR}
+# --build-generator ${CMAKE_TEST_GENERATOR}
# --build-project complex
-# --build-makeprogram ${MAKEPROGRAM}
+# --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
# --build-exe-dir "${CMake_BINARY_DIR}/Tests/ComplexRelativePaths/bin"
# --build-options -DCMAKE_USE_RELATIVE_PATHS:BOOL=ON
# --test-command complex)
@@ -572,9 +584,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Example"
"${CMake_BINARY_DIR}/Example"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project HELLO
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Example/Demo"
--test-command helloDemo
)
@@ -584,8 +596,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Tutorial/Step1"
"${CMake_BINARY_DIR}/Tests/Tutorial/Step1"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Tutorial
--test-command Tutorial 25.0)
@@ -594,8 +606,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Tutorial/Step2"
"${CMake_BINARY_DIR}/Tests/Tutorial/Step2"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Tutorial
--test-command Tutorial 25.0)
@@ -604,8 +616,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Tutorial/Step3"
"${CMake_BINARY_DIR}/Tests/Tutorial/Step3"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Tutorial
--test-command Tutorial 25.0)
@@ -614,8 +626,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Tutorial/Step4"
"${CMake_BINARY_DIR}/Tests/Tutorial/Step4"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Tutorial
--test-command Tutorial 25.0)
@@ -624,8 +636,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Tutorial/Step5"
"${CMake_BINARY_DIR}/Tests/Tutorial/Step5"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Tutorial
--test-command Tutorial 25.0)
@@ -633,9 +645,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Testing"
"${CMake_BINARY_DIR}/Tests/Testing"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project testing
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Testing/bin"
--test-command testing
)
@@ -644,9 +656,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Wrapping"
"${CMake_BINARY_DIR}/Tests/Wrapping"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project wrapping
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--test-command wrapping
)
@@ -663,9 +675,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Wrapping"
"${CMake_BINARY_DIR}/Tests/Wrapping"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project Wrapping
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--test-command qtwrapping
)
@@ -675,8 +687,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/TestDriver"
"${CMake_BINARY_DIR}/Tests/TestDriver"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--build-project TestDriverTest
--test-command TestDriverTest test1
@@ -686,8 +698,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/TestDriver"
"${CMake_BINARY_DIR}/Tests/TestDriver"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--build-project TestDriverTest
--test-command TestDriverTest test2
@@ -697,8 +709,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/TestDriver"
"${CMake_BINARY_DIR}/Tests/TestDriver"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Wrapping/bin"
--build-project TestDriverTest
--test-command TestDriverTest subdir/test3
@@ -710,8 +722,8 @@ IF(BUILD_TESTING)
"${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec"
--build-project Dependency
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-options
-DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
--test-command exec
@@ -723,8 +735,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Dependency"
"${CMake_BINARY_DIR}/Tests/Dependency/WOLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WOLibOut/Exec"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Dependency
--test-command exec
)
@@ -734,8 +746,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Dependency"
"${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec2"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Dependency
--build-options
-DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
@@ -747,8 +759,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Dependency"
"${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec3"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Dependency
--build-options
-DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
@@ -759,8 +771,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/Dependency"
"${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Exec4"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Dependency
--build-options
-DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Dependency/WithLibOut/Lib
@@ -773,8 +785,8 @@ IF(BUILD_TESTING)
"${CMake_BINARY_DIR}/Tests/Jump/WithLibOut"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Jump/WithLibOut/Executable"
--build-project Jump
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-options
-DLIBRARY_OUTPUT_PATH:PATH=${CMake_BINARY_DIR}/Tests/Jump/WithLibOut/Lib
--test-command jumpExecutable
@@ -787,8 +799,8 @@ IF(BUILD_TESTING)
--build-exe-dir "${CMake_BINARY_DIR}/Tests/Jump/NoLibOut/Executable"
--build-run-dir "${CMake_BINARY_DIR}/Tests/Jump/NoLibOut/Executable"
--build-project Jump
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command jumpExecutable
)
@@ -797,8 +809,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/LinkLine"
"${CMake_BINARY_DIR}/Tests/LinkLine"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLine"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project Linkline
--test-command Exec
)
@@ -807,8 +819,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/LinkLineOrder"
"${CMake_BINARY_DIR}/Tests/LinkLineOrder"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
--build-project LinkLineOrder
--test-command Exec1
@@ -819,8 +831,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/LinkLineOrder"
"${CMake_BINARY_DIR}/Tests/LinkLineOrder"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/LinkLineOrder"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project LinkLineOrder
--test-command Exec2
)
@@ -829,23 +841,26 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/ExternalOBJ"
"${CMake_BINARY_DIR}/Tests/ExternalOBJ"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project ExternalOBJ
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/ExternalOBJ"
--test-command executable
)
- ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND}
- --build-and-test
- "${CMake_SOURCE_DIR}/Source/kwsys"
- "${CMake_BINARY_DIR}/Tests/kwsys"
- --build-exe-dir "${CMake_BINARY_DIR}/Tests/kwsys"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
- --build-project kwsys
- --test-command testIOS
- )
+ IF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+ ADD_TEST(kwsys ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Source/kwsys"
+ "${CMake_BINARY_DIR}/Tests/kwsys"
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/kwsys"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-project kwsys
+ --test-command testIOS
+ )
+ ENDIF(NOT CMAKE_TEST_DIFFERENT_GENERATOR)
+
IF (WIN32)
ADD_TEST(SubDir ${CMAKE_CTEST_COMMAND}
@@ -853,8 +868,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/SubDir"
"${CMake_BINARY_DIR}/Tests/SubDir"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/SubDir/Executable"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project SUBDIR
--test-command test
"${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere"
@@ -866,8 +881,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/SubDir"
"${CMake_BINARY_DIR}/Tests/SubDir"
--build-exe-dir "${CMake_BINARY_DIR}/Tests/SubDir/Executable"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project SUBDIR
--test-command test
"${CMake_BINARY_DIR}/Tests/SubDir/ShouldBeHere"
@@ -875,30 +890,30 @@ IF(BUILD_TESTING)
)
ENDIF (WIN32)
- IF("${CMAKE_GENERATOR}" MATCHES "Makefile")
+ IF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
ADD_TEST(MakeClean ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/MakeClean"
"${CMake_BINARY_DIR}/Tests/MakeClean"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project MakeClean
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir "${CMake_BINARY_DIR}/MakeClean"
--test-command check_clean
)
- ENDIF("${CMAKE_GENERATOR}" MATCHES "Makefile")
+ ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile")
- IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+ IF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio")
ADD_TEST(VSExternalInclude ${CMAKE_CTEST_COMMAND}
--build-and-test
"${CMake_SOURCE_DIR}/Tests/VSExternalInclude"
"${CMake_BINARY_DIR}/Tests/VSExternalInclude"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project VSExternalInclude
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--test-command VSExternalInclude)
- ENDIF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
+ ENDIF(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio")
IF (APPLE AND CMAKE_COMPILER_IS_GNUCXX)
ADD_TEST(BundleTest ${CMAKE_CTEST_COMMAND}
@@ -906,8 +921,8 @@ IF(BUILD_TESTING)
"${CMake_SOURCE_DIR}/Tests/BundleTest"
"${CMake_BINARY_DIR}/Tests/BundleTest"
--build-two-config
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project BundleTest
--test-command BundleTest.app/Contents/MacOS/BundleTest)
@@ -915,8 +930,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/ObjC++"
"${CMake_BINARY_DIR}/Tests/ObjC++"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-project objc++
--test-command objc++
)
@@ -943,9 +958,9 @@ IF(BUILD_TESTING)
)
ENDIF (CTEST_TEST_CTEST AND CMAKE_RUN_LONG_TESTS)
- IF("${CMAKE_GENERATOR}" MATCHES Xcode)
+ IF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode)
SET(CMAKE_SKIP_BOOTSTRAP_TEST 1)
- ENDIF("${CMAKE_GENERATOR}" MATCHES Xcode)
+ ENDIF("${CMAKE_TEST_GENERATOR}" MATCHES Xcode)
IF(EXISTS "${CMAKE_BINARY_DIR}/CMakeLists.txt")
# If there is CMakeLists.txt in the binary tree, assume in-source build
SET(CMAKE_SKIP_BOOTSTRAP_TEST 1)
@@ -958,11 +973,11 @@ IF(BUILD_TESTING)
--build-nocmake
--build-noclean
--build-makeprogram ${CMake_SOURCE_DIR}/bootstrap
- --build-generator "${CMAKE_GENERATOR}"
+ --build-generator "${CMAKE_TEST_GENERATOR}"
--test-command ${CMake_BINARY_DIR}/Tests/BootstrapTest/Bootstrap.cmk/cmake)
ENDIF(UNIX AND CMAKE_RUN_LONG_TESTS AND NOT CMAKE_SKIP_BOOTSTRAP_TEST)
- IF(CMAKE_GENERATOR MATCHES "Makefiles")
+ IF(CMAKE_TEST_GENERATOR MATCHES "Makefiles")
# see if we can find a fortran compiler on the machine
# if so, add the fortran test and see if it works.
SET(CMAKE_Fortran_COMPILER_LIST ifort ifc efc f95 pgf95
@@ -975,9 +990,9 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Fortran"
"${CMake_BINARY_DIR}/Tests/Fortran"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project testf
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--test-command testf)
ENDIF(CMAKE_Fortran_COMPILER_FULLPATH)
@@ -995,16 +1010,16 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/Java"
"${CMake_BINARY_DIR}/Tests/Java"
- --build-generator ${CMAKE_GENERATOR}
+ --build-generator ${CMAKE_TEST_GENERATOR}
--build-project hello
- --build-makeprogram ${MAKEPROGRAM}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-two-config
--build-run-dir "${CMake_BINARY_DIR}/Tests/Java/"
--test-command ${JAVA_RUNTIME} -classpath hello.jar HelloWorld)
ENDIF("${JNI_FILE}" MATCHES "JDK1_2")
ENDIF(JNI_H)
ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
- ENDIF(CMAKE_GENERATOR MATCHES "Makefiles")
+ ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles")
IF (CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE OR WXWINDOWS_INCLUDE_DIR)
# Will be set if the wxwindows gui is on
@@ -1012,8 +1027,8 @@ IF(BUILD_TESTING)
--build-and-test
"${CMake_SOURCE_DIR}/Tests/UseWX"
"${CMake_BINARY_DIR}/Tests/UseWX"
- --build-generator ${CMAKE_GENERATOR}
- --build-makeprogram ${MAKEPROGRAM}
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
--build-exe-dir ${CMake_BINARY_DIR}/Tests/UseWX
--build-project UsewxWindows
--build-options -DCMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE:FILEPATH=${CMAKE_WXWINDOWS_WXCONFIG_EXECUTABLE}
diff --git a/Source/cmCPluginAPI.cxx b/Source/cmCPluginAPI.cxx
index b460318..ba37864 100644
--- a/Source/cmCPluginAPI.cxx
+++ b/Source/cmCPluginAPI.cxx
@@ -27,17 +27,17 @@
extern "C"
{
-void *cmGetClientData(void *info)
+void CCONV *cmGetClientData(void *info)
{
return ((cmLoadedCommandInfo *)info)->ClientData;
}
-void cmSetClientData(void *info, void *cd)
+void CCONV cmSetClientData(void *info, void *cd)
{
((cmLoadedCommandInfo *)info)->ClientData = cd;
}
-void cmSetError(void *info, const char *err)
+void CCONV cmSetError(void *info, const char *err)
{
if (((cmLoadedCommandInfo *)info)->Error)
{
@@ -46,35 +46,35 @@ void cmSetError(void *info, const char *err)
((cmLoadedCommandInfo *)info)->Error = strdup(err);
}
-unsigned int cmGetCacheMajorVersion(void *arg)
+unsigned int CCONV cmGetCacheMajorVersion(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetCacheMajorVersion();
}
-unsigned int cmGetCacheMinorVersion(void *arg)
+unsigned int CCONV cmGetCacheMinorVersion(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetCacheMinorVersion();
}
-unsigned int cmGetMajorVersion(void *)
+unsigned int CCONV cmGetMajorVersion(void *)
{
return cmMakefile::GetMajorVersion();
}
-unsigned int cmGetMinorVersion(void *)
+unsigned int CCONV cmGetMinorVersion(void *)
{
return cmMakefile::GetMinorVersion();
}
-void cmAddDefinition(void *arg, const char* name, const char* value)
+void CCONV cmAddDefinition(void *arg, const char* name, const char* value)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
mf->AddDefinition(name,value);
}
/* Add a definition to this makefile and the global cmake cache. */
-void cmAddCacheDefinition(void *arg, const char* name, const char* value,
+void CCONV cmAddCacheDefinition(void *arg, const char* name, const char* value,
const char* doc,
int type)
{
@@ -109,75 +109,75 @@ void cmAddCacheDefinition(void *arg, const char* name, const char* value,
}
}
-const char* cmGetProjectName(void *arg)
+const char* CCONV cmGetProjectName(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetProjectName();
}
-const char* cmGetHomeDirectory(void *arg)
+const char* CCONV cmGetHomeDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetHomeDirectory();
}
-const char* cmGetHomeOutputDirectory(void *arg)
+const char* CCONV cmGetHomeOutputDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetHomeOutputDirectory();
}
-const char* cmGetStartDirectory(void *arg)
+const char* CCONV cmGetStartDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetStartDirectory();
}
-const char* cmGetStartOutputDirectory(void *arg)
+const char* CCONV cmGetStartOutputDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetStartOutputDirectory();
}
-const char* cmGetCurrentDirectory(void *arg)
+const char* CCONV cmGetCurrentDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetCurrentDirectory();
}
-const char* cmGetCurrentOutputDirectory(void *arg)
+const char* CCONV cmGetCurrentOutputDirectory(void *arg)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetCurrentOutputDirectory();
}
-const char* cmGetDefinition(void *arg,const char*def)
+const char* CCONV cmGetDefinition(void *arg,const char*def)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return mf->GetDefinition(def);
}
-int cmIsOn(void *arg, const char* name)
+int CCONV cmIsOn(void *arg, const char* name)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return static_cast<int>(mf->IsOn(name));
}
/** Check if a command exists. */
-int cmCommandExists(void *arg, const char* name)
+int CCONV cmCommandExists(void *arg, const char* name)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return static_cast<int>(mf->CommandExists(name));
}
-void cmAddDefineFlag(void *arg, const char* definition)
+void CCONV cmAddDefineFlag(void *arg, const char* definition)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
mf->AddDefineFlag(definition);
}
-void cmAddLinkDirectoryForTarget(void *arg, const char *tgt, const char* d)
+void CCONV cmAddLinkDirectoryForTarget(void *arg, const char *tgt, const char* d)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
mf->AddLinkDirectoryForTarget(tgt,d);
}
-void cmAddExecutable(void *arg, const char *exename,
+void CCONV cmAddExecutable(void *arg, const char *exename,
int numSrcs, const char **srcs, int win32)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
@@ -194,7 +194,7 @@ void cmAddExecutable(void *arg, const char *exename,
}
}
-void cmAddUtilityCommand(void *arg, const char* utilityName,
+void CCONV cmAddUtilityCommand(void *arg, const char* utilityName,
const char* command,
const char* arguments,
int all,
@@ -242,7 +242,7 @@ void cmAddUtilityCommand(void *arg, const char* utilityName,
mf->AddUtilityCommand(utilityName, (all ? true : false),
output, depends2, commandLines);
}
-void cmAddCustomCommand(void *arg, const char* source,
+void CCONV cmAddCustomCommand(void *arg, const char* source,
const char* command,
int numArgs, const char **args,
int numDepends, const char **depends,
@@ -287,7 +287,7 @@ void cmAddCustomCommand(void *arg, const char* source,
commandLines, no_comment);
}
-void cmAddCustomCommandToOutput(void *arg, const char* output,
+void CCONV cmAddCustomCommandToOutput(void *arg, const char* output,
const char* command,
int numArgs, const char **args,
const char* main_dependency,
@@ -323,7 +323,7 @@ void cmAddCustomCommandToOutput(void *arg, const char* output,
commandLines, no_comment);
}
-void cmAddCustomCommandToTarget(void *arg, const char* target,
+void CCONV cmAddCustomCommandToTarget(void *arg, const char* target,
const char* command,
int numArgs, const char **args,
int commandType)
@@ -366,7 +366,7 @@ void cmAddCustomCommandToTarget(void *arg, const char* target,
cctype, no_comment);
}
-void cmAddLinkLibraryForTarget(void *arg, const char *tgt, const char*value,
+void CCONV cmAddLinkLibraryForTarget(void *arg, const char *tgt, const char*value,
int libtype)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
@@ -385,7 +385,7 @@ void cmAddLinkLibraryForTarget(void *arg, const char *tgt, const char*value,
}
}
-void cmAddLibrary(void *arg, const char *libname, int shared,
+void CCONV cmAddLibrary(void *arg, const char *libname, int shared,
int numSrcs, const char **srcs)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
@@ -398,7 +398,7 @@ void cmAddLibrary(void *arg, const char *libname, int shared,
mf->AddLibrary(libname, (shared ? true : false), srcs2);
}
-char *cmExpandVariablesInString(void *arg, const char *source,
+char CCONV *cmExpandVariablesInString(void *arg, const char *source,
int escapeQuotes, int atOnly)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
@@ -417,7 +417,7 @@ char *cmExpandVariablesInString(void *arg, const char *source,
}
-int cmExecuteCommand(void *arg, const char *name,
+int CCONV cmExecuteCommand(void *arg, const char *name,
int numArgs, const char **args)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
@@ -432,7 +432,7 @@ int cmExecuteCommand(void *arg, const char *name,
return mf->ExecuteCommand(lff);
}
-void cmExpandSourceListArguments(void *arg,
+void CCONV cmExpandSourceListArguments(void *arg,
int numArgs,
const char **args,
int *resArgc,
@@ -462,7 +462,7 @@ void cmExpandSourceListArguments(void *arg,
*resArgv = resargv;
}
-void cmFreeArguments(int argc, char **argv)
+void CCONV cmFreeArguments(int argc, char **argv)
{
int i;
for (i = 0; i < argc; ++i)
@@ -475,7 +475,7 @@ void cmFreeArguments(int argc, char **argv)
}
}
-int cmGetTotalArgumentSize(int argc, char **argv)
+int CCONV cmGetTotalArgumentSize(int argc, char **argv)
{
int i;
int result = 0;
@@ -489,13 +489,13 @@ int cmGetTotalArgumentSize(int argc, char **argv)
return result;
}
-void *cmGetSource(void *arg, const char *name)
+void CCONV *cmGetSource(void *arg, const char *name)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
return (void *)mf->GetSource(name);
}
-void * cmAddSource(void *arg, void *arg2)
+void * CCONV cmAddSource(void *arg, void *arg2)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
cmSourceFile *sf = static_cast<cmSourceFile *>(arg2);
@@ -503,54 +503,54 @@ void * cmAddSource(void *arg, void *arg2)
}
-void * cmCreateSourceFile()
+void * CCONV cmCreateSourceFile()
{
return (void *)(new cmSourceFile);
}
-void cmDestroySourceFile(void *arg)
+void CCONV cmDestroySourceFile(void *arg)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
delete sf;
}
-const char *cmSourceFileGetSourceName(void *arg)
+const char * CCONV cmSourceFileGetSourceName(void *arg)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
return sf->GetSourceName().c_str();
}
-const char *cmSourceFileGetFullPath(void *arg)
+const char * CCONV cmSourceFileGetFullPath(void *arg)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
return sf->GetFullPath().c_str();
}
-const char *cmSourceFileGetProperty(void *arg,const char *prop)
+const char * CCONV cmSourceFileGetProperty(void *arg,const char *prop)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
return sf->GetProperty(prop);
}
-int cmSourceFileGetPropertyAsBool(void *arg,const char *prop)
+int CCONV cmSourceFileGetPropertyAsBool(void *arg,const char *prop)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
return (sf->GetPropertyAsBool(prop) ? 1: 0);
}
-void cmSourceFileSetProperty(void *arg,const char *prop, const char *val)
+void CCONV cmSourceFileSetProperty(void *arg,const char *prop, const char *val)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
sf->SetProperty(prop,val);
}
-void cmSourceFileAddDepend(void *arg, const char *depend)
+void CCONV cmSourceFileAddDepend(void *arg, const char *depend)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
sf->GetDepends().push_back(depend);
}
-void cmSourceFileSetName(void *arg, const char* name, const char* dir,
+void CCONV cmSourceFileSetName(void *arg, const char* name, const char* dir,
int numSourceExtensions,
const char **sourceExtensions,
int numHeaderExtensions,
@@ -571,7 +571,7 @@ void cmSourceFileSetName(void *arg, const char* name, const char* dir,
sf->SetName(name,dir, srcs, hdrs);
}
-void cmSourceFileSetName2(void *arg, const char* name, const char* dir,
+void CCONV cmSourceFileSetName2(void *arg, const char* name, const char* dir,
const char *ext, int headerFileOnly)
{
cmSourceFile *sf = static_cast<cmSourceFile *>(arg);
@@ -579,7 +579,7 @@ void cmSourceFileSetName2(void *arg, const char* name, const char* dir,
}
-char *cmGetFilenameWithoutExtension(const char *name)
+char * CCONV cmGetFilenameWithoutExtension(const char *name)
{
std::string sres = cmSystemTools::GetFilenameWithoutExtension(name);
char *result = (char *)malloc(sres.size()+1);
@@ -587,7 +587,7 @@ char *cmGetFilenameWithoutExtension(const char *name)
return result;
}
-char *cmGetFilenamePath(const char *name)
+char * CCONV cmGetFilenamePath(const char *name)
{
std::string sres = cmSystemTools::GetFilenamePath(name);
char *result = (char *)malloc(sres.size()+1);
@@ -595,7 +595,7 @@ char *cmGetFilenamePath(const char *name)
return result;
}
-char *cmCapitalized(const char *name)
+char * CCONV cmCapitalized(const char *name)
{
std::string sres = cmSystemTools::Capitalized(name);
char *result = (char *)malloc(sres.size()+1);
@@ -603,23 +603,23 @@ char *cmCapitalized(const char *name)
return result;
}
-void cmCopyFileIfDifferent(const char *name1, const char *name2)
+void CCONV cmCopyFileIfDifferent(const char *name1, const char *name2)
{
cmSystemTools::CopyFileIfDifferent(name1,name2);
}
-void cmRemoveFile(const char *name)
+void CCONV cmRemoveFile(const char *name)
{
cmSystemTools::RemoveFile(name);
}
-void cmDisplayStatus(void *arg, const char* message)
+void CCONV cmDisplayStatus(void *arg, const char* message)
{
cmMakefile *mf = static_cast<cmMakefile *>(arg);
mf->DisplayStatus(message, -1);
}
-void cmFree(void *data)
+void CCONV cmFree(void *data)
{
free(data);
}
diff --git a/Source/cmCPluginAPI.h b/Source/cmCPluginAPI.h
index 246e458..2910028 100644
--- a/Source/cmCPluginAPI.h
+++ b/Source/cmCPluginAPI.h
@@ -31,7 +31,12 @@
#ifdef __cplusplus
extern "C" {
#endif
-
+
+#ifdef __WATCOMC__
+#define CCONV __cdecl
+#else
+#define CCONV
+#endif
/*=========================================================================
this is the structure of function entry points that a plugin may call. This
structure must be kept in sync with the static decaled at the bottom of
@@ -46,67 +51,67 @@ typedef struct
/* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
information is passed from the InitialPass to FInalPass for commands
that need a FinalPass and need information from the InitialPass */
- void *(*GetClientData) (void *info);
+ void *(CCONV *GetClientData) (void *info);
/* return the summed size in characters of all the arguments */
- int (*GetTotalArgumentSize) (int argc, char **argv);
+ int (CCONV *GetTotalArgumentSize) (int argc, char **argv);
/* free all the memory associated with an argc, argv pair */
- void (*FreeArguments) (int argc, char **argv);
+ void (CCONV *FreeArguments) (int argc, char **argv);
/* set/Get the ClientData in the cmLoadedCommandInfo structure, this is how
information is passed from the InitialPass to FInalPass for commands
that need a FinalPass and need information from the InitialPass */
- void (*SetClientData) (void *info, void *cd);
+ void (CCONV *SetClientData) (void *info, void *cd);
/* when an error occurs, call this function to set the error string */
- void (*SetError) (void *info, const char *err);
+ void (CCONV *SetError) (void *info, const char *err);
/*=========================================================================
The following functions all directly map to methods in the cmMakefile
class. See cmMakefile.h for descriptions of what each method does. All of
these methods take the void * makefile pointer as their first argument.
=========================================================================*/
- void (*AddCacheDefinition) (void *mf, const char* name,
+ void (CCONV *AddCacheDefinition) (void *mf, const char* name,
const char* value,
const char* doc, int cachetype);
- void (*AddCustomCommand) (void *mf, const char* source,
+ void (CCONV *AddCustomCommand) (void *mf, const char* source,
const char* command,
int numArgs, const char **args,
int numDepends, const char **depends,
int numOutputs, const char **outputs,
const char *target);
- void (*AddDefineFlag) (void *mf, const char* definition);
- void (*AddDefinition) (void *mf, const char* name, const char* value);
- void (*AddExecutable) (void *mf, const char *exename,
+ void (CCONV *AddDefineFlag) (void *mf, const char* definition);
+ void (CCONV *AddDefinition) (void *mf, const char* name, const char* value);
+ void (CCONV *AddExecutable) (void *mf, const char *exename,
int numSrcs, const char **srcs, int win32);
- void (*AddLibrary) (void *mf, const char *libname,
+ void (CCONV *AddLibrary) (void *mf, const char *libname,
int shared, int numSrcs, const char **srcs);
- void (*AddLinkDirectoryForTarget) (void *mf, const char *tgt,
+ void (CCONV *AddLinkDirectoryForTarget) (void *mf, const char *tgt,
const char* d);
- void (*AddLinkLibraryForTarget) (void *mf, const char *tgt,
+ void (CCONV *AddLinkLibraryForTarget) (void *mf, const char *tgt,
const char *libname, int libtype);
- void (*AddUtilityCommand) (void *mf, const char* utilityName,
+ void (CCONV *AddUtilityCommand) (void *mf, const char* utilityName,
const char *command, const char *arguments,
int all, int numDepends, const char **depends,
int numOutputs, const char **outputs);
- int (*CommandExists) (void *mf, const char* name);
- int (*ExecuteCommand) (void *mf, const char *name,
+ int (CCONV *CommandExists) (void *mf, const char* name);
+ int (CCONV *ExecuteCommand) (void *mf, const char *name,
int numArgs, const char **args);
- void (*ExpandSourceListArguments) (void *mf,int argc, const char **argv,
+ void (CCONV *ExpandSourceListArguments) (void *mf,int argc, const char **argv,
int *resArgc, char ***resArgv,
unsigned int startArgumentIndex);
- char *(*ExpandVariablesInString) (void *mf, const char *source,
+ char *(CCONV *ExpandVariablesInString) (void *mf, const char *source,
int escapeQuotes, int atOnly);
- unsigned int (*GetCacheMajorVersion) (void *mf);
- unsigned int (*GetCacheMinorVersion) (void *mf);
- const char* (*GetCurrentDirectory) (void *mf);
- const char* (*GetCurrentOutputDirectory) (void *mf);
- const char* (*GetDefinition) (void *mf, const char *def);
- const char* (*GetHomeDirectory) (void *mf);
- const char* (*GetHomeOutputDirectory) (void *mf);
- unsigned int (*GetMajorVersion) (void *mf);
- unsigned int (*GetMinorVersion) (void *mf);
- const char* (*GetProjectName) (void *mf);
- const char* (*GetStartDirectory) (void *mf);
- const char* (*GetStartOutputDirectory) (void *mf);
- int (*IsOn) (void *mf, const char* name);
+ unsigned int (CCONV *GetCacheMajorVersion) (void *mf);
+ unsigned int (CCONV *GetCacheMinorVersion) (void *mf);
+ const char* (CCONV *GetCurrentDirectory) (void *mf);
+ const char* (CCONV *GetCurrentOutputDirectory) (void *mf);
+ const char* (CCONV *GetDefinition) (void *mf, const char *def);
+ const char* (CCONV *GetHomeDirectory) (void *mf);
+ const char* (CCONV *GetHomeOutputDirectory) (void *mf);
+ unsigned int (CCONV *GetMajorVersion) (void *mf);
+ unsigned int (CCONV *GetMinorVersion) (void *mf);
+ const char* (CCONV *GetProjectName) (void *mf);
+ const char* (CCONV *GetStartDirectory) (void *mf);
+ const char* (CCONV *GetStartOutputDirectory) (void *mf);
+ int (CCONV *IsOn) (void *mf, const char* name);
/*=========================================================================
@@ -114,23 +119,23 @@ typedef struct
cmSourceFiles. Please see cmSourceFile.h for additional information on many
of these methods. Some of these methods are in cmMakefile.h.
=========================================================================*/
- void *(*AddSource) (void *mf, void *sf);
- void *(*CreateSourceFile) ();
- void (*DestroySourceFile) (void *sf);
- void *(*GetSource) (void *mf, const char* sourceName);
- void (*SourceFileAddDepend) (void *sf, const char *depend);
- const char *(*SourceFileGetProperty) (void *sf, const char *prop);
- int (*SourceFileGetPropertyAsBool) (void *sf, const char *prop);
- const char *(*SourceFileGetSourceName) (void *sf);
- const char *(*SourceFileGetFullPath) (void *sf);
- void (*SourceFileSetName) (void *sf, const char* name, const char* dir,
+ void *(CCONV *AddSource) (void *mf, void *sf);
+ void *(CCONV *CreateSourceFile) ();
+ void (CCONV *DestroySourceFile) (void *sf);
+ void *(CCONV *GetSource) (void *mf, const char* sourceName);
+ void (CCONV *SourceFileAddDepend) (void *sf, const char *depend);
+ const char *(CCONV *SourceFileGetProperty) (void *sf, const char *prop);
+ int (CCONV *SourceFileGetPropertyAsBool) (void *sf, const char *prop);
+ const char *(CCONV *SourceFileGetSourceName) (void *sf);
+ const char *(CCONV *SourceFileGetFullPath) (void *sf);
+ void (CCONV *SourceFileSetName) (void *sf, const char* name, const char* dir,
int numSourceExtensions,
const char **sourceExtensions,
int numHeaderExtensions,
const char **headerExtensions);
- void (*SourceFileSetName2) (void *sf, const char* name, const char* dir,
+ void (CCONV *SourceFileSetName2) (void *sf, const char* name, const char* dir,
const char *ext, int headerFileOnly);
- void (*SourceFileSetProperty) (void *sf, const char *prop,
+ void (CCONV *SourceFileSetProperty) (void *sf, const char *prop,
const char *value);
@@ -138,28 +143,28 @@ typedef struct
The following methods are from cmSystemTools.h see that file for specific
documentation on each method.
=========================================================================*/
- char *(*Capitalized)(const char *);
- void (*CopyFileIfDifferent)(const char *f1, const char *f2);
- char *(*GetFilenameWithoutExtension)(const char *);
- char *(*GetFilenamePath)(const char *);
- void (*RemoveFile)(const char *f1);
- void (*Free)(void *);
+ char *(CCONV *Capitalized)(const char *);
+ void (CCONV *CopyFileIfDifferent)(const char *f1, const char *f2);
+ char *(CCONV *GetFilenameWithoutExtension)(const char *);
+ char *(CCONV *GetFilenamePath)(const char *);
+ void (CCONV *RemoveFile)(const char *f1);
+ void (CCONV *Free)(void *);
/*=========================================================================
The following are new functions added after 1.6
=========================================================================*/
- void (*AddCustomCommandToOutput) (void *mf, const char* output,
+ void (CCONV *AddCustomCommandToOutput) (void *mf, const char* output,
const char* command,
int numArgs, const char **args,
const char* main_dependency,
int numDepends, const char **depends);
- void (*AddCustomCommandToTarget) (void *mf, const char* target,
+ void (CCONV *AddCustomCommandToTarget) (void *mf, const char* target,
const char* command,
int numArgs, const char **args,
int commandType);
/* display status information */
- void (*DisplaySatus) (void *info, const char *message);
+ void (CCONV *DisplaySatus) (void *info, const char *message);
/* this is the end of the C function stub API structure */
} cmCAPI;
@@ -202,11 +207,11 @@ define the different types of custom commands for a target
/*=========================================================================
Finally we define the key data structures and function prototypes
=========================================================================*/
- typedef const char* (*CM_DOC_FUNCTION)();
- typedef int (*CM_INITIAL_PASS_FUNCTION)(void *info, void *mf,
+ typedef const char* (CCONV *CM_DOC_FUNCTION)();
+ typedef int (CCONV *CM_INITIAL_PASS_FUNCTION)(void *info, void *mf,
int argc, char *[]);
- typedef void (*CM_FINAL_PASS_FUNCTION)(void *info, void *mf);
- typedef void (*CM_DESTRUCTOR_FUNCTION)(void *info);
+ typedef void (CCONV *CM_FINAL_PASS_FUNCTION)(void *info, void *mf);
+ typedef void (CCONV *CM_DESTRUCTOR_FUNCTION)(void *info);
typedef struct {
unsigned long reserved1; /* Reserved for future use. DO NOT USE. */
@@ -223,7 +228,7 @@ Finally we define the key data structures and function prototypes
void *ClientData;
} cmLoadedCommandInfo;
- typedef void (*CM_INIT_FUNCTION)(cmLoadedCommandInfo *);
+ typedef void (CCONV *CM_INIT_FUNCTION)(cmLoadedCommandInfo *);
#ifdef __cplusplus
}
diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx
index 4117791..d76b6be 100644
--- a/Source/cmGlobalUnixMakefileGenerator3.cxx
+++ b/Source/cmGlobalUnixMakefileGenerator3.cxx
@@ -135,6 +135,11 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
// target so that make with no arguments will run it.
// Just depend on the all target to drive the build.
std::vector<std::string> depends;
+ const char* sym = lg->GetMakefile()->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
std::vector<std::string> no_commands;
depends.push_back("all");
@@ -146,10 +151,16 @@ void cmGlobalUnixMakefileGenerator3::WriteMainMakefile2()
depends,
no_commands);
+ depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
+
// Write and empty all:
lg->WriteMakeRule(makefileStream,
"The main recursive all target", "all",
- no_commands, no_commands);
+ depends, no_commands);
lg->WriteMakeVariables(makefileStream);
@@ -590,6 +601,7 @@ cmGlobalUnixMakefileGenerator3
for (i = 0; i < m_LocalGenerators.size(); ++i)
{
lg = static_cast<cmLocalUnixMakefileGenerator3 *>(m_LocalGenerators[i]);
+ const char* sym = lg->GetMakefile()->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
// for each target Generate the rule files for each target.
cmTargets& targets = lg->GetMakefile()->GetTargets();
@@ -617,7 +629,11 @@ cmGlobalUnixMakefileGenerator3
commands.clear();
commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2",
t->second.GetName()));
- depends.clear();
+ depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
depends.push_back("cmake_check_build_system");
lg->WriteMakeRule(ruleFileStream,
"Build rule for target.",
@@ -695,6 +711,11 @@ cmGlobalUnixMakefileGenerator3
// Write the rule.
localName += "/all";
depends.clear();
+ const char* sym = lg->GetMakefile()->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
this->AppendGlobalTargetDepends(depends,t->second);
lg->WriteMakeRule(ruleFileStream, "All Build rule for target.",
localName.c_str(), depends, commands);
@@ -714,6 +735,10 @@ cmGlobalUnixMakefileGenerator3
commands.push_back(lg->GetRecursiveMakeCall("CMakeFiles/Makefile2",
localName.c_str()));
depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
depends.push_back("cmake_check_build_system");
localName = lg->GetRelativeTargetDirectory(t->second);
localName += "/rule";
@@ -733,6 +758,10 @@ cmGlobalUnixMakefileGenerator3
makeTargetName = localName;
makeTargetName += "/clean";
depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
commands.clear();
commands.push_back(lg->GetRecursiveMakeCall(makefileName.c_str(),
makeTargetName.c_str()));
@@ -905,6 +934,11 @@ void cmGlobalUnixMakefileGenerator3::WriteHelpRule
}
}
}
+ const char* sym = lg->GetMakefile()->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ no_depends.push_back(sym);
+ }
lg->WriteMakeRule(ruleFileStream, "Help Target",
"help:",
no_depends, commands);
diff --git a/Source/cmGlobalWatcomWMakeGenerator.cxx b/Source/cmGlobalWatcomWMakeGenerator.cxx
new file mode 100644
index 0000000..a7c3770
--- /dev/null
+++ b/Source/cmGlobalWatcomWMakeGenerator.cxx
@@ -0,0 +1,65 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#include "cmGlobalWatcomWMakeGenerator.h"
+#include "cmLocalUnixMakefileGenerator3.h"
+#include "cmMakefile.h"
+
+cmGlobalWatcomWMakeGenerator::cmGlobalWatcomWMakeGenerator()
+{
+ m_FindMakeProgramFile = "CMakeFindWMake.cmake";
+ m_ForceUnixPaths = false;
+}
+
+void cmGlobalWatcomWMakeGenerator::EnableLanguage(std::vector<std::string>const& l,
+ cmMakefile *mf)
+{
+ // pick a default
+ mf->AddDefinition("WATCOM", "1");
+ mf->AddDefinition("CMAKE_MANGLE_OBJECT_FILE_NAMES", "1");
+ mf->AddDefinition("CMAKE_WINDOWS_OBJECT_PATH", "1");
+ mf->AddDefinition("CMAKE_MAKE_LINE_CONTINUE", "&");
+ mf->AddDefinition("CMAKE_MAKE_SYMBOLIC_RULE", ".SYMBOLIC");
+ mf->AddDefinition("CMAKE_NO_QUOTED_OBJECTS", "1");
+ mf->AddDefinition("CMAKE_GENERATOR_CC", "wcl386");
+ mf->AddDefinition("CMAKE_GENERATOR_CXX", "wcl386");
+ this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf);
+}
+
+///! Create a local generator appropriate to this Global Generator
+cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
+{
+ cmLocalUnixMakefileGenerator3* lg = new cmLocalUnixMakefileGenerator3;
+ lg->SetSilentNoColon(true);
+ lg->SetEchoNeedsQuote(false);
+ lg->SetDefineWindowsNULL(true);
+ lg->SetWindowsShell(true);
+ lg->SetMakeSilentFlag("-s -h");
+ lg->SetGlobalGenerator(this);
+ lg->SetIgnoreLibPrefix(true);
+ lg->SetPassMakeflags(false);
+ lg->SetUnixCD(false);
+ lg->SetIncludeDirective("!include");
+ return lg;
+}
+
+//----------------------------------------------------------------------------
+void cmGlobalWatcomWMakeGenerator::GetDocumentation(cmDocumentationEntry& entry) const
+{
+ entry.name = this->GetName();
+ entry.brief = "Generates Watcom WMake makefiles.";
+ entry.full = "";
+}
diff --git a/Source/cmGlobalWatcomWMakeGenerator.h b/Source/cmGlobalWatcomWMakeGenerator.h
new file mode 100644
index 0000000..2a36edc
--- /dev/null
+++ b/Source/cmGlobalWatcomWMakeGenerator.h
@@ -0,0 +1,50 @@
+/*=========================================================================
+
+ Program: CMake - Cross-Platform Makefile Generator
+ Module: $RCSfile$
+ Language: C++
+ Date: $Date$
+ Version: $Revision$
+
+ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
+ See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE. See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef cmGlobalWatcomWMakeGenerator_h
+#define cmGlobalWatcomWMakeGenerator_h
+
+#include "cmGlobalUNIXMakefileGenerator3.h"
+
+/** \class cmGlobalWatcomWMakeGenerator
+ * \brief Write a NMake makefiles.
+ *
+ * cmGlobalWatcomWMakeGenerator manages nmake build process for a tree
+ */
+class cmGlobalWatcomWMakeGenerator : public cmGlobalUnixMakefileGenerator3
+{
+public:
+ cmGlobalWatcomWMakeGenerator();
+ static cmGlobalGenerator* New() { return new cmGlobalWatcomWMakeGenerator; }
+ ///! Get the name for the generator.
+ virtual const char* GetName() const {
+ return cmGlobalWatcomWMakeGenerator::GetActualName();}
+ static const char* GetActualName() {return "Watcom WMake";}
+
+ /** Get the documentation entry for this generator. */
+ virtual void GetDocumentation(cmDocumentationEntry& entry) const;
+
+ ///! Create a local generator appropriate to this Global Generator
+ virtual cmLocalGenerator *CreateLocalGenerator();
+
+ /**
+ * Try to determine system infomation such as shared library
+ * extension, pthreads, byte order etc.
+ */
+ virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile *);
+};
+
+#endif
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index c66bdea..8d4c46b 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -41,6 +41,7 @@
//----------------------------------------------------------------------------
cmLocalUnixMakefileGenerator3::cmLocalUnixMakefileGenerator3()
{
+ m_SilentNoColon = false;
m_WindowsShell = false;
m_IncludeDirective = "include";
m_MakefileVariableSize = 0;
@@ -609,7 +610,10 @@ cmLocalUnixMakefileGenerator3
std::string relativeObj = this->GetHomeRelativeOutputPath();
relativeObj += obj;
-
+ if(m_Makefile->GetDefinition("CMAKE_WINDOWS_OBJECT_PATH"))
+ {
+ relativeObj = cmSystemTools::ConvertToOutputPath(relativeObj.c_str());
+ }
// Write the build rule.
// Build the set of compiler flags.
std::string flags;
@@ -849,6 +853,11 @@ cmLocalUnixMakefileGenerator3
// Collect the commands and dependencies.
std::vector<std::string> commands;
std::vector<std::string> depends;
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
// Utility targets store their rules in pre- and post-build commands.
this->AppendCustomDepends(depends, target.GetPreBuildCommands());
@@ -1122,6 +1131,11 @@ cmLocalUnixMakefileGenerator3
// Write special "install" target to run cmake_install.cmake script.
{
std::vector<std::string> depends;
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
std::vector<std::string> commands;
std::string cmd;
if(m_Makefile->GetDefinition("CMake_BINARY_DIR"))
@@ -1150,9 +1164,14 @@ cmLocalUnixMakefileGenerator3
"install", depends, commands);
}
+ std::vector<std::string> no_depends;
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ no_depends.push_back(sym);
+ }
// Write special "rebuild_cache" target to re-run cmake.
{
- std::vector<std::string> no_depends;
std::vector<std::string> commands;
this->AppendEcho(commands, "Running CMake to regenerate build system...");
commands.push_back(
@@ -1168,7 +1187,6 @@ cmLocalUnixMakefileGenerator3
// Otherwise default to the interactive command-line interface.
if(m_Makefile->GetDefinition("CMAKE_EDIT_COMMAND"))
{
- std::vector<std::string> no_depends;
std::vector<std::string> commands;
this->AppendEcho(commands, "Running CMake cache editor...");
commands.push_back(
@@ -1181,7 +1199,6 @@ cmLocalUnixMakefileGenerator3
}
else
{
- std::vector<std::string> no_depends;
std::vector<std::string> commands;
this->AppendEcho(commands,
"Running interactive CMake command-line interface...");
@@ -1201,8 +1218,8 @@ cmLocalUnixMakefileGenerator3
// name of this special target. This gives a make-time choice to
// the user.
std::vector<std::string> commands;
+ no_depends.clear();
commands.clear();
- std::vector<std::string> no_depends;
if(m_Makefile->IsOn("CMAKE_VERBOSE_MAKEFILE"))
{
makefileStream
@@ -1210,12 +1227,18 @@ cmLocalUnixMakefileGenerator3
<< "VERBOSE = 1\n"
<< "\n";
}
-
- this->WriteMakeRule(makefileStream,
- "Suppress display of executed commands.",
- "$(VERBOSE).SILENT",
- no_depends,
- commands);
+ if(m_SilentNoColon)
+ {
+ makefileStream << "$(VERBOSE).SILENT\n";
+ }
+ else
+ {
+ this->WriteMakeRule(makefileStream,
+ "Suppress display of executed commands.",
+ "$(VERBOSE).SILENT",
+ no_depends,
+ commands);
+ }
// Special target to cleanup operation of make tool.
std::vector<std::string> depends;
@@ -1255,6 +1278,12 @@ cmLocalUnixMakefileGenerator3
std::vector<std::string> no_depends;
std::vector<std::string> commands;
commands.push_back(runRule);
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ no_depends.push_back(sym);
+ }
+
this->WriteMakeRule(makefileStream,
"Special rule to run CMake to check the build system "
"integrity.\n"
@@ -1284,6 +1313,11 @@ cmLocalUnixMakefileGenerator3
{
// The helper target depends on the real target.
std::vector<std::string> depends;
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
depends.push_back(realTarget);
// There are no commands.
@@ -1956,12 +1990,25 @@ cmLocalUnixMakefileGenerator3
<< "# Object files for target " << target.GetName() << "\n"
<< variableName.c_str() << " =";
std::string object;
+ const char* objName = m_Makefile->GetDefinition("CMAKE_NO_QUOTED_OBJECTS");
+ const char* lineContinue = m_Makefile->GetDefinition("CMAKE_MAKE_LINE_CONTINUE");
+ if(!lineContinue)
+ {
+ lineContinue = "\\";
+ }
for(std::vector<std::string>::const_iterator i = objects.begin();
i != objects.end(); ++i)
{
ruleFileStream
- << " \\\n"
- << this->ConvertToQuotedOutputPath(i->c_str());
+ << " " << lineContinue << "\n";
+ if(objName)
+ {
+ ruleFileStream << this->Convert(i->c_str(), START_OUTPUT, MAKEFILE);
+ }
+ else
+ {
+ ruleFileStream << this->ConvertToQuotedOutputPath(i->c_str());
+ }
}
ruleFileStream
<< "\n";
@@ -1979,8 +2026,16 @@ cmLocalUnixMakefileGenerator3
{
object = this->Convert(i->c_str(),START_OUTPUT);
ruleFileStream
- << " \\\n"
- << this->ConvertToQuotedOutputPath(object.c_str());
+ << " " << lineContinue << "\n"
+ << m_Makefile->GetSafeDefinition("CMAKE_OBJECT_NAME");
+ if(objName)
+ {
+ ruleFileStream << this->Convert(i->c_str(), START_OUTPUT, MAKEFILE);
+ }
+ else
+ {
+ ruleFileStream << this->ConvertToQuotedOutputPath(i->c_str());
+ }
}
ruleFileStream
<< "\n"
@@ -2053,7 +2108,12 @@ cmLocalUnixMakefileGenerator3
cmTarget& target,
const std::vector<std::string>& files)
{
- std::vector<std::string> no_depends;
+ std::vector<std::string> depends;
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
std::vector<std::string> commands;
// Construct the clean target name.
@@ -2066,7 +2126,7 @@ cmLocalUnixMakefileGenerator3
m_Makefile->GetHomeOutputDirectory());
// Write the rule.
this->WriteMakeRule(ruleFileStream, 0,
- cleanTarget.c_str(), no_depends, commands);
+ cleanTarget.c_str(), depends, commands);
}
@@ -2210,6 +2270,7 @@ cmLocalUnixMakefileGenerator3
std::string
cmLocalUnixMakefileGenerator3::ConvertToQuotedOutputPath(const char* p)
{
+
// Split the path into its components.
std::vector<std::string> components;
cmSystemTools::SplitPath(p, components);
@@ -2894,6 +2955,11 @@ void cmLocalUnixMakefileGenerator3
dir += "/directorystart";
dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
// if at the top the rule is called all
+ const char* sym = m_Makefile->GetDefinition("CMAKE_MAKE_SYMBOLIC_RULE");
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
if (!m_Parent)
{
dir = "all";
@@ -2908,11 +2974,19 @@ void cmLocalUnixMakefileGenerator3
dir = this->Convert(dir.c_str(),HOME_OUTPUT,MAKEFILE);
commands.clear();
depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
this->CreateJumpCommand(commands,"CMakeFiles/Makefile2",dir);
this->WriteMakeRule(ruleFileStream, "The main clean target", "clean", depends, commands);
// write the depend rule, really a recompute depends rule
depends.clear();
+ if(sym)
+ {
+ depends.push_back(sym);
+ }
commands.clear();
std::string cmakefileName = "CMakeFiles/Makefile.cmake";
this->Convert(cmakefileName.c_str(),HOME_OUTPUT,
diff --git a/Source/cmLocalUnixMakefileGenerator3.h b/Source/cmLocalUnixMakefileGenerator3.h
index b7a5b9b..a744b94 100644
--- a/Source/cmLocalUnixMakefileGenerator3.h
+++ b/Source/cmLocalUnixMakefileGenerator3.h
@@ -116,6 +116,12 @@ public:
void SetUnixCD(bool v) {m_UnixCD = v;}
/**
+ * Set Support Verbose Variable. If true, then .SILENT will
+ * be not end with : i.e. .SILENT: or .SILENT
+ */
+ void SetSilentNoColon(bool v) {m_SilentNoColon = v;}
+
+ /**
* Set the string used to include one makefile into another default
* is include.
*/
@@ -365,6 +371,7 @@ private:
bool m_DefineWindowsNULL;
bool m_UnixCD;
bool m_PassMakeflags;
+ bool m_SilentNoColon;
//==========================================================================
// Flag for whether echo command needs quotes.
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index fc846d3..3b71c25 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -131,6 +131,7 @@ protected:
RegexReplacement(const char* s): number(-1), value(s) {}
RegexReplacement(const std::string& s): number(-1), value(s) {}
RegexReplacement(int n): number(n), value() {}
+ RegexReplacement() {};
int number;
std::string value;
};
diff --git a/Source/cmake.cxx b/Source/cmake.cxx
index 27702d9..679b441 100644
--- a/Source/cmake.cxx
+++ b/Source/cmake.cxx
@@ -47,6 +47,7 @@
# endif
# include "cmGlobalBorlandMakefileGenerator.h"
# include "cmGlobalNMakeMakefileGenerator.h"
+# include "cmGlobalWatcomWMakeGenerator.h"
# include "cmGlobalMSYSMakefileGenerator.h"
# include "cmGlobalMinGWMakefileGenerator.h"
# include "cmWin32ProcessExecution.h"
@@ -1606,6 +1607,8 @@ void cmake::AddDefaultGenerators()
&cmGlobalBorlandMakefileGenerator::New;
m_Generators[cmGlobalNMakeMakefileGenerator::GetActualName()] =
&cmGlobalNMakeMakefileGenerator::New;
+ m_Generators[cmGlobalWatcomWMakeGenerator::GetActualName()] =
+ &cmGlobalWatcomWMakeGenerator::New;
m_Generators[cmGlobalMSYSMakefileGenerator::GetActualName()] =
&cmGlobalMSYSMakefileGenerator::New;
m_Generators[cmGlobalMinGWMakefileGenerator::GetActualName()] =
diff --git a/Source/kwsys/Directory.cxx b/Source/kwsys/Directory.cxx
index e98c259..fefdab8 100644
--- a/Source/kwsys/Directory.cxx
+++ b/Source/kwsys/Directory.cxx
@@ -74,7 +74,7 @@ const char* Directory::GetFile(unsigned long dindex)
// First microsoft compilers
-#ifdef _MSC_VER
+#if defined(_MSC_VER) || defined(__WATCOMC__)
#include <windows.h>
#include <io.h>
#include <ctype.h>
diff --git a/Source/kwsys/EncodeExecutable.c b/Source/kwsys/EncodeExecutable.c
index a0cdcd7..d7c9a45 100644
--- a/Source/kwsys/EncodeExecutable.c
+++ b/Source/kwsys/EncodeExecutable.c
@@ -12,7 +12,9 @@
=========================================================================*/
#include <stdio.h>
-
+#ifdef __WATCOMC__
+#define _unlink unlink
+#endif
int main(int argc, char* argv[])
{
FILE* ifp;
@@ -76,6 +78,9 @@ int main(int argc, char* argv[])
fprintf(ofp, "extern %s_EXPORT int %sEncodedWriteArray%s(const char* fname)\n",
argv[3], argv[3], argv[4]);
fprintf(ofp, "{\n");
+ fprintf(ofp, "#ifdef __WATCOMC__\n");
+ fprintf(ofp, "#define _unlink unlink\n");
+ fprintf(ofp, "#endif\n");
fprintf(ofp, " FILE* ofp = fopen(fname, \"wb\");\n");
fprintf(ofp, " if(!ofp) { return 0; }\n");
for(i=0; i < count; ++i)
diff --git a/Source/kwsys/Glob.cxx b/Source/kwsys/Glob.cxx
index 823f59e..7617458 100644
--- a/Source/kwsys/Glob.cxx
+++ b/Source/kwsys/Glob.cxx
@@ -35,7 +35,7 @@
#include <ctype.h>
#include <stdio.h>
-
+#include <string.h>
namespace KWSYS_NAMESPACE
{
#if defined( _WIN32 ) || defined( APPLE ) || defined( __CYGWIN__ )
diff --git a/Source/kwsys/ProcessWin32.c b/Source/kwsys/ProcessWin32.c
index 6c2fe28..9a0b6eb 100644
--- a/Source/kwsys/ProcessWin32.c
+++ b/Source/kwsys/ProcessWin32.c
@@ -45,6 +45,9 @@ Q190351 and Q150956.
#include <string.h> /* strlen, strdup */
#include <stdio.h> /* sprintf */
#include <io.h> /* _unlink */
+#ifdef __WATCOMC__
+#define _unlink unlink
+#endif
#ifndef _MAX_FNAME
#define _MAX_FNAME 4096
diff --git a/Source/kwsys/Registry.cxx b/Source/kwsys/Registry.cxx
index 97d854d..3c0be26 100644
--- a/Source/kwsys/Registry.cxx
+++ b/Source/kwsys/Registry.cxx
@@ -367,9 +367,7 @@ RegistryHelper::~RegistryHelper()
bool RegistryHelper::Open(const char *toplevel, const char *subkey,
int readonly)
{
- this->EntriesMap.erase(
- this->EntriesMap.begin(),
- this->EntriesMap.end());
+ this->EntriesMap.clear();
m_Empty = 1;
#ifdef _WIN32
@@ -416,7 +414,7 @@ bool RegistryHelper::Open(const char *toplevel, const char *subkey,
}
}
m_HomeDirectory = homeDirectory;
- str << m_HomeDirectory << "/." << toplevel << "rc";
+ str << m_HomeDirectory.c_str() << "/." << toplevel << "rc";
if ( readonly == Registry::READWRITE )
{
kwsys_ios::ofstream ofs( str.str().c_str(), kwsys_ios::ios::out|kwsys_ios::ios::app );
@@ -503,7 +501,7 @@ bool RegistryHelper::Close()
}
kwsys_ios::ostringstream str;
- str << m_HomeDirectory << "/." << this->GetTopLevel() << "rc";
+ str << m_HomeDirectory.c_str() << "/." << this->GetTopLevel() << "rc";
kwsys_ios::ofstream *ofs = new kwsys_ios::ofstream(str.str().c_str(), kwsys_ios::ios::out);
if ( !ofs )
{
@@ -531,9 +529,7 @@ bool RegistryHelper::Close()
*ofs << it->first.c_str() << " = " << this->EncodeValue(it->second.c_str()).c_str() << kwsys_ios::endl;
}
}
- this->EntriesMap.erase(
- this->EntriesMap.begin(),
- this->EntriesMap.end());
+ this->EntriesMap.clear();
ofs->close();
delete ofs;
this->SetSubKey(0);
@@ -673,7 +669,8 @@ kwsys_stl::string RegistryHelper::CreateKey( const char *key )
return "";
}
kwsys_ios::ostringstream ostr;
- ostr << this->EncodeKey(this->m_SubKey.c_str()) << "\\" << this->EncodeKey(key);
+ ostr << this->EncodeKey(this->m_SubKey.c_str()).c_str()
+ << "\\" << this->EncodeKey(key).c_str();
return ostr.str();
}
diff --git a/Source/kwsys/SystemTools.cxx b/Source/kwsys/SystemTools.cxx
index e406723..cd3526c 100644
--- a/Source/kwsys/SystemTools.cxx
+++ b/Source/kwsys/SystemTools.cxx
@@ -85,7 +85,7 @@ public:
}
#endif
-#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__))
+#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) ||defined(__BORLANDC__) || defined(__MINGW32__))
#include <io.h>
#include <direct.h>
#define _unlink unlink
@@ -99,8 +99,15 @@ public:
#else
# define KWSYS_SYSTEMTOOLS_MAXPATH 16384
#endif
+#if defined(__WATCOMC__)
+#include <direct.h>
+#define _mkdir mkdir
+#define _rmdir rmdir
+#define _getcwd getcwd
+#define _chdir chdir
+#endif
-#if defined(_WIN32) && (defined(_MSC_VER) || defined(__BORLANDC__) || defined(__MINGW32__))
+#if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__))
inline int Mkdir(const char* dir)
{
return _mkdir(dir);
@@ -1856,7 +1863,11 @@ kwsys_stl::string SystemTools
SystemTools::GetPath(path, "CMAKE_FILE_PATH");
SystemTools::GetPath(path);
// now add the additional paths
- path.insert(path.end(), userPaths.begin(), userPaths.end());
+ for(kwsys_stl::vector<kwsys_stl::string>::const_iterator i = userPaths.begin();
+ i != userPaths.end(); ++i)
+ {
+ path.push_back(*i);
+ }
// now look for the file
kwsys_stl::string tryPath;
for(kwsys_stl::vector<kwsys_stl::string>::const_iterator p = path.begin();
@@ -1911,8 +1922,11 @@ kwsys_stl::string SystemTools::FindProgram(
}
// now add the additional paths
- path.insert(path.end(), userPaths.begin(), userPaths.end());
-
+ for(kwsys_stl::vector<kwsys_stl::string>::const_iterator i = userPaths.begin();
+ i != userPaths.end(); ++i)
+ {
+ path.push_back(*i);
+ }
for(kwsys_stl::vector<kwsys_stl::string>::const_iterator p = path.begin();
p != path.end(); ++p)
{
@@ -1987,7 +2001,11 @@ kwsys_stl::string SystemTools
kwsys_stl::vector<kwsys_stl::string> path;
SystemTools::GetPath(path);
// now add the additional paths
- path.insert(path.end(), userPaths.begin(), userPaths.end());
+ for(kwsys_stl::vector<kwsys_stl::string>::const_iterator i = userPaths.begin();
+ i != userPaths.end(); ++i)
+ {
+ path.push_back(*i);
+ }
kwsys_stl::string tryPath;
for(kwsys_stl::vector<kwsys_stl::string>::const_iterator p = path.begin();
p != path.end(); ++p)
diff --git a/Source/kwsys/SystemTools.hxx.in b/Source/kwsys/SystemTools.hxx.in
index bdc327b..9d5926d 100644
--- a/Source/kwsys/SystemTools.hxx.in
+++ b/Source/kwsys/SystemTools.hxx.in
@@ -18,6 +18,7 @@
#include <@KWSYS_NAMESPACE@/stl/string>
#include <@KWSYS_NAMESPACE@/stl/vector>
#include <@KWSYS_NAMESPACE@/stl/map>
+#include <@KWSYS_NAMESPACE@/stl/algorithm>
#include <@KWSYS_NAMESPACE@/Configure.h>
diff --git a/Source/kwsys/kwsysPlatformCxxTests.cxx b/Source/kwsys/kwsysPlatformCxxTests.cxx
index 77e0d1c..e921676 100644
--- a/Source/kwsys/kwsysPlatformCxxTests.cxx
+++ b/Source/kwsys/kwsysPlatformCxxTests.cxx
@@ -26,7 +26,16 @@ int main() { return 0; }
#ifdef TEST_KWSYS_IOS_USE_SSTREAM
#include <sstream>
-int main() { return 0; }
+int main()
+{
+ std::ostringstream ostr;
+ ostr << "hello";
+ if(ostr.str().size() == 5)
+ {
+ return 0;
+ }
+ return -1;
+}
#endif
#ifdef TEST_KWSYS_IOS_USE_STRSTREAM_H
diff --git a/Source/kwsys/testRegistry.cxx b/Source/kwsys/testRegistry.cxx
index 1c31163..09e9737 100644
--- a/Source/kwsys/testRegistry.cxx
+++ b/Source/kwsys/testRegistry.cxx
@@ -16,6 +16,7 @@
#include KWSYS_HEADER(Registry.hxx)
#include KWSYS_HEADER(ios/iostream)
+#include <string.h>
// Work-around CMake dependency scanning limitation. This must
// duplicate the above list of headers.