Проба 1

This commit is contained in:
Andrei Astafev 2020-03-30 11:09:25 +03:00
parent 2d990c1747
commit 925c34b886
4 changed files with 35 additions and 14 deletions

View File

@ -27,9 +27,9 @@ include(CMLibCompilerFlags)
include(CMLibDistCC) include(CMLibDistCC)
include(CMLibCompilerFeaturesHPPGenerate) include(CMLibCompilerFeaturesHPPGenerate)
include(CMLibFlagRemove) include(CMLibFlagRemove)
include(CMLibBuildTypes)
include(CMLibCommonTargetProperties) include(CMLibCommonTargetProperties)
include(CMLibCommonLibraryTarget) include(CMLibCommonLibraryTarget)
include(CMLibBuildTypes)
include(CMLibCodeAnalysisPvsStudio) include(CMLibCodeAnalysisPvsStudio)
include(CMLibCodeAnalysisClangAnalyze) include(CMLibCodeAnalysisClangAnalyze)
include(CMLibCodeAnalysisClangTidy) include(CMLibCodeAnalysisClangTidy)

View File

@ -92,4 +92,35 @@ function(common_target_properties Name)
endif() endif()
endif() endif()
if(CMAKE_BUILD_TYPE STREQUAL Profile)
target_compile_definitions(
${Name}
${__visibility}
PROFILE=1)
elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions(
${Name}
${__visibility}
DEBUG=1)
elseif(CMAKE_BUILD_TYPE STREQUAL Release)
target_compile_definitions(
${Name}
${__visibility}
RELEASE=1)
elseif(CMAKE_BUILD_TYPE STREQUAL None)
target_compile_definitions(
${Name}
${__visibility}
ANALYSIS=1)
endif()
target_compile_definitions(
${Name}
${__visibility}
"ORGANIZATION_NAME=${CMLIB_ORGANIZATION_NAME_CANONICAL}")
target_compile_definitions(
${Name}
${__visibility}
"PROJECT_NAME=${CMLIB_PROJECT_NAME_CANONICAL}")
endfunction() endfunction()

View File

@ -5,18 +5,8 @@
#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_STR "@PROJECT_VERSION@" #define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_STR "@PROJECT_VERSION@"
#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_INT @PROJECT_VERSION_INT@ #define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_INT @PROJECT_VERSION_INT@
#define ORGANIZATION_NAME "@ORGANIZATION_NAME@" #define @CMLIB_PROJECT_NAME_CANONICAL@_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#define ORGANIZATION_NAME_LOWER "@ORGANIZATION_NAME_LOWER@" #define @CMLIB_PROJECT_NAME_CANONICAL@_BUILD_DATE "@TODAY@"
#define ORGANIZATION_NAME_UPPER "@ORGANIZATION_NAME_UPPER@"
#define PROJECT_NAME "@CMAKE_PROJECT_NAME@"
#define PROJECT_NAME_LOWER "@CMAKE_PROJECT_NAME_LOWER@"
#define PROJECT_NAME_UPPER "@CMAKE_PROJECT_NAME_UPPER@"
#define BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#define BUILD_DATE "@TODAY@"
#cmakedefine PROFILE @PROFILE@
#cmakedefine DEBUG @DEBUG@
#cmakedefine RELEASE @RELEASE@
#cmakedefine ANALYSIS @ANALYSIS@
#cmakedefine _LARGEFILE_SOURCE #cmakedefine _LARGEFILE_SOURCE
#cmakedefine _LARGE_FILES #cmakedefine _LARGE_FILES

@ -1 +1 @@
Subproject commit 26eced86d8e759c625b697f6b0588d7a28746725 Subproject commit dfa7faf459634501a7b76944ad264d5959f14615