diff options
author | Naios <naios-dev@live.de> | 2016-03-24 18:19:56 +0100 |
---|---|---|
committer | Naios <naios-dev@live.de> | 2016-04-11 21:41:58 +0200 |
commit | 8660f90bdfaeb33afd9bf63988b30d7783a527cc (patch) | |
tree | bd1fc4c09ecf2eeac7667c8018f9c9dfc5d1b8b4 /cmake/compiler | |
parent | c5c922da9f73e51bfbbb9a1450ed492741aae0a5 (diff) |
Core/Scripts: Split script subdirectories into independent modules
* Makes it possible to define the linkage for every module
* Move the ScriptPCH into the root directory
* Changes the SCRIPTS cmake variable to a string type:
-> -DSCRIPTS=0 is -DSCRIPTS="minimal-static" now
(builds commands and spells statically)
-> -DSCRIPTS=1 is -DSCRIPTS="static" now
(builds all modules statically)
-> -DSCRIPTS="dynamic"
(builds all modules dynamically)
-> Also the default value which is provided by the SCRIPTS
variable is overwriteable through the SCRIPTS_COMMANDS,
SCRIPTS_SPELLS... variable.
(cherry picked from commit 848b8a4136a4b395bfab74899520c74812d7f08e)
Diffstat (limited to 'cmake/compiler')
-rw-r--r-- | cmake/compiler/clang/settings.cmake | 2 | ||||
-rw-r--r-- | cmake/compiler/gcc/settings.cmake | 2 | ||||
-rw-r--r-- | cmake/compiler/msvc/settings.cmake | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/cmake/compiler/clang/settings.cmake b/cmake/compiler/clang/settings.cmake index 9a8cb85275e..1cd95bbf703 100644 --- a/cmake/compiler/clang/settings.cmake +++ b/cmake/compiler/clang/settings.cmake @@ -19,7 +19,7 @@ endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-narrowing -Wno-deprecated-register") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG=1") -if (WITH_DYNAMIC_LINKING) +if (BUILD_SHARED_LIBS) # -fPIC is needed to allow static linking in shared libs. # -fvisibility=hidden sets the default visibility to hidden to prevent exporting of all symbols. set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fvisibility=hidden") diff --git a/cmake/compiler/gcc/settings.cmake b/cmake/compiler/gcc/settings.cmake index d9eda767b8e..c4f97f4ffd4 100644 --- a/cmake/compiler/gcc/settings.cmake +++ b/cmake/compiler/gcc/settings.cmake @@ -35,7 +35,7 @@ if( WITH_COREDEBUG ) message(STATUS "GCC: Debug-flags set (-g3)") endif() -if (WITH_DYNAMIC_LINKING) +if (BUILD_SHARED_LIBS) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -fvisibility=hidden -Wno-attributes") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -fvisibility=hidden -Wno-attributes") diff --git a/cmake/compiler/msvc/settings.cmake b/cmake/compiler/msvc/settings.cmake index 336ed84c8ed..afde70b0f79 100644 --- a/cmake/compiler/msvc/settings.cmake +++ b/cmake/compiler/msvc/settings.cmake @@ -42,7 +42,7 @@ endif() # multithreaded compiling on VS set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP") -if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0) OR WITH_DYNAMIC_LINKING) +if((PLATFORM EQUAL 64) OR (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.0.23026.0) OR BUILD_SHARED_LIBS) # Enable extended object support set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj") message(STATUS "MSVC: Enabled increased number of sections in object files") @@ -80,7 +80,7 @@ if(NOT WITH_WARNINGS) message(STATUS "MSVC: Disabled generic compiletime warnings") endif() -if (WITH_DYNAMIC_LINKING) +if (BUILD_SHARED_LIBS) # C4251: needs to have dll-interface to be used by clients of class '...' # C4275: non dll-interface class ...' used as base for dll-interface class '...' set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4251 /wd4275") |