forked from boostorg/json
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
- Loading branch information
1 parent
61a0691
commit bc95b55
Showing
10 changed files
with
140 additions
and
214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
bin | ||
bin64 | ||
*.*# | ||
/bin | ||
/bin64 | ||
temp | ||
|
||
# Because of CMake and VS2017 | ||
Win32/ | ||
x64/ | ||
out/ | ||
.vs/ | ||
# Emacs | ||
*# | ||
|
||
# Vim | ||
*~ | ||
|
||
# Visual Studio | ||
/.vs | ||
/out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Include gcc options. | ||
include(${CMAKE_CURRENT_LIST_DIR}/gcc.cmake) | ||
|
||
# Compiler options. | ||
add_compile_options(-Wrange-loop-analysis) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# C++ standard. | ||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "") | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE STRING "") | ||
set(CMAKE_CXX_EXTENSIONS OFF CACHE STRING "") | ||
|
||
# Static library linkage. | ||
set(BUILD_SHARED_LIBS OFF CACHE STRING "") | ||
add_definitions(-DBOOST_ALL_STATIC_LINK=1) | ||
|
||
# Interprocedural optimization. | ||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON CACHE STRING "") | ||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL ON CACHE STRING "") | ||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO ON CACHE STRING "") | ||
|
||
# Compiler definitions. | ||
if(WIN32) | ||
add_definitions(-D_WIN32_WINNT=0x0601 -D_CRT_SECURE_NO_WARNINGS) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Include common options. | ||
include(${CMAKE_CURRENT_LIST_DIR}/common.cmake) | ||
|
||
# Compiler options. | ||
add_compile_options(-Wall -Wextra -Wpedantic -Wno-unused-parameter) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.