summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/kwsysPlatformTests.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2010-02-12 15:46:50 (GMT)
committerBrad King <brad.king@kitware.com>2010-02-12 15:46:50 (GMT)
commitbf4d2f6cc7cf20d9d5ba6c82db8210ecb4e2ce6c (patch)
treeda2af9b4c23b88bda951bfc25a0d970c3847d830 /Source/kwsys/kwsysPlatformTests.cmake
parent41a608a75d09701dfc02d52e700862c48e643b47 (diff)
downloadCMake-bf4d2f6cc7cf20d9d5ba6c82db8210ecb4e2ce6c.zip
CMake-bf4d2f6cc7cf20d9d5ba6c82db8210ecb4e2ce6c.tar.gz
CMake-bf4d2f6cc7cf20d9d5ba6c82db8210ecb4e2ce6c.tar.bz2
Fix KWSYS_PLATFORM_INFO_TEST when user removes tree
In commit 'Create KWSYS_PLATFORM_INFO_TEST macro' (2009-11-20) we implemented the macro to use a cache entry to avoid re-running the try_compile(). However, the output copied from the try_compile is needed on every configure. If the user wipes out the build tree but not the cache file then the try_compile() will not re-run to recreate the needed file. We address the problem by teaching the macro to run the try_compile() whenever its output file does not exist.
Diffstat (limited to 'Source/kwsys/kwsysPlatformTests.cmake')
-rw-r--r--Source/kwsys/kwsysPlatformTests.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/kwsys/kwsysPlatformTests.cmake b/Source/kwsys/kwsysPlatformTests.cmake
index 994b7e7..d042450 100644
--- a/Source/kwsys/kwsysPlatformTests.cmake
+++ b/Source/kwsys/kwsysPlatformTests.cmake
@@ -177,7 +177,7 @@ MACRO(KWSYS_PLATFORM_INFO_TEST lang var description)
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
# Compile the test binary.
- IF(NOT DEFINED ${var}_COMPILED)
+ IF(NOT EXISTS ${KWSYS_PLATFORM_INFO_FILE})
MESSAGE(STATUS "${description}")
TRY_COMPILE(${var}_COMPILED
${CMAKE_CURRENT_BINARY_DIR}