[CMake] Precompiled headers on OS X 10.8, CMAKE 2.8.9, Clang

2012-08-27 Thread Jason T. Slack-Moehrle
Hello All, OS X 10.8.1 CMAKE 2.8.9 Apple clang version 4.0 (tags/Apple/clang-421.10.60) (based on LLVM 3.1svn) I found: http://vtk.org/Wiki/CMake_FAQ#Does_CMake_support_precompiled_headers.3F But I am not seeing how I would specify/use a pre-compiled header in my CMakeLists.txt file. Can anyone

Re: [CMake] CMAKE 2.8.9 not observing CMAKE_FILES_DIRECTORY?

2012-08-25 Thread Jason T. Slack-Moehrle
Eric, >>> What makes you think that "PROJECT_BINARY_DIR" or >>> "CMAKE_FILES_DIRECTORY" may be modified? >> >> Ah, well, I had no idea that it was a read-only variable. >> >> So how do people move the location of CMakeFiles and the cache, etc >> away from the root? I dont want all the clutter ther

Re: [CMake] CMAKE 2.8.9 not observing CMAKE_FILES_DIRECTORY?

2012-08-24 Thread Jason T. Slack-Moehrle
Hi Eric, >> OS X 10.8, CMAKE 2.8.9. >> >> In CMAKE 2.8.9 it seems that CMAKE_FILES_DIRECTORY >> >> SET( PROJECT_BINARY_DIR "." ) >> SET( CMAKE_FILES_DIRECTORY ${PROJECT_BINARY_DIR}/output/CMakeFiles ) >> SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin ) >> >> I dont see an 'output/CMakeFile

[CMake] CMAKE 2.8.9 not observing CMAKE_FILES_DIRECTORY?

2012-08-23 Thread Jason T. Slack-Moehrle
Hello OS X 10.8, CMAKE 2.8.9. In CMAKE 2.8.9 it seems that CMAKE_FILES_DIRECTORY SET( PROJECT_BINARY_DIR "." ) SET( CMAKE_FILES_DIRECTORY ${PROJECT_BINARY_DIR}/output/CMakeFiles ) SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin ) I dont see an 'output/CMakeFiles' created but I do see a '

[CMake] Formatting CMakeLists

2012-08-23 Thread Jason T. Slack-Moehrle
A few questions on formatting the CMakeLists file. Is there sort of a "template" that everyone uses to ensure not overwriting options, etc? Second, when using commands like: SET( CORE_SOURCE_FILES "main.cpp" ) can I break lines like: SET( CORE_SOURCE_FILES "main.cpp" "file1.cpp" "file2.cpp" )

Re: [CMake] Specifying compilers?

2012-08-23 Thread Jason T. Slack-Moehrle
>> I am trying to use come C++v11 features and am trying to get the >> compiling to work. >> SET( CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++" ) >> >> PROJECT( ${PROJECT_NAME} ) > > PROJECT will set up the compiler and stuff. And in this process it will set > CMAKE_CXX_FLAGS, i.e. will overwrite yo

Re: [CMake] Specifying compilers?

2012-08-22 Thread Jason T. Slack-Moehrle
> I'm very new to CMake, but we can see the C++11 flags are not showing up in > your VERBOSE output. > > The way i'm adding flags is by using: > > add_definitions(-Wall -Wextra -std=c++0x -pedantic) Here is a test example: http://6colors.net/example.tar.gz -- Powered by www.kitware.com Visit oth

Re: [CMake] Looking for framework in OS X 10.8 with CMake 2.8.8/2, 8.9 seems to be broken

2012-08-22 Thread Jason T. Slack-Moehrle
David, > My environment: > > OS: OS X 10.8 > Xcode 4.4 > Cmake: Tried on both CMake 2.8.8 and CMake 2.8.9 I have the same except XCode 4.5 DP4 > FYI: I tried to load the OpenGL framework (located at > /System/Library/Frameworks/OpenGL.framework) to check whether CMake wa

Re: [CMake] Specifying compilers?

2012-08-22 Thread Jason T. Slack-Moehrle
> Can you provide the output of "make VERBOSE=1"? Absolutely. $ ./build.sh -- The C compiler identification is Clang 4.0.0 -- The CXX compiler identification is Clang 4.0.0 -- Check for working C compiler: /usr/bin/clang -- Check for working C compiler: /usr/bin/clang -- works -- Detecting C comp

[CMake] Specifying compilers?

2012-08-22 Thread Jason T. Slack-Moehrle
Hello, I am trying to use come C++v11 features and am trying to get the compiling to work. The error: [jtsm@server]$ ./build.sh -- The C compiler identification is Clang 4.0.0 -- The CXX compiler identification is Clang 4.0.0 -- Check for working C compiler: /usr/bin/clang -- Check for working C

Re: [CMake] CMAKE 2.8.9, OS X 10.8 and OpenGL

2012-08-15 Thread Jason T. Slack-Moehrle
Benjamin, > for me, the following file works > > --- BEGIN CMakeLists.txt > cmake_minimum_required (VERSION 2.8.9) > > project(Test) > > SET(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++") > > find_package(OpenGL REQUIRED) > include_directories(${OPENGL_INCLUDE_DIR}) > > find_package(GLUT REQUIRED)

Re: [CMake] CMAKE 2.8.9, OS X 10.8 and OpenGL

2012-08-15 Thread Jason T. Slack-Moehrle
HI Mike, > SET(CMAKE_C_COMPILER "clang") > SET(CMAKE_CXX_COMPILER "clang++") > > Those really will have no effect. If you want to use Clang, then set the CC > and CXX environment variables BEFORE running cmake for the first time. By the > time CMake gets to those lines the C and C++ compilers ar

Re: [CMake] CMAKE 2.8.9, OS X 10.8 and OpenGL

2012-08-15 Thread Jason T. Slack-Moehrle
Hi Benjamin, I modified my CMakeLists.txt file a bit: PROJECT(Test) SET(TEST_VERSION 0.1+devel) SET(PROJECT_NAME test) CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9) SET(CMAKE_INCLUDE_CURRENT_DIR TRUE) SET(CMAKE_C_COMPILER "clang") SET(CMAKE_CXX_COMPILER "clang++") SET(CMAKE_CXX_FLAGS "-std=c++11 -stdl

[CMake] CMAKE 2.8.9, OS X 10.8 and OpenGL

2012-08-15 Thread Jason T. Slack-Moehrle
Hello All, I am new to CMAKE and attempting to build an OpenGL app on OS X 10.8. (I will be using other platforms as well) My CMakeLists.txt: cmake_minimum_required (VERSION 2.8.9) SET(CMAKE_C_COMPILER "clang") SET(CMAKE_CXX_COMPILER "clang++") SET(CMAKE_CXX_FLAGS "-std=c++11 -stdlib=libc++")