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
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 there...
I guess
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/CMakeFiles' created but I do
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 your lines.
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
)
and do I
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
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
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
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 was
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 other
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++)
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
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 are already
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)
14 matches
Mail list logo