[CMake] Issue: CMake 3.1 + Xcode 6.1.1

Eric Nicolas erik.nicolas at gmail.com
Wed Dec 31 03:08:55 EST 2014


Hello,

I generate a Xcode project using CMake 3.1. The compilation runs fine, but
when I launch the binary within Xcode, it makes Xcode crash. The binary is
correct however as I can launch it from the command line without problems.

Here is a striped down CMakeLists.txt :
--------------------------------------------------------
cmake_minimum_required(VERSION 2.8)
project(cx21)

set(CMAKE_SUPPRESS_REGENERATION TRUE)
SET_PROPERTY(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++0x")

find_library(LIB_SDL SDL2            "../_contribs")
find_library(LIB_SDLIMAGE SDL2_image "../_contribs")

file(GLOB PKG_INC "tester/*.h")
file(GLOB PKG_SRC "tester/*.cpp")

source_group(include FILES ${PKG_INC})
source_group(src     FILES ${PKG_SRC})

add_executable(tester ${PKG_INC} ${PKG_SRC})
target_link_libraries(tester ${LIB_SDL} ${LIB_SDLIMAGE})
--------------------------------------------------------

Producing the Xcode project :
--------------------------------------------------------

MacBook-Air:_build enicolas$ cmake --version

cmake version 3.1.0

MacBook-Air:_build enicolas$ cmake -G Xcode ..

-- The C compiler identification is AppleClang 6.0.0.6000056

-- The CXX compiler identification is AppleClang 6.0.0.6000056

-- Check for working C compiler using: Xcode

-- Check for working C compiler using: Xcode -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler using: Xcode

-- Check for working CXX compiler using: Xcode -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Configuring done

-- Generating done

-- Build files have been written to: /Users/enicolas/dev/cx21/v0_2/_build
--------------------------------------------------------

Any idea ?

Thanks very much.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20141231/519aa644/attachment.html>


More information about the CMake mailing list