![]() ![]() Update: this answer is 'out-of-date' since it is now feasible with CMake 3.6. Without that binary file, visual studio will default to the first project in the solution file and the ALLBUILD project is always first. ![]() > Windows 7 圆4 with Visual Studio 2010 SP1 Professional.ĭid you enable solution folders globally in the top level CMakeLists. The startup-project is stored in a binary file, which is NOT generated by CMake. Is there something else that I need to call to enable this? What I am expecting to see in the Visual Studio 2010 solution is a Folder called "Test" with all my test projects listed in that but I just see everything at the top level. But point is to use a property as global variables, and not about naming. It is also propagated by calls to the trycompile () command into the test project. getproperty(sourcelist GLOBAL PROPERTY sourcelistproperty) I used in examples above the different names for property (sourcelistproperty) and for variable (sourcelist). This variable is used to initialize the MSVCRUNTIMELIBRARY property on all targets as they are created. > SET_TARGET_PROPERTIES (StructArrayTest PROPERTIES FOLDER Test) Select the MSVC runtime library for use by compilers targeting the MSVC ABI. ![]() > target_link_libraries(StructArrayTest EbsdLib MXA DREAM3DLib) > add_executable(StructArrayTest $/StructArrayTest.cpp) > I am trying to group some of my targets for my Visual Studio users and I am using the following code: Next message: Target Properties FOLDER not working?.Previous message: Target Properties FOLDER not working?.Target Properties FOLDER not working? John Drescher drescherjm at _3dparty/utility/mylib/tests)ĬMake command line: cmake.exe -G "." "-DTACKLELIB_CMAKE_ROOT=./_externals/tacklelib/cmake". You can try to automate this by using CMAKECURRENTSOURCEDIR instead of naming the folder explicitly, but start with a simple case first Also, make sure you add this to your top-level CMake to enable VS folders for your projects. Tkl_set_target_folder(MYLIB_ROOT * "tests". Tkl_set_target_folder(MYLIB_ROOT * * "tests" EXECUTABLE. This property only works for Visual Studio 9 and above it is ignored on other. List elements which do not contain an equal sign are skipped. Whitespace around key and value is ignored. Each such pair will be transformed into an entry in the solution global section. Tkl_set_target_folder(CMAKE_CURRENT_LIST_DIR. The property must be set to a semicolon-separated list of keyvalue pairs. Tkl_set_target_folder(CMAKE_CURRENT_LIST_DIR. ![]() Include(tacklelib/EnableTargetsExtension) It seems you only switched to CMake very recently, as exactly those questions also popped into my head when I first started using CMake. But you could use a the 'preload cache' -C option and put all reoccurring settings in an appropriate script (see e.g. Everything you can set through environment variables in CMake is documented here. My attempt: function(add_subdirectory_with_folder folder_name)Īdd_subdirectory_with_folder("Poco" libs/poco)Įxample target from the poco library: add_library( "$") No, there is no similar environment variable for CMake. This property is initialized by the value of the variable CMAKEFOLDER if it is set when a target is. Those generators that dont will simply ignore it. Xcode or any of the Visual Studio generators). Only some CMake generators honor the FOLDER property (e.g. Is there an easier way to add projects with my own properties? Targets with the same FOLDER property value will appear in the same folder as siblings. Im also facing the build failure issue with the docker container from the latest release. It looks strange that CMake developers doesnt implement ADDITIONALCLEANFILES for Visual Studio. 0 (64-bit) Visual Studio version (if applicable): VS 2017. The documentation states that STATICLIBRARYOPTIONS supports generator expressions: Contents of STATICLIBRARYOPTIONS may use generator expressions with the syntax <.>.Actually, looking into the way how one could set clean files for Visual Studio without CMake, I find it very similar to ADDITIONALCLEANFILES semantic. To achieve that CMake offers the target property STATICLIBRARYOPTIONS that can be set by the setproperty and settargetproperties command. I want the targets in my external project to be in their own folder, instead of sprawled out everywhere in the project tree (say the visual studio generator). No, I dont know an alternative for Visual Studio. I'm trying to organize the targets in my subproject (in this case poco), but I've come to find that properties can't be modified for ALIAS targets. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |