Setting top level source_group with regex

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Setting top level source_group with regex

Glen Knowles
On Windows, cmake version 3.7.2, generating project files for visual studio 2017.

I have a file called "configure.bat" that I would like to place at the root of the visual studio project via regex.

Here is what I have tried along with where it put configure.bat:
1. no source_group -> "Source Files" folder
2. source_group("" FILES "configure.bat") -> at the root
3. source_group(" " FILES "configure.bat") -> at the root
4. source_group("x" REGULAR_EXPRESSION "configure\.bat") -> "x" folder
5. source_group("" REGULAR_EXPRESSION "configure\.bat") -> "Source Files" folder
6. source_group(" " REGULAR_EXPRESSION "configure\.bat") -> at the root

So it's possible to get the result I want using #6, but #5 seems wrong to me. Or if it's not wrong, and "" is suppose to restore the default, than #2 has a problem.

#3 and #6 are actually adding a filter with a single space as it's name, I suspect it only works because VS is normalizing it to an empty string when it reads the *.vcxproj.filters file.


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake
Loading...