cmake: refactor CMakeLists.txt

It is still somewhat broken and somewhat of a mess, but it is much
lesser mess now.

As part of this change I also amputated a number of unnecessary or too
complicated bits. Like attempt to build both static and shared
versions of tcmalloc libraries at the same time. We stick to cmake's
"common" (seemingly) behavior of defaulting to something (in our case
shared library) and letting users override BUILD_SHARED_LIBS.

All the "install" bits are amputated as well, they're not ready.
This commit is contained in:
Aliaksey Kandratsenka 2024-02-26 16:40:11 -05:00
parent 5fabaea30d
commit 9dfab2cdce
3 changed files with 256 additions and 745 deletions

File diff suppressed because it is too large Load Diff

View File

@ -166,9 +166,6 @@
functions/classes. It's safe to define this here because config.h is only
used internally, to compile the DLL, and every DLL source file #includes
"config.h" before anything else. */
#ifndef WIN32
#cmakedefine WIN32
#endif
#if defined(WIN32)
#ifndef PERFTOOLS_DLL_DECL
# define PERFTOOLS_IS_A_DLL 1

View File

@ -7,4 +7,4 @@ target_link_libraries(nm-pdb dbghelp)
#enable_language(ASM)
#add_executable(preamble_patcher_test preamble_patcher_test.cc shortproc.asm)
#target_link_libraries(preamble_patcher_test tcmalloc_minimal)
#add_test(preamble_patcher_test preamble_patcher_test)
#add_test(preamble_patcher_test preamble_patcher_test)