• Home
  • Raw
  • Download

Lines Matching +full:set +full:- +full:version

1 cmake_minimum_required(VERSION 3.1...3.18)
5 cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
10 set(MASTER_PROJECT OFF)
12 set(MASTER_PROJECT ON)
13 message(STATUS "CMake version: ${CMAKE_VERSION}")
18 set(result )
20 set(result "${result}${arg}")
22 set(${result_var} "${result}" PARENT_SCOPE)
28 # set(<variable> <value>... CACHE <type> <docstring>...)
41 set(${var} ${val} CACHE ${type} ${doc})
44 # Set the default CMAKE_BUILD_TYPE to Release.
45 # This should be done before the project command since the latter can set
68 option(FMT_CUDA_TEST "Generate the cuda-test target." OFF)
71 # Get version from core.h
73 if (NOT core_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])")
82 message(STATUS "Version: ${FMT_VERSION}")
87 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
90 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
98 if (${index} GREATER -1)
101 set(FMT_REQUIRED_FEATURES cxx_variadic_templates)
106 set(PEDANTIC_COMPILE_FLAGS -pedantic-errors -Wall -Wextra -pedantic
107 -Wold-style-cast -Wundef
108 -Wredundant-decls -Wwrite-strings -Wpointer-arith
109 -Wcast-qual -Wformat=2 -Wmissing-include-dirs
110 -Wcast-align
111 -Wctor-dtor-privacy -Wdisabled-optimization
112 -Winvalid-pch -Woverloaded-virtual
113 -Wconversion -Wswitch-enum -Wundef
114 -Wno-ctor-dtor-privacy -Wno-format-nonliteral)
116 set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wnoexcept
117 -Wno-dangling-else -Wno-unused-local-typedefs)
120 set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wdouble-promotion
121 -Wtrampolines -Wzero-as-null-pointer-constant -Wuseless-cast
122 -Wvector-operation-performance -Wsized-deallocation)
125 set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS} -Wshift-overflow=2
126 -Wnull-dereference -Wduplicated-cond)
128 set(WERROR_FLAG -Werror)
132 set(PEDANTIC_COMPILE_FLAGS -Wall -Wextra -pedantic -Wconversion -Wundef
133 -Wdeprecated -Wweak-vtables)
134 check_cxx_compiler_flag(-Wzero-as-null-pointer-constant HAS_NULLPTR_WARNING)
136 set(PEDANTIC_COMPILE_FLAGS ${PEDANTIC_COMPILE_FLAGS}
137 -Wzero-as-null-pointer-constant)
139 set(WERROR_FLAG -Werror)
143 set(PEDANTIC_COMPILE_FLAGS /W3)
144 set(WERROR_FLAG /WX)
148 # If Microsoft SDK is installed create script run-msbuild.bat that
149 # calls SetEnv.cmd to set up build environment and runs msbuild.
154 set(MSBUILD_SETUP "call \"${WINSDK_SETENV}\"")
156 # Set FrameworkPathOverride to get rid of MSB3644 warnings.
160 file(WRITE run-msbuild.bat "
162 ${CMAKE_MAKE_PROGRAM} -p:FrameworkPathOverride=\"${netfxpath}\" %*")
165 set(strtod_l_headers stdlib.h)
167 set(strtod_l_headers ${strtod_l_headers} xlocale.h)
178 set(headers ${${VAR}})
180 set(headers ${headers} include/fmt/${header})
182 set(${VAR} ${headers} PARENT_SCOPE)
186 add_headers(FMT_HEADERS chrono.h color.h compile.h core.h format.h format-inl.h
189 set(FMT_SOURCES src/format.cc src/os.cc)
191 set(FMT_SOURCES src/format.cc)
202 check_cxx_compiler_flag("Wa,-mbig-obj" FMT_HAS_MBIG_OBJ)
204 target_compile_options(fmt PUBLIC "-Wa,-mbig-obj")
221 set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.")
224 VERSION ${FMT_VERSION} SOVERSION ${CPACK_PACKAGE_VERSION_MAJOR}
227 # Set FMT_LIB_NAME for pkg-config fmt.pc. We cannot use the OUTPUT_NAME target
228 # property because it's not set by default.
229 set(FMT_LIB_NAME fmt)
231 set(FMT_LIB_NAME ${FMT_LIB_NAME}${FMT_DEBUG_POSTFIX})
238 # unused-direct-shlib-dependency /usr/lib/libformat.so.1.1.0 /lib/libm.so.6.
239 target_link_libraries(fmt -Wl,--as-needed)
247 add_library(fmt-header-only INTERFACE)
248 add_library(fmt::fmt-header-only ALIAS fmt-header-only)
250 target_compile_definitions(fmt-header-only INTERFACE FMT_HEADER_ONLY=1)
251 target_compile_features(fmt-header-only INTERFACE ${FMT_REQUIRED_FEATURES})
253 target_include_directories(fmt-header-only INTERFACE
264 set(version_config ${PROJECT_BINARY_DIR}/fmt-config-version.cmake)
265 set(project_config ${PROJECT_BINARY_DIR}/fmt-config.cmake)
266 set(pkgconfig ${PROJECT_BINARY_DIR}/fmt.pc)
267 set(targets_export_name fmt-targets)
278 # Generate the version, config and target files into the build directory.
281 VERSION ${FMT_VERSION}
292 ${PROJECT_SOURCE_DIR}/support/cmake/fmt-config.cmake.in
296 set(INSTALL_TARGETS fmt fmt-header-only)
302 # Install version, config and target files.
338 # See also https://llvm.org/docs/LibFuzzer.html#fuzzer-friendly-build-mode.
342 set(gitignore ${PROJECT_SOURCE_DIR}/.gitignore)
350 set(ignored_files ${ignored_files} "${line}$" "${line}/")
352 set(ignored_files ${ignored_files}
353 /.git /breathe /format-benchmark sphinx/ .buildinfo .doctrees)
355 set(CPACK_SOURCE_GENERATOR ZIP)
356 set(CPACK_SOURCE_IGNORE_FILES ${ignored_files})
357 set(CPACK_SOURCE_PACKAGE_FILE_NAME fmt-${FMT_VERSION})
358 set(CPACK_PACKAGE_NAME fmt)
359 set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.rst)