Fix installation of CMake itself
CMake 2.8.0 and below use the EXECUTABLE_OUTPUT_PATH setting from the top-level CMakeLists.txt file to compute the location of the "cmake" target for the special case of installing cmake over itself. The commit "Clean up CMake build tree 'bin' directory" moved the setting of EXECUTABLE_OUTPUT_PATH that affects the "cmake" target into the Source subdirectory. This broke the special-case lookup in the top level. We fix it by setting EXECUTABLE_OUTPUT_PATH at the end of the top-level CMakeLists.txt file. Now that we use add_subdirectory to process the subdirectories in order, this setting does not affect the subdirectories. Thus we fix installation while preserving the clean build tree 'bin' directory intended by the above-mentioned commit.
This commit is contained in:
parent
31e2682015
commit
30f17e2932
@ -476,3 +476,10 @@ INSTALL(
|
||||
#-----------------------------------------------------------------------
|
||||
# End of the main section of the CMakeLists file
|
||||
#-----------------------------------------------------------------------
|
||||
|
||||
# As a special case when building CMake itself, CMake 2.8.0 and below
|
||||
# look up EXECUTABLE_OUTPUT_PATH in the top-level CMakeLists.txt file
|
||||
# to compute the location of the "cmake" executable. We set it here
|
||||
# so that those CMake versions can find it. We wait until after all
|
||||
# the add_subdirectory() calls to avoid affecting the subdirectories.
|
||||
SET(EXECUTABLE_OUTPUT_PATH ${CMake_BIN_DIR})
|
||||
|
Loading…
x
Reference in New Issue
Block a user