Compare commits

..

No commits in common. "0eb74fc971ad0792016b19b6f855166440487081" and "925c34b886cf79333a39dc25f85a12a2b5775b61" have entirely different histories.

4 changed files with 17 additions and 76 deletions

View File

@ -96,21 +96,31 @@ function(common_target_properties Name)
target_compile_definitions( target_compile_definitions(
${Name} ${Name}
${__visibility} ${__visibility}
PROFILE) PROFILE=1)
elseif(CMAKE_BUILD_TYPE STREQUAL Debug) elseif(CMAKE_BUILD_TYPE STREQUAL Debug)
target_compile_definitions( target_compile_definitions(
${Name} ${Name}
${__visibility} ${__visibility}
DEBUG) DEBUG=1)
elseif(CMAKE_BUILD_TYPE STREQUAL Release) elseif(CMAKE_BUILD_TYPE STREQUAL Release)
target_compile_definitions( target_compile_definitions(
${Name} ${Name}
${__visibility} ${__visibility}
RELEASE) RELEASE=1)
elseif(CMAKE_BUILD_TYPE STREQUAL None) elseif(CMAKE_BUILD_TYPE STREQUAL None)
target_compile_definitions( target_compile_definitions(
${Name} ${Name}
${__visibility} ${__visibility}
ANALYSIS) ANALYSIS=1)
endif() 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

@ -3,6 +3,6 @@ function(cmlib_config_hpp_generate)
cmlib_test_large_files(HAVE_LARGEFILES) cmlib_test_large_files(HAVE_LARGEFILES)
get_property(PROJECT_VERSION_INT GLOBAL PROPERTY PROJECT_VERSION_INT) get_property(PROJECT_VERSION_INT GLOBAL PROPERTY PROJECT_VERSION_INT)
configure_file(${CMLIB_MODULE_DIR}/hpp/cmlib_private_config.hpp.in configure_file(${CMLIB_MODULE_DIR}/hpp/cmlib_config.hpp.in
${CMAKE_BINARY_DIR}/include/cmlib_private_config.hpp) ${CMAKE_BINARY_DIR}/include/${CMLIB_PROJECT_NAME_LOWER}_cmlib_config.hpp)
endfunction() endfunction()

View File

@ -9,7 +9,7 @@ function(add_format_sources)
find_program(UNCRUSTIFY_EXE NAMES uncrustify) find_program(UNCRUSTIFY_EXE NAMES uncrustify)
if(UNCRUSTIFY_EXE) if(UNCRUSTIFY_EXE)
list(APPEND UNCRUSTIFY_OPTS -lCPP --replace --no-backup --mtime) list(APPEND UNCRUSTIFY_OPTS -lCPP --replace --no-backup)
if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg) if(EXISTS ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg) list(APPEND UNCRUSTIFY_OPTS -c ${CMAKE_SOURCE_DIR}/cmake/etc/uncrustify/default.cfg)
endif() endif()

View File

@ -1,69 +0,0 @@
#ifndef @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_
#define @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_
#pragma once
#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_STR "@PROJECT_VERSION@"
#define @CMLIB_PROJECT_NAME_CANONICAL@_VERSION_INT @PROJECT_VERSION_INT@
#if defined (CMLIB_ORGANIZATION_NAME)
#error "Duplicate definition of macros CMLIB_ORGANIZATION_NAME"
#else
#define CMLIB_ORGANIZATION_NAME "@ORGANIZATION_NAME@"
#endif
#if defined (CMLIB_ORGANIZATION_NAME_LOWER)
#error "Duplicate definition of macros CMLIB_ORGANIZATION_NAME_LOWER"
#else
#define CMLIB_ORGANIZATION_NAME_LOWER "@ORGANIZATION_NAME_LOWER@"
#endif
#if defined (CMLIB_ORGANIZATION_NAME_UPPER)
#error "Duplicate definition of macros CMLIB_ORGANIZATION_NAME_UPPER"
#else
#define CMLIB_ORGANIZATION_NAME_UPPER "@ORGANIZATION_NAME_UPPER@"
#endif
#if defined (CMLIB_PROJECT_NAME)
#error "Duplicate definition of macros CMLIB_PROJECT_NAME"
#else
#define CMLIB_PROJECT_NAME "@CMAKE_PROJECT_NAME@"
#endif
#if defined (CMLIB_PROJECT_NAME_LOWER)
#error "Duplicate definition of macros CMLIB_PROJECT_NAME_LOWER"
#else
#define CMLIB_PROJECT_NAME_LOWER "@CMAKE_PROJECT_NAME_LOWER@"
#endif
#if defined (CMLIB_PROJECT_NAME_UPPER)
#error "Duplicate definition of macros CMLIB_PROJECT_NAME_UPPER"
#else
#define CMLIB_PROJECT_NAME_UPPER "@CMAKE_PROJECT_NAME_UPPER@"
#endif
#if defined (CMLIB_BUILD_TYPE)
#error "Duplicate definition of macros CMLIB_BUILD_TYPE"
#else
#define CMLIB_BUILD_TYPE "@CMAKE_BUILD_TYPE@"
#endif
#if defined (CMLIB_BUILD_DATE)
#error "Duplicate definition of macros CMLIB_BUILD_DATE"
#else
#define CMLIB_BUILD_DATE "@TODAY@"
#endif
#cmakedefine _LARGEFILE_SOURCE
#cmakedefine _LARGE_FILES
#cmakedefine _FILE_OFFSET_BITS @_FILE_OFFSET_BITS@
#cmakedefine HAVE_FSEEKO
#cmakedefine HAVE__FSEEKI64
#cmakedefine HAVE_LARGEFILES @HAVE_LARGEFILES@
#define TARGET_LSB_ID_@LSB_DISTRIBUTOR_ID@
#define TARGET_LSB_CODENAME_@LSB_CODENAME@
#define TARGET_LSB_RELEASE "@LSB_RELEASE@"
#endif /* @CMLIB_PROJECT_NAME_CANONICAL@_CMLIB_CONFIG_HPP_ */