In CMake, how can I find the directory of an included file?

People have reported seemingly contradictory facts about how CMAKE_CURRENT_LIST_DIR behaves. Now I know the reason for the confusion: First, in my Linux environment: $ cd /path/to/home $ mkdir cmake-test $ cd cmake-test $ mkdir source $ mkdir source/subdirectory $ mkdir build I create these two files: $ cat source/CMakeLists.txt include(subdirectory/foo.cmake) $ cat source/subdirectory/foo.cmake message(“CMAKE_CURRENT_LIST_DIR is … Read more

how to “execute” make file

You don’t tend to execute the make file itself, rather you execute make, giving it the make file as an argument: make -f pax.mk If your make file is actually one of the standard names (like makefile or Makefile), you don’t even need to specify it. It’ll be picked up by default (if you have … Read more

ASP.Net MVC – Read File from HttpPostedFileBase without save

This can be done using httpPostedFileBase class returns the HttpInputStreamObject as per specified here You should convert the stream into byte array and then you can read file content Please refer following link http://msdn.microsoft.com/en-us/library/system.web.httprequest.inputstream.aspx] Hope this helps UPDATE : The stream that you get from your HTTP call is read-only sequential (non-seekable) and the FileStream … Read more

copy all files and folders from one drive to another drive using DOS (command prompt)

xcopy “C:\SomeFolderName” “D:\SomeFolderName” /h /i /c /k /e /r /y Use the above command. It will definitely work. In this command data will be copied from c:\ to D:, even folders and system files as well. Here’s what the flags do: /h copies hidden and system files also /i if destination does not exist and … Read more