diff options
author | Clinton Stimpson <clinton@elemtech.com> | 2013-12-19 04:25:29 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-01-02 18:41:49 (GMT) |
commit | d25ad482e978cbf5e4fcfa8b1dcc342ba93dcda0 (patch) | |
tree | f0a1f688356d4f346279bacc9203c467a5bb76ac /Tests/RunCMake/CMP0042 | |
parent | 2a384e08cc0809fec75ebb20be585fb5a1bf591a (diff) | |
download | CMake-d25ad482e978cbf5e4fcfa8b1dcc342ba93dcda0.zip CMake-d25ad482e978cbf5e4fcfa8b1dcc342ba93dcda0.tar.gz CMake-d25ad482e978cbf5e4fcfa8b1dcc342ba93dcda0.tar.bz2 |
OS X: Add CMP0042 to enable MACOSX_RPATH by default
Also adding documentation for CMAKE_MACOSX_RPATH, and improving
documentation for MACOSX_RPATH.
Diffstat (limited to 'Tests/RunCMake/CMP0042')
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-NEW-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-NEW-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-NEW.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-OLD.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-WARN-result.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-WARN-stderr.txt | 10 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMP0042-WARN.cmake | 9 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/RunCMakeTest.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CMP0042/empty.cpp | 7 |
12 files changed, 47 insertions, 0 deletions
diff --git a/Tests/RunCMake/CMP0042/CMP0042-NEW-result.txt b/Tests/RunCMake/CMP0042/CMP0042-NEW-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-NEW-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0042/CMP0042-NEW-stderr.txt b/Tests/RunCMake/CMP0042/CMP0042-NEW-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-NEW-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0042/CMP0042-NEW.cmake b/Tests/RunCMake/CMP0042/CMP0042-NEW.cmake new file mode 100644 index 0000000..778a444 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-NEW.cmake @@ -0,0 +1,4 @@ + +cmake_policy(SET CMP0042 NEW) + +add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt b/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt b/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-OLD-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0042/CMP0042-OLD.cmake b/Tests/RunCMake/CMP0042/CMP0042-OLD.cmake new file mode 100644 index 0000000..1aede96 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-OLD.cmake @@ -0,0 +1,4 @@ + +cmake_policy(SET CMP0042 OLD) + +add_library(foo SHARED empty.cpp) diff --git a/Tests/RunCMake/CMP0042/CMP0042-WARN-result.txt b/Tests/RunCMake/CMP0042/CMP0042-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0042/CMP0042-WARN-stderr.txt b/Tests/RunCMake/CMP0042/CMP0042-WARN-stderr.txt new file mode 100644 index 0000000..f3574a1 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-WARN-stderr.txt @@ -0,0 +1,10 @@ +CMake Warning \(dev\): + Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake + --help-policy CMP0042" for policy details. Use the cmake_policy command to + set the policy and suppress this warning. + + MACOSX_RPATH is not specified for the following targets: + + foo + +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0042/CMP0042-WARN.cmake b/Tests/RunCMake/CMP0042/CMP0042-WARN.cmake new file mode 100644 index 0000000..3fa32b1 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMP0042-WARN.cmake @@ -0,0 +1,9 @@ + +add_library(foo SHARED empty.cpp) +add_library(foo-static STATIC empty.cpp) +add_library(foo2 SHARED empty.cpp) +set_target_properties(foo2 PROPERTIES MACOSX_RPATH 1) +add_library(foo3 SHARED empty.cpp) +set_target_properties(foo3 PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@loader_path") +add_library(foo4 SHARED empty.cpp) +set_target_properties(foo4 PROPERTIES BUILD_WITH_INSTALL_RPATH 1 INSTALL_NAME_DIR "@rpath") diff --git a/Tests/RunCMake/CMP0042/CMakeLists.txt b/Tests/RunCMake/CMP0042/CMakeLists.txt new file mode 100644 index 0000000..11ea636 --- /dev/null +++ b/Tests/RunCMake/CMP0042/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/CMP0042/RunCMakeTest.cmake b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake new file mode 100644 index 0000000..3b226d7 --- /dev/null +++ b/Tests/RunCMake/CMP0042/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0042-OLD) +run_cmake(CMP0042-NEW) +run_cmake(CMP0042-WARN) diff --git a/Tests/RunCMake/CMP0042/empty.cpp b/Tests/RunCMake/CMP0042/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/CMP0042/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} |