Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
131162b0
Commit
131162b0
authored
Jan 24, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CMake policy CMP0054 warnings
parent
7a7ff6ec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
CMakeLists.txt
CMakeLists.txt
+15
-15
No files found.
CMakeLists.txt
View file @
131162b0
...
@@ -158,7 +158,7 @@ set(CAF_VERSION
...
@@ -158,7 +158,7 @@ set(CAF_VERSION
################################################################################
################################################################################
# prohibit in-source builds
# prohibit in-source builds
if
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
STREQUAL
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
if
(
CMAKE_CURRENT_SOURCE_DIR
STREQUAL
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
message
(
FATAL_ERROR
"In-source builds are not allowed. Please use "
message
(
FATAL_ERROR
"In-source builds are not allowed. Please use "
"./configure to choose a build directory and "
"./configure to choose a build directory and "
"initialize the build configuration."
)
"initialize the build configuration."
)
...
@@ -166,14 +166,14 @@ endif()
...
@@ -166,14 +166,14 @@ endif()
# set module path appropriately
# set module path appropriately
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
set
(
CMAKE_MODULE_PATH
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake"
)
# set binary output path if not defined by user
# set binary output path if not defined by user
if
(
"
${
EXECUTABLE_OUTPUT_PATH
}
"
STREQUAL
""
)
if
(
EXECUTABLE_OUTPUT_PATH
STREQUAL
""
)
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/bin"
)
set
(
EXECUTABLE_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/bin"
)
endif
()
endif
()
# set library output path if not defined by user, but always set
# set library output path if not defined by user, but always set
# library output path to binary output path for Xcode projects
# library output path to binary output path for Xcode projects
if
(
"
${
CMAKE_GENERATOR
}
"
STREQUAL
"Xcode"
)
if
(
CMAKE_GENERATOR
STREQUAL
"Xcode"
)
set
(
LIBRARY_OUTPUT_PATH
"
${
EXECUTABLE_OUTPUT_PATH
}
"
)
set
(
LIBRARY_OUTPUT_PATH
"
${
EXECUTABLE_OUTPUT_PATH
}
"
)
elseif
(
"
${
LIBRARY_OUTPUT_PATH
}
"
STREQUAL
""
)
elseif
(
LIBRARY_OUTPUT_PATH
STREQUAL
""
)
set
(
LIBRARY_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lib"
)
set
(
LIBRARY_OUTPUT_PATH
"
${
CMAKE_CURRENT_BINARY_DIR
}
/lib"
)
endif
()
endif
()
...
@@ -191,13 +191,13 @@ if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK)
...
@@ -191,13 +191,13 @@ if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK)
RUN_OUTPUT_VARIABLE CompilerVersion
)
RUN_OUTPUT_VARIABLE CompilerVersion
)
if
(
NOT CompilationSucceeded OR NOT ProgramResult EQUAL 0
)
if
(
NOT CompilationSucceeded OR NOT ProgramResult EQUAL 0
)
message
(
FATAL_ERROR
"Cannot determine compiler version"
)
message
(
FATAL_ERROR
"Cannot determine compiler version"
)
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
elseif
(
CMAKE_CXX_COMPILER_ID
MATCHES
"GNU"
)
if
(
CompilerVersion VERSION_GREATER 4.7
)
if
(
CompilerVersion VERSION_GREATER 4.7
)
message
(
STATUS
"Found g++ version
${
CompilerVersion
}
"
)
message
(
STATUS
"Found g++ version
${
CompilerVersion
}
"
)
else
()
else
()
message
(
FATAL_ERROR
"g++ >= 4.8 required (found:
${
CompilerVersion
}
)"
)
message
(
FATAL_ERROR
"g++ >= 4.8 required (found:
${
CompilerVersion
}
)"
)
endif
()
endif
()
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
elseif
(
CMAKE_CXX_COMPILER_ID
MATCHES
"Clang"
)
if
(
CompilerVersion VERSION_GREATER 3.1
)
if
(
CompilerVersion VERSION_GREATER 3.1
)
message
(
STATUS
"Found clang++ version
${
CompilerVersion
}
"
)
message
(
STATUS
"Found clang++ version
${
CompilerVersion
}
"
)
else
()
else
()
...
@@ -210,12 +210,12 @@ if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK)
...
@@ -210,12 +210,12 @@ if(NOT WIN32 AND NOT CAF_NO_COMPILER_CHECK)
endif
()
endif
()
# set optional build flags
# set optional build flags
# increase max. template depth on GCC and Clang
# increase max. template depth on GCC and Clang
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
if
(
CMAKE_CXX_COMPILER_ID
MATCHES
"Clang"
OR
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
OR
CMAKE_CXX_COMPILER_ID
MATCHES
"GNU"
)
build_string
(
"EXTRA_FLAGS"
"-ftemplate-depth=512 -ftemplate-backtrace-limit=0"
)
build_string
(
"EXTRA_FLAGS"
"-ftemplate-depth=512 -ftemplate-backtrace-limit=0"
)
endif
()
endif
()
# explicitly disable obnoxious GCC warnings
# explicitly disable obnoxious GCC warnings
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
if
(
CMAKE_CXX_COMPILER_ID
MATCHES
"GNU"
)
build_string
(
"EXTRA_FLAGS"
"-Wno-missing-field-initializers"
)
build_string
(
"EXTRA_FLAGS"
"-Wno-missing-field-initializers"
)
endif
()
endif
()
# add "-Werror" flag if --pedantic-build is used
# add "-Werror" flag if --pedantic-build is used
...
@@ -224,7 +224,7 @@ if(CAF_CXX_WARNINGS_AS_ERRORS)
...
@@ -224,7 +224,7 @@ if(CAF_CXX_WARNINGS_AS_ERRORS)
endif
()
endif
()
# set compiler flags for GCOV if requested
# set compiler flags for GCOV if requested
if
(
CAF_ENABLE_GCOV
)
if
(
CAF_ENABLE_GCOV
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
if
(
CMAKE_CXX_COMPILER_ID
MATCHES
"Clang"
)
set
(
NO_INLINE
"-fno-inline"
)
set
(
NO_INLINE
"-fno-inline"
)
else
()
else
()
set
(
NO_INLINE
"-fno-inline -fno-inline-small-functions -fno-default-inline"
)
set
(
NO_INLINE
"-fno-inline -fno-inline-small-functions -fno-default-inline"
)
...
@@ -237,14 +237,14 @@ if(CAF_FORCE_NO_EXCEPTIONS)
...
@@ -237,14 +237,14 @@ if(CAF_FORCE_NO_EXCEPTIONS)
endif
()
endif
()
# enable a ton of warnings if --more-clang-warnings is used
# enable a ton of warnings if --more-clang-warnings is used
if
(
CAF_MORE_WARNINGS
)
if
(
CAF_MORE_WARNINGS
)
if
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
if
(
CMAKE_CXX_COMPILER_ID
MATCHES
"Clang"
)
set
(
WFLAGS
"-Weverything -Wno-c++98-compat -Wno-padded "
set
(
WFLAGS
"-Weverything -Wno-c++98-compat -Wno-padded "
"-Wno-documentation-unknown-command -Wno-exit-time-destructors "
"-Wno-documentation-unknown-command -Wno-exit-time-destructors "
"-Wno-global-constructors -Wno-missing-prototypes "
"-Wno-global-constructors -Wno-missing-prototypes "
"-Wno-c++98-compat-pedantic -Wno-unused-member-function "
"-Wno-c++98-compat-pedantic -Wno-unused-member-function "
"-Wno-unused-const-variable -Wno-switch-enum "
"-Wno-unused-const-variable -Wno-switch-enum "
"-Wno-missing-noreturn -Wno-covered-switch-default"
)
"-Wno-missing-noreturn -Wno-covered-switch-default"
)
elseif
(
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"GNU"
)
elseif
(
CMAKE_CXX_COMPILER_ID
MATCHES
"GNU"
)
set
(
WFLAGS
"-Waddress -Wall -Warray-bounds "
set
(
WFLAGS
"-Waddress -Wall -Warray-bounds "
"-Wattributes -Wbuiltin-macro-redefined -Wcast-align "
"-Wattributes -Wbuiltin-macro-redefined -Wcast-align "
"-Wcast-qual -Wchar-subscripts -Wclobbered -Wcomment "
"-Wcast-qual -Wchar-subscripts -Wclobbered -Wcomment "
...
@@ -271,7 +271,7 @@ if(CAF_MORE_WARNINGS)
...
@@ -271,7 +271,7 @@ if(CAF_MORE_WARNINGS)
endif
()
endif
()
# add -stdlib=libc++ when using Clang if possible
# add -stdlib=libc++ when using Clang if possible
if
(
NOT CAF_NO_AUTO_LIBCPP AND
"
${
CMAKE_CXX_COMPILER_ID
}
"
MATCHES
"Clang"
)
if
(
NOT CAF_NO_AUTO_LIBCPP AND
CMAKE_CXX_COMPILER_ID
MATCHES
"Clang"
)
set
(
CXXFLAGS_BACKUP
"
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CXXFLAGS_BACKUP
"
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -stdlib=libc++"
)
set
(
CMAKE_CXX_FLAGS
"-std=c++11 -stdlib=libc++"
)
try_run
(
ProgramResult
try_run
(
ProgramResult
...
@@ -332,7 +332,7 @@ if(CAF_OSX_SYSROOT)
...
@@ -332,7 +332,7 @@ if(CAF_OSX_SYSROOT)
set
(
CMAKE_OSX_SYSROOT
"
${
CAF_OSX_SYSROOT
}
"
)
set
(
CMAKE_OSX_SYSROOT
"
${
CAF_OSX_SYSROOT
}
"
)
endif
()
endif
()
if
(
CAF_IOS_DEPLOYMENT_TARGET
)
if
(
CAF_IOS_DEPLOYMENT_TARGET
)
if
(
"
${
CAF_OSX_SYSROOT
}
"
STREQUAL
"iphonesimulator"
)
if
(
CAF_OSX_SYSROOT
STREQUAL
"iphonesimulator"
)
build_string
(
"EXTRA_FLAGS"
build_string
(
"EXTRA_FLAGS"
"-mios-simulator-version-min=
${
CAF_IOS_DEPLOYMENT_TARGET
}
"
)
"-mios-simulator-version-min=
${
CAF_IOS_DEPLOYMENT_TARGET
}
"
)
else
()
else
()
...
@@ -699,7 +699,7 @@ if(EXISTS "${MANUAL_DIR}"
...
@@ -699,7 +699,7 @@ if(EXISTS "${MANUAL_DIR}"
ERROR_QUIET
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# prefer tag name over auto-generated version
# prefer tag name over auto-generated version
if
(
"
${
GIT_TAG_RES
}
"
STREQUAL
"0"
)
if
(
GIT_TAG_RES
STREQUAL
"0"
)
set
(
CAF_RELEASE
"
${
GIT_TAG
}
"
)
set
(
CAF_RELEASE
"
${
GIT_TAG
}
"
)
else
()
else
()
set
(
CAF_RELEASE
"
${
CAF_VERSION
}
"
)
set
(
CAF_RELEASE
"
${
CAF_VERSION
}
"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment