diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-06-02 00:53:34 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-06-02 00:53:34 -0700 |
| commit | 729c2e7b6b5c2cb41a676ff8a162db440da23bf4 (patch) | |
| tree | b44a152f08591312840ff45f33b0d6fa683a9afa | |
| parent | dafb6ead6553eae4321586068ee7e3dd842e59f1 (diff) | |
| parent | 84207b2e0f14d2a8fd1ccc435b0c27f30b2ecce8 (diff) | |
| download | mruby-729c2e7b6b5c2cb41a676ff8a162db440da23bf4.tar.gz mruby-729c2e7b6b5c2cb41a676ff8a162db440da23bf4.zip | |
Merge pull request #218 from thecodeshop/cmake-xcode
enhance CMake support for Xcode native builds
| -rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ee97ad8b4..c8b252d2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,12 +33,13 @@ project(mruby C) # TODO stop polluting source tree with CMakeFiles/ and CMakeCache.txt # on build location check failure # Make sure we are not trying to generate in in-tree build unless building -# with a MSVC IDE where it's OK. -if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE) +# with an MSVC or Xcode IDE where it's OK. +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT (MSVC_IDE OR XCODE)) message(FATAL_ERROR "\nIn-source builds are not allowed as CMake would overwrite the " - "Makefiles distributed with mruby. Please change to the 'build' " - "subdirectory and run CMake from there.") + "Makefiles distributed with mruby. Delete any created 'CMakeFiles' " + "subdirectory and 'CMakeCache.txt' file from the current directory, " + "change to the 'build' subdirectory, and re-run CMake from there.") endif() if(COMMAND cmake_policy) |
