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.
This commit is contained in:
parent
41a608a75d
commit
bf4d2f6cc7
@ -177,7 +177,7 @@ MACRO(KWSYS_PLATFORM_INFO_TEST lang var description)
|
|||||||
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
|
${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_FILES_DIRECTORY}/${var}.bin)
|
||||||
|
|
||||||
# Compile the test binary.
|
# Compile the test binary.
|
||||||
IF(NOT DEFINED ${var}_COMPILED)
|
IF(NOT EXISTS ${KWSYS_PLATFORM_INFO_FILE})
|
||||||
MESSAGE(STATUS "${description}")
|
MESSAGE(STATUS "${description}")
|
||||||
TRY_COMPILE(${var}_COMPILED
|
TRY_COMPILE(${var}_COMPILED
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user