I'm new to CMake. So this question might be a rookie misunderstanding. A general use of CMake generates the project files ZERO_CHECK, ALL_BUILD and the main project sln. I need to compile source and header files from 3 folders to generate a static library (*.lib). What's the best way to do so without generating other build files?
Asked
Active
Viewed 54 times
0
-
You want to generate the Visual Studio project file for your `.lib`, but not the Visual Studio project files for `ZERO_CHECK` and `ALL_BUILD`? – Kevin Apr 22 '20 at 19:22
-
@squareskittles : yes. Is that possible? My VS solution contains 3 projects. Of these, one project has 3 folders that contain source and header files. I want to compile these files and generate a static library that could be used in the other 2 projects. – Archie Apr 22 '20 at 20:49
-
Kind of, you can disable generation of `ZERO_CHECK` by setting `set(CMAKE_SUPPRESS_REGENERATION true)` in your CMakeLists.txt file, but the `ALL_BUILD` pre-defined CMake project you cannot turn off. I think this question basically already has some answers on this site, like [this one](https://stackoverflow.com/questions/27175754/what-are-all-build-and-zero-check-and-do-i-need-them). – Kevin Apr 22 '20 at 20:54
-
1@squareskittles Thanks. That worked. – Archie Apr 22 '20 at 20:59