Q:

CMake ENABLE_FAST_MATH=ON directory does not exist

I'm trying to install OpenCV and in order to do it I'm following this  tutorial. 
But when it comes to building OpenCV, when using the cmake command:
cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=OFF \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=/home/ayush/soft/opencv_contrib/modules \
-D ENABLE_FAST_MATH=ON

I have the following error: 

CMake Error: The source directory
  "/mnt/c/Users/celia/OC/Dogs/Dogs/opencv-3.4.1/build/ENABLE_FAST_MATH=ON"
  does not exist.

I have no idea how to fix this..
Thanks for your help !

A:

When running CMake from the command line, you need to specify the path to your source directory (containing the top-level CMakeLists.txt file), or the path to an existing build directory. See the documentation here. Because you did not provide a path, CMake interpreted the last argument (ENABLE_FAST_MATH=ON) as the path, which is probably not what you intended.
Seeing that you are running from your build directory, the path to your source should be the parent directory (..). Try this:
cmake -D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_CUDA=OFF \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
-D OPENCV_EXTRA_MODULES_PATH=/home/ayush/soft/opencv_contrib/modules \
-D ENABLE_FAST_MATH=ON ..

