1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2024-11-25 00:53:43 +00:00

Gather more build env info and show them when doing -b

This commit is contained in:
King_DuckZ 2016-03-17 09:50:52 +01:00
parent a75eee1325
commit aee6c35ede
3 changed files with 18 additions and 2 deletions

View file

@ -35,8 +35,8 @@ set(DINDEXER_ACTIONS_PATH "${CMAKE_CURRENT_BINARY_DIR}/src" CACHE STRING "Action
string(REGEX MATCH "[^/].*" ACTIONS_PATH_INSTALL "${DINDEXER_ACTIONS_PATH}")
set(DB_OWNER_NAME "$ENV{USER}" CACHE STRING "Name that will be used as the DB owner name")
set(PROJECT_VERSION_BETA "1")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -Wno-missing-field-initializers")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -Wall -Wextra -O3 -fomit-frame-pointer -Wno-missing-field-initializers ${march_flag}")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -Wall -Wextra -Wno-missing-field-initializers -O0")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -Wall -Wextra -fomit-frame-pointer -Wno-missing-field-initializers ${march_flag}")
set(DINDEXER_PUB_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
get_git_head_revision(GIT_REFSPEC PROJECT_VERSION_GIT)

View file

@ -29,4 +29,16 @@
#define ACTION_PREFIX "@bare_name@-"
#define DB_OWNER_NAME "@DB_OWNER_NAME@"
#if defined(NDEBUG)
# define CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS_RELEASE@"
# define CMAKE_C_FLAGS "@CMAKE_C_FLAGS_RELEASE@"
#else
# define CMAKE_CXX_FLAGS "@CMAKE_CXX_FLAGS_DEBUG@"
# define CMAKE_C_FLAGS "@CMAKE_C_FLAGS_DEBUG@"
#endif
#define CMAKE_SYSTEM "@CMAKE_SYSTEM@"
#define CMAKE_CXX_COMPILER "@CMAKE_CXX_COMPILER@"
#define CMAKE_C_COMPILER "@CMAKE_C_COMPILER@"
#define CMAKE_VERSION "@CMAKE_VERSION@"
#endif

View file

@ -35,6 +35,10 @@ void print_builtin_feats() {
#else
printf("NDEBUG = no (Debug build)\n");
#endif
printf("Built on %s (CMake %s)\n", CMAKE_SYSTEM, CMAKE_VERSION);
printf("Build flags:\n");
printf(" %s %s\n", CMAKE_CXX_COMPILER, CMAKE_CXX_FLAGS);
printf(" %s %s\n", CMAKE_C_COMPILER, CMAKE_C_FLAGS);
printf("DB_OWNER_NAME = \"%s\"\n", DB_OWNER_NAME);
}