aboutsummaryrefslogtreecommitdiff
path: root/dep
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2017-10-31 01:29:51 +0100
committerNaios <naios-dev@live.de>2017-12-17 20:22:33 +0100
commite60c1f84a7e13577a82046b02b214f9466d20a7c (patch)
tree4413801132daff4fd180cd6569ffde230b5ba50b /dep
parent5a9ccae3e1115d6fb1dcc287b1cb2d45779fd39b (diff)
Build: Use interface targets for inheriting flags and definitions
* Remove the usage of global flags and definitions set through the CMAKE_CXX_FLAGS variable. * Use cmake target compile features for setting the CXX standard automatically. * Make C++14 globally available in the project * Closes #21033
Diffstat (limited to 'dep')
-rw-r--r--dep/CMakeLists.txt11
-rw-r--r--dep/bzip2/CMakeLists.txt4
-rw-r--r--dep/efsw/CMakeLists.txt2
-rw-r--r--dep/fmt/CMakeLists.txt4
-rw-r--r--dep/g3dlite/CMakeLists.txt2
-rw-r--r--dep/gsoap/CMakeLists.txt4
-rw-r--r--dep/jemalloc/CMakeLists.txt2
-rw-r--r--dep/libmpq/CMakeLists.txt2
-rw-r--r--dep/recastnavigation/Detour/CMakeLists.txt2
-rw-r--r--dep/recastnavigation/Recast/CMakeLists.txt2
-rw-r--r--dep/zlib/CMakeLists.txt4
11 files changed, 28 insertions, 11 deletions
diff --git a/dep/CMakeLists.txt b/dep/CMakeLists.txt
index ca34b2eeba1..3262b42960f 100644
--- a/dep/CMakeLists.txt
+++ b/dep/CMakeLists.txt
@@ -8,17 +8,6 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- # Search twice, once for space after /W argument, once for end of line as CMake regex has no \b
- string(REGEX REPLACE "/W[0-4] " "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- string(REGEX REPLACE "/W[0-4]$" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
- string(REGEX REPLACE "/W[0-4] " "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- string(REGEX REPLACE "/W[0-4]$" "" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
- add_definitions(/W0)
-else()
- add_definitions(-w)
-endif()
-
add_subdirectory(threads)
if(SERVERS OR TOOLS)
diff --git a/dep/bzip2/CMakeLists.txt b/dep/bzip2/CMakeLists.txt
index ad3d92933c4..22a3d522c04 100644
--- a/dep/bzip2/CMakeLists.txt
+++ b/dep/bzip2/CMakeLists.txt
@@ -30,6 +30,10 @@ else()
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
+ target_link_libraries(bzip2
+ PRIVATE
+ trinity-dependency-interface)
+
set_target_properties(bzip2
PROPERTIES
FOLDER
diff --git a/dep/efsw/CMakeLists.txt b/dep/efsw/CMakeLists.txt
index f268558a527..b37e5021e0a 100644
--- a/dep/efsw/CMakeLists.txt
+++ b/dep/efsw/CMakeLists.txt
@@ -73,6 +73,8 @@ if (BUILD_SHARED_LIBS)
${CMAKE_CURRENT_SOURCE_DIR}/src)
target_link_libraries(efsw
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
threads
${OPTIONAL_MAC_LINK_LIBRARIES})
diff --git a/dep/fmt/CMakeLists.txt b/dep/fmt/CMakeLists.txt
index 2961a0fc139..c764135e607 100644
--- a/dep/fmt/CMakeLists.txt
+++ b/dep/fmt/CMakeLists.txt
@@ -46,6 +46,10 @@ target_compile_definitions(fmt
-DFMT_USE_DELETED_FUNCTIONS
-DFMT_USE_EXTERN_TEMPLATES)
+target_link_libraries(fmt
+ PRIVATE
+ trinity-dependency-interface)
+
set_target_properties(fmt
PROPERTIES
FOLDER
diff --git a/dep/g3dlite/CMakeLists.txt b/dep/g3dlite/CMakeLists.txt
index 6409993a0b1..91eff29c6cb 100644
--- a/dep/g3dlite/CMakeLists.txt
+++ b/dep/g3dlite/CMakeLists.txt
@@ -61,6 +61,8 @@ target_include_directories(g3dlib
${CMAKE_CURRENT_SOURCE_DIR}/include)
target_link_libraries(g3dlib
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
zlib
threads)
diff --git a/dep/gsoap/CMakeLists.txt b/dep/gsoap/CMakeLists.txt
index 29c54f7c6f3..dcdab7773fb 100644
--- a/dep/gsoap/CMakeLists.txt
+++ b/dep/gsoap/CMakeLists.txt
@@ -18,6 +18,10 @@ target_include_directories(gsoap
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
+target_link_libraries(gsoap
+ PRIVATE
+ trinity-dependency-interface)
+
set_target_properties(gsoap
PROPERTIES
FOLDER
diff --git a/dep/jemalloc/CMakeLists.txt b/dep/jemalloc/CMakeLists.txt
index 6362714f2ee..1d2a72c8f4b 100644
--- a/dep/jemalloc/CMakeLists.txt
+++ b/dep/jemalloc/CMakeLists.txt
@@ -83,6 +83,8 @@ if(CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT NOJEM)
-D_REENTRAN)
target_link_libraries(jemalloc
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
threads
valgrind
diff --git a/dep/libmpq/CMakeLists.txt b/dep/libmpq/CMakeLists.txt
index dfffc1ee5f0..937e2c21792 100644
--- a/dep/libmpq/CMakeLists.txt
+++ b/dep/libmpq/CMakeLists.txt
@@ -26,6 +26,8 @@ target_include_directories(mpq
${CMAKE_SOURCE_DIR}/dep/bzip2)
target_link_libraries(mpq
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
zlib
bzip2)
diff --git a/dep/recastnavigation/Detour/CMakeLists.txt b/dep/recastnavigation/Detour/CMakeLists.txt
index 078e39f0a80..d99cf1bdb09 100644
--- a/dep/recastnavigation/Detour/CMakeLists.txt
+++ b/dep/recastnavigation/Detour/CMakeLists.txt
@@ -25,6 +25,8 @@ target_include_directories(Detour
${CMAKE_CURRENT_SOURCE_DIR}/Include)
target_link_libraries(Detour
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
zlib)
diff --git a/dep/recastnavigation/Recast/CMakeLists.txt b/dep/recastnavigation/Recast/CMakeLists.txt
index b21c5e38a4f..34511bedd08 100644
--- a/dep/recastnavigation/Recast/CMakeLists.txt
+++ b/dep/recastnavigation/Recast/CMakeLists.txt
@@ -29,6 +29,8 @@ target_include_directories(Recast
${CMAKE_CURRENT_SOURCE_DIR}/Include)
target_link_libraries(Recast
+ PRIVATE
+ trinity-dependency-interface
PUBLIC
zlib)
diff --git a/dep/zlib/CMakeLists.txt b/dep/zlib/CMakeLists.txt
index 77352d81c82..623f6b7183e 100644
--- a/dep/zlib/CMakeLists.txt
+++ b/dep/zlib/CMakeLists.txt
@@ -43,6 +43,10 @@ else()
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
+ target_link_libraries(zlib
+ PRIVATE
+ trinity-dependency-interface)
+
set_target_properties(zlib
PROPERTIES
FOLDER