[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.169 1.170

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Dec 10 09:10:15 EST 2009

Update of /cvsroot/CMake/CMake
In directory public:/mounts/ram/cvs-serv19705

Modified Files:
Log Message:
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.

Index: CMakeLists.txt
RCS file: /cvsroot/CMake/CMake/CMakeLists.txt,v
retrieving revision 1.169
retrieving revision 1.170
diff -C 2 -d -r1.169 -r1.170
*** CMakeLists.txt	10 Dec 2009 14:10:01 -0000	1.169
--- CMakeLists.txt	10 Dec 2009 14:10:12 -0000	1.170
*** 477,478 ****
--- 477,485 ----
  # 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.

More information about the Cmake-commits mailing list