Re: [HACKERS] WIP: About CMake v2

Поиск
Список
Период
Сортировка
От Yuriy Zhuravlev
Тема Re: [HACKERS] WIP: About CMake v2
Дата
Msg-id CANiD2e_tBS869MHRBUTvUq874mxbG3SkE2_PBO2C4TuWxcXEXQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: About CMake v2  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: [HACKERS] WIP: About CMake v2  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-hackers

Hello hackers.


----

I think you notice what I changed email, it is happened because I quit from PgPro.  

Good news is that I have time to work on CMake. Bad news I have to find a new job. ;)

----

What is new in that patchset:

  1. I separated changes to several patches. Main patch include only new CMake files without postgres files changes.

  2. I cleaned all the unnecessary postgres changes.

  3. I update cmake with latest master, add STRONG_RANDOM option and etc.

  4. Add small document about CMake and Postgres. (README.cmake bad idea for name but I think now it’s ok)

  5. I have stopped use gendef.pl for MSVC build.

  6. Fix for AIX 7.1


About patches:

cmake_v2_1_main_files.patch

Only CMake files. CMakeFiles.txt is main files with rules. *.cmake is special modules with macros and functions. *.in is template for generate headers. (like autoconf)

cmake_v2_2_c_define.patch

Small chages in c.h . At first it is “#pragma fenv_access (off)” it is necessary if we use /fp:strict for MSVC compiler. Without this pragma we can’t calc floats for const variables in compiller time (2 * M_PI for example). Strict mode important if we want to be close with ieee754 float format on MSVC (1.0 / 0.0 = inf for example).  Detail info here: https://msdn.microsoft.com/en-us/library/e7s85ffb.aspx

Second change is because I find and set HAVE_INT128 directly from CMake. PG_INT128_TYPE used only for autoconfig scripts.

cmake_v2_3_rijndael.patch

First I added special wraparound because here CMake have circular dependency (cmake very smart here). Second I removed rijndael.tbl because it generated during build process every time.

cmake_v2_4_uuid.patch

Another small patch. Right place for uuid.h I find by CMake and not necessary this ifdef hell.

cmake_v2_5_readme.patch

Small exercise to CMake world for all who want to try.

Questions for discussion:

In generated project by CMake we always have only one enter point. Also INSTALL macross support only including to “all” targets. It follows that it is impossible build contrib modules separately only with “all” target. Here write about this behavior: https://cmake.org/cmake/help/v3.7/prop_tgt/EXCLUDE_FROM_ALL.html

Interesting note:

Many folks here love only command line but many novices developers from modern generation love GUI. Also using command line on Windows it's really big pain. With CMake you can work with Postgres under MSVC more comfortable. For example my screenshots of regress tests result runing from MSVC: https://twitter.com/stalkerg/status/814423972263657472

Fin:

I hope this patchset one step closer to merge. In future I see a lot of work but I suppose it is right and important direction. I'm ready for this long journey.

Big thanks Peter Eisentraut for advices and the right vector of development.

Also big thanks Mark Kirkwood for help and discussion.

Happy New Year, everyone!

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Fabien COELHO
Дата:
Сообщение: Re: [HACKERS] BUG: pg_stat_statements query normalization issueswith combined queries
Следующее
От: Jesper Pedersen
Дата:
Сообщение: Re: [HACKERS] Microvacuum support for Hash Index