[pkg-d-commits] [ldc] 125/149: Require CMake >= 2.8.9 and update Travis' CMake
Matthias Klumpp
mak at moszumanska.debian.org
Sun Apr 23 22:37:05 UTC 2017
This is an automated email from the git hooks/post-receive script.
mak pushed a commit to annotated tag v1.2.0
in repository ldc.
commit 647e3b6fb2c9200e0a7c1a923625bc061850b5cc
Author: Martin <noone at nowhere.com>
Date: Sat Mar 4 17:09:50 2017 +0100
Require CMake >= 2.8.9 and update Travis' CMake
The POSITION_INDEPENDENT_CODE target property seems to be supported since
CMake 2.8.9, and Ubuntu 12.04 uses 2.8.7.
---
.travis.yml | 3 +++
driver/cl_options.cpp | 2 +-
runtime/CMakeLists.txt | 9 +++++++--
runtime/profile-rt/DefineBuildProfileRT.cmake | 9 +--------
4 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 1b89c88..8f4986d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,6 +39,7 @@ addons:
apt:
sources:
- ubuntu-toolchain-r-test
+ - george-edison55-precise-backports # more recent CMake
packages:
- libconfig++8-dev
- gdb
@@ -51,6 +52,8 @@ addons:
- libedit2
- libedit-dev
- libcurl3:i386
+ - cmake
+ - cmake-data
before_install:
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
diff --git a/driver/cl_options.cpp b/driver/cl_options.cpp
index 338a9cc..2ec27bc 100644
--- a/driver/cl_options.cpp
+++ b/driver/cl_options.cpp
@@ -325,7 +325,7 @@ cl::opt<std::string>
#endif
cl::opt<llvm::Reloc::Model> mRelocModel(
- "relocation-model", cl::desc("Relocation model"),
+ "relocation-model", cl::desc("Relocation model"), cl::ZeroOrMore,
#if LDC_LLVM_VER < 309
cl::init(llvm::Reloc::Default),
#endif
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 7978768..502ec0f 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -1,6 +1,6 @@
project(runtime)
-cmake_minimum_required(VERSION 2.8.5)
+cmake_minimum_required(VERSION 2.8.9)
#
# Main configuration.
@@ -480,7 +480,12 @@ macro(build_runtime_variants d_flags c_flags ld_flags path_suffix outlist_target
"${path_suffix}"
${outlist_targets}
)
- build_profile_runtime ("${d_flags}" "${c_flags}" "${ld_flags}" "${path_suffix}" ${outlist_targets})
+
+ if(LDC_WITH_PGO)
+ build_profile_runtime("${d_flags};${D_FLAGS};${D_FLAGS_RELEASE}" "${c_flags}" "${ld_flags}" "${path_suffix}" ${outlist_targets})
+ get_target_suffix("" "${path_suffix}" target_suffix)
+ set_common_library_properties(ldc-profile-rt${target_suffix})
+ endif()
endmacro()
# Setup the build of profile-rt
diff --git a/runtime/profile-rt/DefineBuildProfileRT.cmake b/runtime/profile-rt/DefineBuildProfileRT.cmake
index 80816ef..fe6128d 100644
--- a/runtime/profile-rt/DefineBuildProfileRT.cmake
+++ b/runtime/profile-rt/DefineBuildProfileRT.cmake
@@ -16,8 +16,6 @@ if (LDC_WITH_PGO)
if (NOT (LDC_LLVM_VER GREATER 309))
set(PROFRT_EXTRA_LDFLAGS "Ws2_32.lib")
endif()
- else()
- set(PROFRT_EXTRA_FLAGS "-fPIC -O3")
endif()
CHECK_CXX_SOURCE_COMPILES("
@@ -115,9 +113,4 @@ if (LDC_WITH_PGO)
# Install D interface files to profile-rt.
install(DIRECTORY ${PROFILERT_DIR}/d/ldc DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.d")
-
-else()
- # No profiling supported, define NOP macro
- macro(build_profile_runtime c_flags ld_flags path_suffix outlist_targets)
- endmacro()
-endif()
\ No newline at end of file
+endif()
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git
More information about the pkg-d-commits
mailing list