summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-06-26 19:15:52 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-06-26 19:15:52 (GMT)
commit25a425ecf09fccc804758da1015f93fce724f856 (patch)
tree1885272f7bc9bdc3ce9a243e38e550726afd4207
parent571b3088d522da188448fc0cbe825fc9ee840609 (diff)
downloadCMake-25a425ecf09fccc804758da1015f93fce724f856.zip
CMake-25a425ecf09fccc804758da1015f93fce724f856.tar.gz
CMake-25a425ecf09fccc804758da1015f93fce724f856.tar.bz2
ENH:
-rw-r--r--Modules/Platform/Generic-SDCC-C.cmake2
-rw-r--r--Tests/CMakeLists.txt19
2 files changed, 20 insertions, 1 deletions
diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake
index 37eb0d6..91b5de7 100644
--- a/Modules/Platform/Generic-SDCC-C.cmake
+++ b/Modules/Platform/Generic-SDCC-C.cmake
@@ -36,7 +36,7 @@ SET(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> -o <TARGET> <
# needs sdcc 2.7.0 + sddclib from cvs
SET(CMAKE_C_CREATE_STATIC_LIBRARY
- "${CMAKE_COMMAND} -E remove <TARGET>"
+ "\"${CMAKE_COMMAND}\" -E remove <TARGET>"
"<CMAKE_AR> -a <TARGET> <LINK_FLAGS> <OBJECTS> ")
# not supported by sdcc
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index b4126ab..e104dbd 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -696,6 +696,7 @@ IF(BUILD_TESTING)
ENDIF(CMAKE_Fortran_COMPILER_FULLPATH)
ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles"
OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
+
IF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode")
INCLUDE(FindJava)
IF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
@@ -721,6 +722,24 @@ IF(BUILD_TESTING)
ENDIF(JAVA_COMPILE AND JAVA_RUNTIME AND JAVA_ARCHIVE AND NOT MINGW)
ENDIF(NOT CMAKE_TEST_GENERATOR MATCHES "Xcode")
+ # if it's a makefile based generator and sdcc is found, build the SimpleCOnly project with sdcc
+ IF(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
+ FIND_PROGRAM(SDCC_EXECUTABLE sdcc)
+ IF(SDCC_EXECUTABLE)
+ ADD_TEST(SimpleCOnly ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/SimpleCOnly"
+ "${CMake_BINARY_DIR}/Tests/SimpleCOnly"
+ --build-generator ${CMAKE_TEST_GENERATOR}
+ --build-project SimpleC
+ --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM}
+ --build-options
+ "-DCMAKE_SYSTEM_NAME=Generic"
+ "-DCMAKE_C_COMPILER=${SDCC_EXECUTABLE}")
+ ENDIF(SDCC_EXECUTABLE)
+ ENDIF(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop")
+
+
IF(BUILD_WXDialog AND wxWidgets_CONFIG_EXECUTABLE)
# Will be set if the WX gui is on
ADD_TEST(UseWX ${CMAKE_CTEST_COMMAND}