mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-17 15:32:10 +08:00
Help: Populate tutorial guide text
Migrate tutorial text from individual `directions.txt` files to the main tutorial document. Add some comments to source code to provide anchors for inclusion.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "TutorialConfig.h"
|
||||
|
||||
// should we include the MathFunctions header?
|
||||
#ifdef USE_MYMATH
|
||||
# include "MathFunctions.h"
|
||||
#endif
|
||||
@@ -12,6 +13,7 @@
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
if (argc < 2) {
|
||||
// report version
|
||||
std::cout << argv[0] << " Version " << Tutorial_VERSION_MAJOR << "."
|
||||
<< Tutorial_VERSION_MINOR << std::endl;
|
||||
std::cout << "Usage: " << argv[0] << " number" << std::endl;
|
||||
@@ -20,6 +22,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
double inputValue = std::stod(argv[1]);
|
||||
|
||||
// which square root function should we use?
|
||||
#ifdef USE_MYMATH
|
||||
double outputValue = mysqrt(inputValue);
|
||||
#else
|
||||
|
Reference in New Issue
Block a user