Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the purpose of CMakeScripts?

Tags:

xcode

cmake

I configured my build with cmake -G Xcode and a directory named CMakeScripts appeared, with the following contents:

ALL_BUILD_cmakeRulesBuildPhase.makeDebug
ALL_BUILD_cmakeRulesBuildPhase.makeMinSizeRel
ALL_BUILD_cmakeRulesBuildPhase.makeRelease
ALL_BUILD_cmakeRulesBuildPhase.makeRelWithDebInfo
ReRunCMake.make
ZERO_CHECK_cmakeRulesBuildPhase.makeDebug
ZERO_CHECK_cmakeRulesBuildPhase.makeMinSizeRel
ZERO_CHECK_cmakeRulesBuildPhase.makeRelease
ZERO_CHECK_cmakeRulesBuildPhase.makeRelWithDebInfo

I couldn't find any official CMake documentation on this folder but it seems that it's only created by the Xcode generator.

So, what's the purpose of this folder, as opposed to other CMake folders (e.g. CMakeFiles), and why is it only used by Xcode?

like image 704
emlai Avatar asked May 24 '15 13:05

emlai


1 Answers

They are internal scripts to hack around Xcode's make files. I checked Source/cmGlobalXCodeGenerator.cxx where the CMakeScripts path is hard-coded. The variable which stores this path is called CurrentXCodeHackMakefile.

This is printed in one of the files you can find in CMakeScripts, it indicates to be a helper make file:

DO NOT EDIT This makefile makes sure all linkable targets are up-to-date with anything they link to default:
echo "Do not invoke directly"

For each target create a dummy rule so the target does not have to exist

like image 121
usr1234567 Avatar answered Oct 07 '22 09:10

usr1234567