[CMake] How to disable cmake_clean_target.cmake script from executing.

Alexander Neundorf a.neundorf-work at gmx.net
Mon Nov 10 15:22:05 EST 2008


On Monday 10 November 2008, Eric NOULARD wrote:
> Le Mon, 10 Nov 2008 16:22:48 +0900,
...
> You may try to create your static lib from the top-level CMakeLists.txt
>
> FILE(GLOB_RECURSE SOURCE_FILE_LIST "*.cpp")
> FILE(GLOB_RECURSE HEADER_FILE_LIST "*.h")
> ADD_LIBRARY(whatever STATIC ${SOURCE_FILE_LIST} ${HEADER_FILE_LIST})
>
> > cmake -P cmake_clean_target.cmake
> >
> > If someway I could be able to block that script from executing I will
> > have a static library with all the sources merged into one file.
>
> I won't do that, that way.

I agree with Eric, don't try to do that.

Alex


More information about the CMake mailing list