diff options
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLists.txt | 11 | ||||
-rw-r--r-- | Tests/FindOpenCL/Test/main.c | 9 | ||||
-rw-r--r-- | Tests/Plugin/src/example_exe.cxx | 3 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h | 0 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt | 1 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake | 3 | ||||
-rw-r--r-- | Tests/RunCMake/find_path/RunCMakeTest.cmake | 4 |
7 files changed, 25 insertions, 6 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 20f6c35..bb24b33 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -951,6 +951,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(CPackComponents_BUILD_OPTIONS) if(APPLE) set(CPackComponents_BUILD_OPTIONS -DCPACK_BINARY_DRAGNDROP:BOOL=ON) + if(CMake_TEST_XCODE_VERSION VERSION_GREATER "4.6") + set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} + -DCPACK_BINARY_PRODUCTBUILD:BOOL=ON) + endif() endif() if(NSIS_MAKENSIS_EXECUTABLE) set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} @@ -995,6 +999,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release list(APPEND ACTIVE_CPACK_GENERATORS "ZIP") if(APPLE) list(APPEND ACTIVE_CPACK_GENERATORS "DragNDrop") + if(CMake_TEST_XCODE_VERSION VERSION_GREATER "4.6") + list(APPEND ACTIVE_CPACK_GENERATORS "productbuild") + endif() endif() # set up list of component packaging ways @@ -1105,6 +1112,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release set(CPackComponents_BUILD_OPTIONS) if(APPLE) set(CPackComponents_BUILD_OPTIONS -DCPACK_BINARY_DRAGNDROP:BOOL=ON) + if(CMake_TEST_XCODE_VERSION VERSION_GREATER "4.6") + set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} + -DCPACK_BINARY_PRODUCTBUILD:BOOL=ON) + endif() endif() if(NOT NSIS_MAKENSIS_EXECUTABLE) set(CPackComponents_BUILD_OPTIONS ${CPackComponents_BUILD_OPTIONS} diff --git a/Tests/FindOpenCL/Test/main.c b/Tests/FindOpenCL/Test/main.c index b075caf..dc77636 100644 --- a/Tests/FindOpenCL/Test/main.c +++ b/Tests/FindOpenCL/Test/main.c @@ -1,16 +1,17 @@ #ifdef __APPLE__ - #include <OpenCL/opencl.h> +#include <OpenCL/opencl.h> #else - #include <CL/cl.h> +#include <CL/cl.h> #endif int main() { cl_uint platformIdCount; - // We can't assert on the result because this may return an error if no ICD is + // We can't assert on the result because this may return an error if no ICD + // is // found - clGetPlatformIDs (0, NULL, &platformIdCount); + clGetPlatformIDs(0, NULL, &platformIdCount); return 0; } diff --git a/Tests/Plugin/src/example_exe.cxx b/Tests/Plugin/src/example_exe.cxx index 857ad54..86b54f7 100644 --- a/Tests/Plugin/src/example_exe.cxx +++ b/Tests/Plugin/src/example_exe.cxx @@ -31,8 +31,7 @@ int main() kwsys::DynamicLoader::LibraryHandle handle = kwsys::DynamicLoader::OpenLibrary(libName.c_str()); if (!handle) { - std::cerr << "Could not open plugin \"" << libName.c_str() << "\"!" - << std::endl; + std::cerr << "Could not open plugin \"" << libName << "\"!" << std::endl; return 1; } kwsys::DynamicLoader::SymbolPointer sym = diff --git a/Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h b/Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers/Some/Dir/Header.h diff --git a/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt b/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt new file mode 100644 index 0000000..001a3e9 --- /dev/null +++ b/Tests/RunCMake/find_path/FrameworksWithSubdirs-stdout.txt @@ -0,0 +1 @@ +-- SOME_INCLUDE_DIR='[^']*Tests/RunCMake/find_path/Frameworks/Foo.framework/Headers' diff --git a/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake b/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake new file mode 100644 index 0000000..b286021 --- /dev/null +++ b/Tests/RunCMake/find_path/FrameworksWithSubdirs.cmake @@ -0,0 +1,3 @@ +set(CMAKE_FRAMEWORK_PATH "${CMAKE_CURRENT_SOURCE_DIR}/Frameworks") +find_path(SOME_INCLUDE_DIR "Some/Dir/Header.h") +message(STATUS "SOME_INCLUDE_DIR='${SOME_INCLUDE_DIR}'") diff --git a/Tests/RunCMake/find_path/RunCMakeTest.cmake b/Tests/RunCMake/find_path/RunCMakeTest.cmake index 5ce96e0..bf0fa89 100644 --- a/Tests/RunCMake/find_path/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_path/RunCMakeTest.cmake @@ -3,3 +3,7 @@ include(RunCMake) if(WIN32 OR CYGWIN) run_cmake(PrefixInPATH) endif() + +if(APPLE) + run_cmake(FrameworksWithSubdirs) +endif() |