summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2002-12-17 18:28:49 (GMT)
committerBrad King <brad.king@kitware.com>2002-12-17 18:28:49 (GMT)
commit5abc8c18c08f2057ef2b9962757bab10b751e740 (patch)
tree28e32208ac7421cbd8e44d35fa6d541da83226e5 /Tests
parent18391be145e15a20e861b99fbeb98ab833354100 (diff)
downloadCMake-5abc8c18c08f2057ef2b9962757bab10b751e740.zip
CMake-5abc8c18c08f2057ef2b9962757bab10b751e740.tar.gz
CMake-5abc8c18c08f2057ef2b9962757bab10b751e740.tar.bz2
BUG: Renamed X11 test executable to useX11 to avoid conflict with name of library.
Diffstat (limited to 'Tests')
-rw-r--r--Tests/X11/CMakeLists.txt23
1 files changed, 12 insertions, 11 deletions
diff --git a/Tests/X11/CMakeLists.txt b/Tests/X11/CMakeLists.txt
index a4cc123..6a4abef 100644
--- a/Tests/X11/CMakeLists.txt
+++ b/Tests/X11/CMakeLists.txt
@@ -1,19 +1,20 @@
# a simple C only test case
PROJECT (X11 C)
-INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
-
-IF(CMAKE_HAS_X)
- IF(CMAKE_X_CFLAGS)
- SET(CMAKE_C_FLAGS "${CMAKE_X_CFLAGS} ${CMAKE_C_FLAGS}")
- ENDIF(CMAKE_X_CFLAGS)
+# Temporary hack to deal with dirty cache files.
+IF(EXISTS ${X11_BINARY_DIR}/X11.exe)
+ EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E remove ${X11_BINARY_DIR}/X11.exe)
+ENDIF(EXISTS ${X11_BINARY_DIR}/X11.exe)
+IF(EXISTS ${X11_BINARY_DIR}/X11)
+ EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E remove ${X11_BINARY_DIR}/X11)
+ENDIF(EXISTS ${X11_BINARY_DIR}/X11)
- INCLUDE_DIRECTORIES(${CMAKE_X11_INCLUDES})
- ADD_DEFINITIONS(-DCMAKE_HAS_X)
-ENDIF(CMAKE_HAS_X)
+INCLUDE (${CMAKE_ROOT}/Modules/FindX11.cmake)
-ADD_EXECUTABLE (X11 X11.c)
+ADD_EXECUTABLE (useX11 X11.c)
IF(CMAKE_HAS_X)
- TARGET_LINK_LIBRARIES(X11 ${CMAKE_X_LIBS})
+ ADD_DEFINITIONS(-DCMAKE_HAS_X)
+ INCLUDE_DIRECTORIES(${CMAKE_X_INCLUDE_DIRS})
+ TARGET_LINK_LIBRARIES(useX11 ${CMAKE_X_LIBS})
ENDIF(CMAKE_HAS_X)