mirror of
https://github.com/boostorg/json.git
synced 2025-05-11 05:33:57 +00:00
* Add VS CMake integration config * add cmake 3.10.0 support * fix compiler and linker flags * disable verbose build output * added cmake policy * Fix source groups * Group folder related settings * Add support for the boost superproject and cmake 3.16 * Remove library headers from executable projects * Fix boost superproject compatibility
29 lines
747 B
CMake
29 lines
747 B
CMake
# Include common options.
|
|
include(${CMAKE_CURRENT_LIST_DIR}/common.cmake)
|
|
|
|
# Static runtime linkage.
|
|
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
|
|
|
|
# Compiler options.
|
|
add_compile_options(
|
|
/permissive- # strict C++
|
|
/W4 # enable all warnings
|
|
/MP # multi-processor compilation
|
|
)
|
|
|
|
# Linker options.
|
|
add_link_options(
|
|
)
|
|
|
|
# Disable logos.
|
|
foreach(lang C CXX ASM_MASM RC)
|
|
set(CMAKE_${lang}_FLAGS_INIT "/nologo")
|
|
endforeach()
|
|
foreach(type EXE SHARED MODULE)
|
|
set(CMAKE_${type}_LINKER_FLAGS_INIT "/nologo")
|
|
endforeach()
|
|
|
|
# Silence Visual Studio CMake integration warnings.
|
|
set(SILENCE_VS_DEFINITIONS ${CMAKE_TOOLCHAIN_FILE} ${CMAKE_C_COMPILER})
|
|
set(SILENCE_VS_DEFINITIONS)
|