diff options
author | Brad King <brad.king@kitware.com> | 2002-12-17 18:28:49 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2002-12-17 18:28:49 (GMT) |
commit | 5abc8c18c08f2057ef2b9962757bab10b751e740 (patch) | |
tree | 28e32208ac7421cbd8e44d35fa6d541da83226e5 | |
parent | 18391be145e15a20e861b99fbeb98ab833354100 (diff) | |
download | CMake-5abc8c18c08f2057ef2b9962757bab10b751e740.zip CMake-5abc8c18c08f2057ef2b9962757bab10b751e740.tar.gz CMake-5abc8c18c08f2057ef2b9962757bab10b751e740.tar.bz2 |
BUG: Renamed X11 test executable to useX11 to avoid conflict with name of library.
-rw-r--r-- | Source/CMakeLists.txt | 2 | ||||
-rw-r--r-- | Tests/X11/CMakeLists.txt | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index bc0e132..674d61c 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -147,7 +147,7 @@ IF(BUILD_TESTING) ADD_TEST(X11 ${CMake_BINARY_DIR}/Source/cmaketest ${CMake_SOURCE_DIR}/Tests/X11 ${CMake_BINARY_DIR}/Tests/X11 - X11) + useX11) ADD_TEST(LoadedCommand ${CMake_BINARY_DIR}/Source/cmaketest ${CMake_SOURCE_DIR}/Tests/LoadCommand 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) |